File size: 4,207 Bytes
19fd35d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
  "model": "modnet",
  "upstream": {
    "model": "ZHKKKe/MODNet (photographic portrait matting checkpoint)",
    "weights": {
      "repo": "boopathiraj/MODNet",
      "revision": "a967175f8fd63de67a1c161d8daac966d2b57e3a",
      "file": "modnet/pretrained/modnet_photographic_portrait_matting.ckpt",
      "sha256": "7c22235f0925deba15d4d63e53afcb654c47055bbcd98f56e393ab2584007ed8",
      "official": false,
      "note": "community mirror; official checkpoints are on Google Drive, linked from GitHub, neither reachable from the export host"
    },
    "architecture_source": {
      "repo": "boopathiraj/MODNet",
      "revision": "a967175f8fd63de67a1c161d8daac966d2b57e3a",
      "files_sha256": {
        "modnet/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "modnet/modnet.py": "8fba11b0fe1c5e10ed5feb8c23e48543c2bf32242eda32621084df3624183109",
        "modnet/src/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "modnet/src/models/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "modnet/src/models/backbones/__init__.py": "28a5fb95f7dcf9e365edbf42c6d2e8ea0ca4839e51fd7f11bd0547d2359fcd96",
        "modnet/src/models/backbones/wrapper.py": "41197be7eb96b8a60dc034b55d8c9340dd682a41441dcf2ce67238955dfa5607",
        "modnet/src/models/backbones/mobilenetv2.py": "e3cc8ad6a9933ba18a17a62d5f887c64e0721240871ea8b48742fb9a8a2c3199",
        "modnet/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
      },
      "official": false,
      "note": "copy of the upstream src/models tree with modnet.py moved to the package root"
    },
    "license": "Apache-2.0"
  },
  "versions": {
    "python": "3.12.15+meta",
    "torch": "2.14.1+cpu",
    "torchao": "0.18.0+cpu",
    "executorch": "1.5.1+cpu",
    "executorch_git": "3b60683923245cf472b7323426920e15623ba361",
    "transformers": "5.19.0",
    "huggingface_hub": "2.2.0"
  },
  "export": {
    "api": "torch.export.export(strict=False) -> to_edge_transform_and_lower(partitioner=[WebGPUPartitioner()]) -> to_executorch()",
    "partitioner": "executorch.backends.webgpu.partitioner.WebGPUPartitioner() (default compile options; wraps VulkanPartitioner)",
    "inputs": [
      {
        "shape": [
          1,
          3,
          256,
          256
        ],
        "dtype": "float32",
        "layout": "NCHW"
      }
    ],
    "outputs": [
      {
        "shape": [
          1,
          1,
          256,
          256
        ],
        "dtype": "float32"
      }
    ],
    "dtype": "float32",
    "quantization": "none (fp32)",
    "variant": "photographic",
    "preprocessing_outside_graph": "RGB / 255, then (x - 0.5) / 0.5",
    "postprocessing_outside_graph": "alpha in [0, 1]"
  },
  "files": {
    "modnet_webgpu.pte": {
      "bytes": 26109828,
      "sha256": "0c2ff92e26087e98b4b2b61497d48d278be2474cc3cfabbc16f58da7eb5ad6c4"
    },
    "modnet_portable.pte": {
      "bytes": 26193908,
      "sha256": "e74de105325321efeb5ef52d27a27c7acae2829d2098572a0be6c6dea7ac7dbd",
      "note": "CPU-only validation artifact (portable kernels, no delegate); not for release"
    }
  },
  "graph": {
    "non_delegated_kernels": {},
    "delegates": [
      {
        "id": "VulkanBackend",
        "ops": {
          "et_vk.prepack.default": 16,
          "et_vk.conv_with_clamp.default": 35,
          "aten.convolution.default": 34,
          "aten.add.Tensor": 26,
          "aten.mean.dim": 33,
          "aten.clone.default": 2,
          "aten.view_copy.default": 2,
          "aten.linear.default": 2,
          "aten.relu.default": 17,
          "aten.sigmoid.default": 2,
          "aten.expand_copy.default": 1,
          "aten.mul.Tensor": 17,
          "aten.upsample_bilinear2d.vec": 9,
          "aten.slice_copy.Tensor": 32,
          "aten._native_batch_norm_legit_no_training.default": 16,
          "aten.sub.Tensor": 16,
          "aten.sqrt.default": 16,
          "aten.div.Tensor": 16,
          "aten.cat.default": 22
        },
        "inputs": 1,
        "outputs": 1
      }
    ]
  },
  "command": "python recipes/modnet.py --out out/modnet"
}