Updated image links in documentation to use S3 storage, modified icon path in pyproject.toml, and enhanced model loading logic in SBLoadModel for improved compatibility with TorchScript models. Removed outdated asset files.

This commit is contained in:
SuperBeastsAI
2025-07-25 20:55:21 +10:00
parent d0cf271050
commit 161e88b9b3
105 changed files with 1496 additions and 78 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
# 🔥 Available now: Super Pop Color Adjustment Model & Nodes
<p align="center">
<img src="docs/assets/examples/SPCA-Header.webp" alt="SuperBeasts.AI Super Pop Color Adjustment" width="100%" />
<img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/examples/SPCA-Header.webp" alt="SuperBeasts.AI Super Pop Color Adjustment" width="100%" />
</p>
**Super Pop Color Adjustment** · *A fast residual color adjustment model for vibrant palettes, deep blacks, crisp highlights, HDR bite – in one shot.*
@@ -0,0 +1,792 @@
{
"id": "f616e3a0-cf66-4f06-9787-fd37ac226747",
"revision": 0,
"last_node_id": 133,
"last_link_id": 306,
"nodes": [
{
"id": 91,
"type": "HDR Effects (SuperBeasts.AI)",
"pos": [
-660,
-20
],
"size": [
390,
180
],
"flags": {},
"order": 5,
"mode": 4,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 275
}
],
"outputs": [
{
"name": "result_img",
"type": "IMAGE",
"slot_index": 0,
"links": [
238
]
}
],
"properties": {
"Node name for S&R": "HDR Effects (SuperBeasts.AI)",
"cnr_id": "comfyui-superbeasts",
"ver": "f684c86d0031b82123dc1f7931a8de43c9946fee",
"widget_ue_connectable": {}
},
"widgets_values": [
0.76,
0.25,
0.9,
0,
0.1,
0.6400000000000001
],
"color": "#14145c",
"bgcolor": "#000048"
},
{
"id": 113,
"type": "Note",
"pos": [
-660,
-800
],
"size": [
390,
150
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [],
"title": "Super Pop Color Adjustment Recommendations",
"properties": {
"widget_ue_connectable": {}
},
"widgets_values": [
"- Image(s) 512 - 2048px\n- Context Image - Empty uses it's self for correction context\n- Max strength 1.0\n- Count 1\n- Overlap at least 0.3 (higher is better up to ~0.9 if GPU allows for final images)\n\nExamples and instructions: https://github.com/SuperBeastsAI/ComfyUI-SuperBeasts/blob/master/docs/super-pop-color-adjustment.md"
],
"color": "#d67023",
"bgcolor": "#c25c0f"
},
{
"id": 121,
"type": "Super Pop Residual Blend (SuperBeasts.AI)",
"pos": [
920,
160
],
"size": [
374.6089782714844,
78
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 282
},
{
"name": "residual",
"type": "SPCA_RESIDUAL",
"link": 288
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": [
297
]
},
{
"name": "filename_prefix",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "Super Pop Residual Blend (SuperBeasts.AI)",
"cnr_id": "comfyui-superbeasts",
"ver": "117a4529ab5f0ec0145da3e50d61ef73046fa821",
"widget_ue_connectable": {}
},
"widgets_values": [
0.5000000000000001
],
"color": "#14145c",
"bgcolor": "#000048"
},
{
"id": 126,
"type": "Image Comparer (rgthree)",
"pos": [
1630,
-800
],
"size": [
670,
900
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"dir": 3,
"name": "image_a",
"type": "IMAGE",
"link": 296
},
{
"dir": 3,
"name": "image_b",
"type": "IMAGE",
"link": 299
}
],
"outputs": [],
"title": "Comparison - Original V.S. Super Pop Colour Adjustment (SuberBeasts.AI)",
"properties": {
"cnr_id": "rgthree-comfy",
"ver": "944d5353a1b0a668f40844018c3dc956b95a67d7",
"comparer_mode": "Slide",
"widget_ue_connectable": {}
},
"widgets_values": [
[
{
"name": "A",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_zisus_00025_.png&type=temp&subfolder=&preview=webp&rand=0.12061521654902096"
},
{
"name": "B",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_zisus_00026_.png&type=temp&subfolder=&preview=webp&rand=0.3100928355954683"
}
]
],
"color": "#2a363b",
"bgcolor": "#3f5159"
},
{
"id": 125,
"type": "Image Comparer (rgthree)",
"pos": [
920,
-800
],
"size": [
670,
900
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"dir": 3,
"name": "image_a",
"type": "IMAGE",
"link": 297
},
{
"dir": 3,
"name": "image_b",
"type": "IMAGE",
"link": 298
}
],
"outputs": [],
"title": "Comparison - Original V.S. Super Pop Colour Adjustment (SuberBeasts.AI)",
"properties": {
"cnr_id": "rgthree-comfy",
"ver": "944d5353a1b0a668f40844018c3dc956b95a67d7",
"comparer_mode": "Slide",
"widget_ue_connectable": {}
},
"widgets_values": [
[
{
"name": "A",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_difuo_00025_.png&type=temp&subfolder=&preview=webp&rand=0.2381890175765341"
},
{
"name": "B",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_difuo_00026_.png&type=temp&subfolder=&preview=webp&rand=0.1267883942778919"
}
]
],
"color": "#2a363b",
"bgcolor": "#3f5159"
},
{
"id": 114,
"type": "SaveImage",
"pos": [
-130,
-800
],
"size": [
210,
282
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 284
},
{
"name": "filename_prefix",
"type": "STRING",
"widget": {
"name": "filename_prefix"
},
"link": 285
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.44",
"widget_ue_connectable": {}
},
"widgets_values": [
"SuperBeasts.AI_SPCA_"
]
},
{
"id": 69,
"type": "Image Comparer (rgthree)",
"pos": [
110,
-800
],
"size": [
670,
900
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"dir": 3,
"name": "image_a",
"type": "IMAGE",
"link": 238
},
{
"dir": 3,
"name": "image_b",
"type": "IMAGE",
"link": 189
}
],
"outputs": [],
"title": "Comparison - Original V.S. Super Pop Colour Adjustment (SuberBeasts.AI)",
"properties": {
"cnr_id": "rgthree-comfy",
"ver": "944d5353a1b0a668f40844018c3dc956b95a67d7",
"comparer_mode": "Slide",
"widget_ue_connectable": {}
},
"widgets_values": [
[
{
"name": "A",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_ycmde_00025_.png&type=temp&subfolder=&preview=webp&rand=0.7170845396129458"
},
{
"name": "B",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_ycmde_00026_.png&type=temp&subfolder=&preview=webp&rand=0.42308399021076515"
}
]
],
"color": "#2a363b",
"bgcolor": "#3f5159"
},
{
"id": 102,
"type": "SB Load Model (SuperBeasts.AI)",
"pos": [
-660,
-420
],
"size": [
390,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "model",
"type": "SBMODEL",
"links": [
273
]
}
],
"properties": {
"Node name for S&R": "SB Load Model (SuperBeasts.AI)",
"cnr_id": "comfyui-superbeasts",
"ver": "73a6a22138b32cd76318a48c594050b91906901d",
"widget_ue_connectable": {}
},
"widgets_values": [
"SuperBeasts_ColorAdjustment_512px_V1.safetensors",
"GPU"
],
"color": "#14145c",
"bgcolor": "#000048"
},
{
"id": 93,
"type": "LoadImage",
"pos": [
-1410,
-800
],
"size": [
630,
1000
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
306
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "LoadImage",
"widget_ue_connectable": {}
},
"widgets_values": [
"39a.png",
"image"
]
},
{
"id": 81,
"type": "JWImageResizeByLongerSide",
"pos": [
-660,
-580
],
"size": [
390,
82
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 306
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
189,
274,
282,
283,
298,
299
]
}
],
"properties": {
"cnr_id": "comfyui-various",
"ver": "5bd85aaf7616878471469c4ec7e11bbd0cef3bf2",
"Node name for S&R": "JWImageResizeByLongerSide",
"widget_ue_connectable": {}
},
"widgets_values": [
1024,
"bicubic"
]
},
{
"id": 120,
"type": "Super Pop Color Adjustment (SuperBeasts.AI)",
"pos": [
-660,
-270
],
"size": [
387.8160095214844,
170
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "SBMODEL",
"link": 273
},
{
"name": "image",
"type": "IMAGE",
"link": 274
},
{
"name": "context",
"shape": 7,
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": [
275,
284
]
},
{
"name": "filename_prefix",
"type": "STRING",
"links": [
285
]
},
{
"name": "residuals",
"type": "SPCA_RESIDUAL",
"links": [
288,
289
]
}
],
"properties": {
"Node name for S&R": "Super Pop Color Adjustment (SuperBeasts.AI)",
"cnr_id": "comfyui-superbeasts",
"ver": "117a4529ab5f0ec0145da3e50d61ef73046fa821",
"widget_ue_connectable": {}
},
"widgets_values": [
1,
1,
0.7500000000000001,
false
],
"color": "#14145c",
"bgcolor": "#000048"
},
{
"id": 118,
"type": "Super Pop Residual Blend (SuperBeasts.AI)",
"pos": [
1630,
160
],
"size": [
374.6089782714844,
78
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 283
},
{
"name": "residual",
"type": "SPCA_RESIDUAL",
"link": 289
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": [
296
]
},
{
"name": "filename_prefix",
"type": "STRING",
"links": []
}
],
"properties": {
"Node name for S&R": "Super Pop Residual Blend (SuperBeasts.AI)",
"cnr_id": "comfyui-superbeasts",
"ver": "117a4529ab5f0ec0145da3e50d61ef73046fa821",
"widget_ue_connectable": {}
},
"widgets_values": [
1.5000000000000002
],
"color": "#14145c",
"bgcolor": "#000048"
}
],
"links": [
[
189,
81,
0,
69,
1,
"IMAGE"
],
[
238,
91,
0,
69,
0,
"IMAGE"
],
[
273,
102,
0,
120,
0,
"SBMODEL"
],
[
274,
81,
0,
120,
1,
"IMAGE"
],
[
275,
120,
0,
91,
0,
"IMAGE"
],
[
282,
81,
0,
121,
0,
"IMAGE"
],
[
283,
81,
0,
118,
0,
"IMAGE"
],
[
284,
120,
0,
114,
0,
"IMAGE"
],
[
285,
120,
1,
114,
1,
"STRING"
],
[
288,
120,
2,
121,
1,
"SPCA_RESIDUAL"
],
[
289,
120,
2,
118,
1,
"SPCA_RESIDUAL"
],
[
296,
118,
0,
126,
0,
"IMAGE"
],
[
297,
121,
0,
125,
0,
"IMAGE"
],
[
298,
81,
0,
125,
1,
"IMAGE"
],
[
299,
81,
0,
126,
1,
"IMAGE"
],
[
306,
93,
0,
81,
0,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "SuperBeasts.AI Adjustments",
"bounding": [
-700,
-900,
480,
1110
],
"color": "#c25c0f",
"font_size": 24,
"flags": {}
},
{
"id": 2,
"title": "Image results",
"bounding": [
-150,
-900,
990,
1040
],
"color": "#a1309b",
"font_size": 24,
"flags": {}
},
{
"id": 4,
"title": "Image(s) Input",
"bounding": [
-1440,
-900,
690,
1120
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"id": 6,
"title": "Alternative SPCA Strength Tests",
"bounding": [
880,
-890,
1460,
1170
],
"color": "#a1309b",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.7513148009015783,
"offset": [
1300.3125958595183,
919.6808269326773
]
},
"frontendVersion": "1.23.4",
"groupNodes": {},
"ue_links": [],
"links_added_by_ue": [],
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true,
"node_versions": {
"comfy-core": "0.3.14",
"ComfyUI-KJNodes": "80977db1ea8472a7934de50f3c878aed405e8d73",
"ComfyUI-SuperBeasts": "73a6a22138b32cd76318a48c594050b91906901d",
"ComfyUI-VideoHelperSuite": "8629188458dc6cb832f871ece3bd273507e8a766",
"comfyui-various": "36454f91606bbff4fc36d90234981ca4a47e2695",
"rgthree-comfy": "5d771b8b56a343c24a26e8cea1f0c87c3d58102f"
}
},
"version": 0.4
}

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1004 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 955 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 981 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

+1 -1
View File
@@ -3,7 +3,7 @@
Keep your image and masks sized, cropped and ordered how ever you like without having to recreate the masks or mess with connections.
Note the resizing capability doesn't provide any settings, we simply crop and resize to maximise the image size with your provided width/height.
![Batch Management](../examples/BatchManagers.jpg)
![Batch Management](https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/examples/BatchManagers.jpg)
## ImageBatchManagement
+2 -2
View File
@@ -13,10 +13,10 @@ The HDR Effects is an image processing application that enhances the dynamic ran
## Examples
![Example 1](assets/examples/ex1.png)
![Example 1](https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/examples/ex1.png)
![Example 2](assets/examples/ex2.png)
![Example 2](https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/examples/ex2.png)
### Parameter details
+86 -64
View File
@@ -1,9 +1,11 @@
<img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/examples/SPCA-Header.webp">
# Super Pop Color Adjustment (SuperBeasts.AI)
Bring the **SuperBeasts “pop”** to any image in one click using a new custom residual color correction model trained to push **vibrant palette, deep blacks, crisp highlights, and HDR bite** with ease.
<a href="assets/examples/SPCA/SuperBeasts.AI-SuperPopColorAdjustment.json" target="_blank"><img src="assets/examples/SPCA/workflow.jpg"/></a>
<a href="assets/examples/SPCA/SuperBeasts.AI-SuperPopColorAdjustment.json" target="_blank">Downlaod the ComfyUI Workflow</a>.
<a href="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/SuperBeasts.AI-SuperPopColorAdjustment.json" target="_blank"><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/workflow.jpg"/></a>
<a href="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/SuperBeasts.AI-SuperPopColorAdjustment.json" target="_blank">Download the ComfyUI Workflow</a>.
### Why I built it
Everything I post gets graded: lift blacks, pull whites, bend curves, punch colour. Existing auto tools (and many AI outputs — looking at you, muddy yellow “whites”) just weren’t landing, especially across batches or iterative generations. Training my own lightweight correction model let me reclaim hours of post and lock in a consistent SuperBeasts look I could reuse — and share.
@@ -19,6 +21,8 @@ Happy generating!!
### Using Super Pop
Before starting please review the <a href="https://github.com/SuperBeastsAI/SuperBeastsAI-Models/blob/main/SuperPopColorAdjustment/LICENSE.txt" target="_blank">the licence</a> and [System Requirements](#System-Requirements) to run onnx models.
1. Add **SB Load Model (SuperBeasts.AI)** node.
2. Pick **SuperPopColorAdjustment/latest**.
3a. Connect to **Super Pop Color Adjustment (SuperBeasts.AI)** node.
@@ -45,21 +49,21 @@ Local/client use OK; no public SaaS redistribution.
<table width="100%">
<tr>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/5a.png" width="100%" alt="Original 1"></td>
<td><img src="assets/examples/SPCA/5b.png" width="100%" alt="S.P.C.A 1"></td>
<td><img src="assets/examples/SPCA/1a.png" width="100%" alt="Original 2"></td>
<td><img src="assets/examples/SPCA/1b.png" width="100%" alt="S.P.C.A 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/5a.png" width="100%" alt="Original 1"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/5b.png" width="100%" alt="SPCA 1"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/1a.png" width="100%" alt="Original 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/1b.png" width="100%" alt="SPCA 2"></td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/2a.png" width="100%" alt="Original 3"></td>
<td><img src="assets/examples/SPCA/2b.png" width="100%" alt="S.P.C.A 3"></td>
<td><img src="assets/examples/SPCA/4a.png" width="100%" alt="Original 4"></td>
<td><img src="assets/examples/SPCA/4b.png" width="100%" alt="S.P.C.A 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/2a.png" width="100%" alt="Original 3"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/2b.png" width="100%" alt="SPCA 3"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/4a.png" width="100%" alt="Original 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/4b.png" width="100%" alt="SPCA 4"></td>
</tr>
</table>
@@ -68,21 +72,21 @@ Local/client use OK; no public SaaS redistribution.
<table width="100%">
<tr>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/41a.png" width="100%" alt="Original 1"></td>
<td><img src="assets/examples/SPCA/41b.png" width="100%" alt="S.P.C.A 1"></td>
<td><img src="assets/examples/SPCA/16a.png" width="100%" alt="Original 2"></td>
<td><img src="assets/examples/SPCA/16b.png" width="100%" alt="S.P.C.A 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/41a.png" width="100%" alt="Original 5"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/41b.png" width="100%" alt="SPCA 5"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/16a.png" width="100%" alt="Original 6"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/16b.png" width="100%" alt="SPCA 6"></td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/27a.png" width="100%" alt="Original 3"></td>
<td><img src="assets/examples/SPCA/27b.png" width="100%" alt="S.P.C.A 3"></td>
<td><img src="assets/examples/SPCA/24a.png" width="100%" alt="Original 4"></td>
<td><img src="assets/examples/SPCA/24b.png" width="100%" alt="S.P.C.A 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/27a.png" width="100%" alt="Original 7"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/27b.png" width="100%" alt="SPCA 7"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/24a.png" width="100%" alt="Original 8"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/24b.png" width="100%" alt="SPCA 8"></td>
</tr>
</table>
@@ -92,21 +96,21 @@ Local/client use OK; no public SaaS redistribution.
<table width="100%">
<tr>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/6a.png" width="100%" alt="Original 1"></td>
<td><img src="assets/examples/SPCA/6b.png" width="100%" alt="S.P.C.A 1"></td>
<td><img src="assets/examples/SPCA/9a.png" width="100%" alt="Original 2"></td>
<td><img src="assets/examples/SPCA/9b.png" width="100%" alt="S.P.C.A 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/6a.png" width="100%" alt="Original 9"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/6b.png" width="100%" alt="SPCA 9"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/9a.png" width="100%" alt="Original 10"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/9b.png" width="100%" alt="SPCA 10"></td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/38a.png" width="100%" alt="Original 3"></td>
<td><img src="assets/examples/SPCA/38b.png" width="100%" alt="S.P.C.A 3"></td>
<td><img src="assets/examples/SPCA/26a.png" width="100%" alt="Original 4"></td>
<td><img src="assets/examples/SPCA/26b.png" width="100%" alt="S.P.C.A 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/38a.png" width="100%" alt="Original 11"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/38b.png" width="100%" alt="SPCA 11"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/26a.png" width="100%" alt="Original 12"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/26b.png" width="100%" alt="SPCA 12"></td>
</tr>
</table>
@@ -116,21 +120,21 @@ Local/client use OK; no public SaaS redistribution.
<table width="100%">
<tr>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/7a.png" width="100%" alt="Original 1"></td>
<td><img src="assets/examples/SPCA/7b.png" width="100%" alt="S.P.C.A 1"></td>
<td><img src="assets/examples/SPCA/14a.png" width="100%" alt="Original 2"></td>
<td><img src="assets/examples/SPCA/14b.png" width="100%" alt="S.P.C.A 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/7a.png" width="100%" alt="Original 13"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/7b.png" width="100%" alt="SPCA 13"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/14a.png" width="100%" alt="Original 14"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/14b.png" width="100%" alt="SPCA 14"></td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/13a.png" width="100%" alt="Original 3"></td>
<td><img src="assets/examples/SPCA/13b.png" width="100%" alt="S.P.C.A 3"></td>
<td><img src="assets/examples/SPCA/34a.png" width="100%" alt="Original 4"></td>
<td><img src="assets/examples/SPCA/34b.png" width="100%" alt="S.P.C.A 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/13a.png" width="100%" alt="Original 15"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/13b.png" width="100%" alt="SPCA 15"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/34a.png" width="100%" alt="Original 16"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/34b.png" width="100%" alt="SPCA 16"></td>
</tr>
</table>
@@ -140,21 +144,21 @@ Local/client use OK; no public SaaS redistribution.
<table width="100%">
<tr>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/25a.png" width="100%" alt="Original 1"></td>
<td><img src="assets/examples/SPCA/25b.png" width="100%" alt="S.P.C.A 1"></td>
<td><img src="assets/examples/SPCA/21a.png" width="100%" alt="Original 2"></td>
<td><img src="assets/examples/SPCA/21b.png" width="100%" alt="S.P.C.A 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/25a.png" width="100%" alt="Original 17"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/25b.png" width="100%" alt="SPCA 17"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/21a.png" width="100%" alt="Original 18"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/21b.png" width="100%" alt="SPCA 18"></td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/35a.png" width="100%" alt="Original 3"></td>
<td><img src="assets/examples/SPCA/35b.png" width="100%" alt="S.P.C.A 3"></td>
<td><img src="assets/examples/SPCA/28a.png" width="100%" alt="Original 4"></td>
<td><img src="assets/examples/SPCA/28b.png" width="100%" alt="S.P.C.A 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/35a.png" width="100%" alt="Original 19"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/35b.png" width="100%" alt="SPCA 19"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/28a.png" width="100%" alt="Original 20"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/28b.png" width="100%" alt="SPCA 20"></td>
</tr>
</table>
@@ -164,21 +168,21 @@ Local/client use OK; no public SaaS redistribution.
<table width="100%">
<tr>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
<td style="width:25%" width="25%">Original</td>
<td style="width:25%" width="25%">S.P.C.A</td>
<td style="width:25%" width="25%">SPCA</td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/18a.png" width="100%" alt="Original 1"></td>
<td><img src="assets/examples/SPCA/18b.png" width="100%" alt="S.P.C.A 1"></td>
<td><img src="assets/examples/SPCA/39a.png" width="100%" alt="Original 2"></td>
<td><img src="assets/examples/SPCA/39b.png" width="100%" alt="S.P.C.A 2"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/18a.png" width="100%" alt="Original 21"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/18b.png" width="100%" alt="SPCA 21"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/39a.png" width="100%" alt="Original 22"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/39b.png" width="100%" alt="SPCA 22"></td>
</tr>
<tr>
<td><img src="assets/examples/SPCA/37a.png" width="100%" alt="Original 3"></td>
<td><img src="assets/examples/SPCA/37b.png" width="100%" alt="S.P.C.A 3"></td>
<td><img src="assets/examples/SPCA/40a.png" width="100%" alt="Original 4"></td>
<td><img src="assets/examples/SPCA/40b.png" width="100%" alt="S.P.C.A 4"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/37a.png" width="100%" alt="Original 23"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/37b.png" width="100%" alt="SPCA 23"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/40a.png" width="100%" alt="Original 24"></td>
<td><img src="https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/images/samples/40b.png" width="100%" alt="SPCA 24"></td>
</tr>
</table>
@@ -244,5 +248,23 @@ down-scaled or abstract images work great but this only plays a small role in th
### System Requirements
Works out-of-the-box on CPU via `onnxruntime`. For **10×** speed improvement ensure ComfyUI can use the `CUDAExecutionProvider` by using onnxruntime-gpu with the hardware that allows this.
This node print out the currently available providers into the ComfyUI server logs if you need to check this.
Works out-of-the-box on CPU via `onnxruntime` but it is extremely slow and I wouldn't recommend it.
For **10×** speed improvement ensure ComfyUI can use the `CUDAExecutionProvider` by installing `onnxruntime-gpu` into the ComfyUI environment.
This node currently prints out the available providers for onnxruntime into the ComfyUI server logs when you run the node. So if you are not seeing `CUDAExecutionProvider` it's likely the model is using CPU instead.
For reference I use:
Python version: 3.12.1
pytorch version: 2.5.0+cu124
NVIDIA GeForce RTX 4090
with onnxruntime-gpu installed in the ComfyUI Environment
and C:\Program Files\NVIDIA\CUDNN\vX.X\bin on your System Path (where x.x is your version)
For more on debugging try tips from the user here: https://github.com/SuperBeastsAI/ComfyUI-SuperBeasts/issues/10#issuecomment-3113530795
Results - Server Logs show:
[SuperBeasts] ONNX Runtime providers available: ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
[SuperBeasts] Using ORT providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
1024x1024px with 0.5 overlap = 1.63s
2048x2048px with 0.5 overlap = 5.23s
Note: I am aware the extra installation of `onnxruntime-gpu` isn't ideal and I'm attempting to convert the model into .safetensors to work within the ComfyUI Pytorch environment better with less issues accessing the GPU.
+1 -1
View File
@@ -13,7 +13,7 @@ Repository = "https://github.com/SuperBeastsAI/ComfyUI-SuperBeasts"
[tool.comfy]
PublisherId = "superbeastsai"
DisplayName = "ComfyUI-SuperBeasts"
Icon = "https://raw.githubusercontent.com/SuperBeastsAI/ComfyUI-SuperBeasts/refs/heads/master/docs/assets/icon.png"
Icon = "https://s3.ap-southeast-2.amazonaws.com/superbeasts.ai/repos/ComfyUI-SuperBeasts/icon.png"
excludes = [
"docs"
]
+19
View File
@@ -0,0 +1,19 @@
from pathlib import Path
import csv, onnx
def main():
onnx_path = Path("models/SuperBeasts_ColorAdjustment_512px_V1.onnx")
if not onnx_path.exists():
raise FileNotFoundError(onnx_path)
model = onnx.load(str(onnx_path))
out_path = Path(__file__).with_name("tensor_blueprint.csv")
with out_path.open("w", newline="") as f:
wr = csv.writer(f)
wr.writerow(["index", "name", "shape"])
for idx, init in enumerate(model.graph.initializer):
dims = list(init.dims)
wr.writerow([idx, init.name, dims])
print(f"[dump] wrote {out_path} with {len(model.graph.initializer)} tensors")
if __name__ == "__main__":
main()
+178
View File
@@ -0,0 +1,178 @@
index,name,shape
0,new_shape__1590,[5]
1,new_shape__1589,[5]
2,new_shape__1588,[5]
3,new_shape__1587,[5]
4,new_shape__1586,[5]
5,new_shape__1585,[5]
6,new_shape__1013,[4]
7,new_shape__1010,[4]
8,new_shape__1008,[4]
9,einsum124219583030736_ba_batch_axes__1283,[2]
10,einsum124219582908752_ba_left_set__1510,[1]
11,einsum124219582908752_ba_final_axes__1513,[1]
12,einsum124218983837520_id_axes__1281,[1]
13,einsum124218981442064_ba__1__1213,[1]
14,einsum124218844259344_ba_ones__1436,[1]
15,contextual_residual_unet_1/up_sampling2d_1_2/Repeat_1/concat/values_1__9,[1]
16,contextual_residual_unet_1/skip_proj_2_1/convolution/Cast:0,"[32, 64, 1, 1]"
17,contextual_residual_unet_1/skip_proj_2_1/Squeeze:0,[32]
18,contextual_residual_unet_1/skip_proj_1_1/convolution/Cast:0,"[64, 96, 1, 1]"
19,contextual_residual_unet_1/skip_proj_1_1/Squeeze:0,[64]
20,contextual_residual_unet_1/skip_proj_0_1/convolution/Cast:0,"[96, 128, 1, 1]"
21,contextual_residual_unet_1/skip_proj_0_1/Squeeze:0,[96]
22,contextual_residual_unet_1/reshape_8_1/Reshape_shape__1125,[4]
23,contextual_residual_unet_1/reshape_7_1/Reshape_shape__1129,[3]
24,contextual_residual_unet_1/reshape_5_1/Reshape_shape__1130,[4]
25,contextual_residual_unet_1/reshape_4_1/Reshape_shape__1127,[3]
26,contextual_residual_unet_1/reshape_2_2/Reshape_shape__1128,[4]
27,contextual_residual_unet_1/reshape_1_1/Reshape_shape__1126,[3]
28,contextual_residual_unet_1/group_normalization_9_1/Cast_2:0,"[1, 1, 1, 8, 12]"
29,contextual_residual_unet_1/group_normalization_9_1/Cast_1:0,"[1, 1, 1, 8, 12]"
30,contextual_residual_unet_1/group_normalization_8_1/Cast_2:0,"[1, 1, 1, 8, 16]"
31,contextual_residual_unet_1/group_normalization_8_1/Cast_1:0,"[1, 1, 1, 8, 16]"
32,contextual_residual_unet_1/group_normalization_7_1/Cast_2:0,"[1, 1, 1, 8, 16]"
33,contextual_residual_unet_1/group_normalization_7_1/Cast_1:0,"[1, 1, 1, 8, 16]"
34,contextual_residual_unet_1/group_normalization_6_1/Cast_2:0,"[1, 1, 1, 8, 16]"
35,contextual_residual_unet_1/group_normalization_6_1/Cast_1:0,"[1, 1, 1, 8, 16]"
36,contextual_residual_unet_1/group_normalization_5_1/Cast_2:0,"[1, 1, 1, 8, 16]"
37,contextual_residual_unet_1/group_normalization_5_1/Cast_1:0,"[1, 1, 1, 8, 16]"
38,contextual_residual_unet_1/group_normalization_4_1/Cast_2:0,"[1, 1, 1, 8, 12]"
39,contextual_residual_unet_1/group_normalization_4_1/Cast_1:0,"[1, 1, 1, 8, 12]"
40,contextual_residual_unet_1/group_normalization_3_1/Cast_2:0,"[1, 1, 1, 8, 12]"
41,contextual_residual_unet_1/group_normalization_3_1/Cast_1:0,"[1, 1, 1, 8, 12]"
42,contextual_residual_unet_1/group_normalization_2_1/add/y:0,[]
43,contextual_residual_unet_1/group_normalization_2_1/Cast_2:0,"[1, 1, 1, 8, 8]"
44,contextual_residual_unet_1/group_normalization_2_1/Cast_1:0,"[1, 1, 1, 8, 8]"
45,contextual_residual_unet_1/group_normalization_1_2/Cast_2:0,"[1, 1, 1, 8, 8]"
46,contextual_residual_unet_1/group_normalization_1_2/Cast_1:0,"[1, 1, 1, 8, 8]"
47,contextual_residual_unet_1/group_normalization_14_1/Cast_2:0,"[1, 1, 1, 8, 4]"
48,contextual_residual_unet_1/group_normalization_14_1/Cast_1:0,"[1, 1, 1, 8, 4]"
49,contextual_residual_unet_1/group_normalization_13_1/Cast_2:0,"[1, 1, 1, 8, 4]"
50,contextual_residual_unet_1/group_normalization_13_1/Cast_1:0,"[1, 1, 1, 8, 4]"
51,contextual_residual_unet_1/group_normalization_12_1/Cast_2:0,"[1, 1, 1, 8, 8]"
52,contextual_residual_unet_1/group_normalization_12_1/Cast_1:0,"[1, 1, 1, 8, 8]"
53,contextual_residual_unet_1/group_normalization_11_1/Cast_2:0,"[1, 1, 1, 8, 8]"
54,contextual_residual_unet_1/group_normalization_11_1/Cast_1:0,"[1, 1, 1, 8, 8]"
55,contextual_residual_unet_1/group_normalization_10_1/Cast_2:0,"[1, 1, 1, 8, 12]"
56,contextual_residual_unet_1/group_normalization_10_1/Cast_1:0,"[1, 1, 1, 8, 12]"
57,contextual_residual_unet_1/group_normalization_1/Cast_2:0,"[1, 1, 1, 8, 4]"
58,contextual_residual_unet_1/group_normalization_1/Cast_1:0,"[1, 1, 1, 8, 4]"
59,contextual_residual_unet_1/decoder_q_proj_2_1/convolution/Cast:0,"[32, 64, 1, 1]"
60,contextual_residual_unet_1/decoder_q_proj_1_1/convolution/Cast:0,"[64, 96, 1, 1]"
61,contextual_residual_unet_1/decoder_q_proj_1_1/Squeeze:0,[64]
62,contextual_residual_unet_1/decoder_q_proj_0_1/convolution/Cast:0,"[96, 128, 1, 1]"
63,contextual_residual_unet_1/decoder_mha_2_1/value_1/Reshape:0,"[32, 128]"
64,contextual_residual_unet_1/decoder_mha_2_1/value_1/Add/Cast:0,"[4, 32]"
65,contextual_residual_unet_1/decoder_mha_2_1/query_1/Reshape:0,"[32, 128]"
66,contextual_residual_unet_1/decoder_mha_2_1/key_1/Reshape:0,"[32, 128]"
67,contextual_residual_unet_1/decoder_mha_2_1/attention_output_1/Reshape_1:0,"[128, 32]"
68,contextual_residual_unet_1/decoder_mha_2_1/attention_output_1/BiasAdd/Cast:0,[32]
69,contextual_residual_unet_1/decoder_mha_2_1/Cast_1/x:0,[]
70,contextual_residual_unet_1/decoder_mha_1_1/value_1/Reshape:0,"[64, 256]"
71,contextual_residual_unet_1/decoder_mha_1_1/value_1/Add/Cast:0,"[4, 64]"
72,contextual_residual_unet_1/decoder_mha_1_1/query_1/Reshape:0,"[64, 256]"
73,contextual_residual_unet_1/decoder_mha_1_1/key_1/Reshape:0,"[64, 256]"
74,contextual_residual_unet_1/decoder_mha_1_1/attention_output_1/Reshape_1:0,"[256, 64]"
75,contextual_residual_unet_1/decoder_mha_1_1/Cast_1/x:0,[]
76,contextual_residual_unet_1/decoder_mha_0_1/value_1/Reshape:0,"[96, 384]"
77,contextual_residual_unet_1/decoder_mha_0_1/value_1/Add/Cast:0,"[4, 96]"
78,contextual_residual_unet_1/decoder_mha_0_1/query_1/Reshape:0,"[96, 384]"
79,contextual_residual_unet_1/decoder_mha_0_1/key_1/Reshape:0,"[96, 384]"
80,contextual_residual_unet_1/decoder_mha_0_1/attention_output_1/Reshape_1:0,"[384, 96]"
81,contextual_residual_unet_1/decoder_mha_0_1/attention_output_1/BiasAdd/Cast:0,[96]
82,contextual_residual_unet_1/decoder_mha_0_1/Cast_1/x:0,[]
83,contextual_residual_unet_1/decoder_ctx_kv_proj_2_1/Cast/Cast:0,"[128, 32]"
84,contextual_residual_unet_1/decoder_ctx_kv_proj_2_1/BiasAdd/Cast:0,[32]
85,contextual_residual_unet_1/decoder_ctx_kv_proj_1_1/Cast/Cast:0,"[128, 64]"
86,contextual_residual_unet_1/decoder_ctx_kv_proj_1_1/BiasAdd/Cast:0,[64]
87,contextual_residual_unet_1/decoder_ctx_kv_proj_0_1/Cast/Cast:0,"[128, 96]"
88,contextual_residual_unet_1/decoder_ctx_kv_proj_0_1/BiasAdd/Cast:0,[96]
89,contextual_residual_unet_1/conv2d_9_1/convolution/Cast:0,"[128, 96, 1, 1]"
90,contextual_residual_unet_1/conv2d_9_1/Squeeze:0,[128]
91,contextual_residual_unet_1/conv2d_8_1/convolution/Cast:0,"[96, 96, 3, 3]"
92,contextual_residual_unet_1/conv2d_8_1/Squeeze:0,[96]
93,contextual_residual_unet_1/conv2d_7_1/convolution/Cast:0,"[96, 64, 3, 3]"
94,contextual_residual_unet_1/conv2d_7_1/Squeeze:0,[96]
95,contextual_residual_unet_1/conv2d_6_1/convolution/Cast:0,"[96, 64, 1, 1]"
96,contextual_residual_unet_1/conv2d_6_1/Squeeze:0,[96]
97,contextual_residual_unet_1/conv2d_5_1/convolution/Cast:0,"[64, 64, 3, 3]"
98,contextual_residual_unet_1/conv2d_5_1/Squeeze:0,[64]
99,contextual_residual_unet_1/conv2d_4_1/convolution/Cast:0,"[64, 32, 3, 3]"
100,contextual_residual_unet_1/conv2d_4_1/Squeeze:0,[64]
101,contextual_residual_unet_1/conv2d_3_1/convolution/Cast:0,"[64, 32, 1, 1]"
102,contextual_residual_unet_1/conv2d_3_1/Squeeze:0,[64]
103,contextual_residual_unet_1/conv2d_2_1/convolution/Cast:0,"[32, 7, 3, 3]"
104,contextual_residual_unet_1/conv2d_2_1/Squeeze:0,[32]
105,contextual_residual_unet_1/conv2d_26_1/convolution/ReadVariableOp:0,"[3, 32, 3, 3]"
106,contextual_residual_unet_1/conv2d_26_1/Squeeze:0,[3]
107,contextual_residual_unet_1/conv2d_25_1/convolution/Cast:0,"[32, 32, 3, 3]"
108,contextual_residual_unet_1/conv2d_25_1/Squeeze:0,[32]
109,contextual_residual_unet_1/conv2d_24_1/convolution/Cast:0,"[32, 64, 3, 3]"
110,contextual_residual_unet_1/conv2d_24_1/Squeeze:0,[32]
111,contextual_residual_unet_1/conv2d_23_1/convolution/Cast:0,"[32, 64, 1, 1]"
112,contextual_residual_unet_1/conv2d_23_1/Squeeze:0,[32]
113,contextual_residual_unet_1/conv2d_22_1/convolution/Cast:0,"[1, 2, 7, 7]"
114,contextual_residual_unet_1/conv2d_22_1/Reshape:0,[1]
115,contextual_residual_unet_1/conv2d_21_1/convolution/Cast:0,"[64, 64, 3, 3]"
116,contextual_residual_unet_1/conv2d_21_1/Squeeze:0,[64]
117,contextual_residual_unet_1/conv2d_20_1/convolution/Cast:0,"[64, 128, 3, 3]"
118,contextual_residual_unet_1/conv2d_20_1/Squeeze:0,[64]
119,contextual_residual_unet_1/conv2d_1_2/convolution/Cast:0,"[64, 32, 3, 3]"
120,contextual_residual_unet_1/conv2d_1_2/Squeeze:0,[64]
121,contextual_residual_unet_1/conv2d_19_1/convolution/Cast:0,"[64, 128, 1, 1]"
122,contextual_residual_unet_1/conv2d_19_1/Squeeze:0,[64]
123,contextual_residual_unet_1/conv2d_18_1/convolution/Cast:0,"[1, 2, 7, 7]"
124,contextual_residual_unet_1/conv2d_18_1/Reshape:0,[1]
125,contextual_residual_unet_1/conv2d_17_1/convolution/Cast:0,"[96, 96, 3, 3]"
126,contextual_residual_unet_1/conv2d_17_1/Squeeze:0,[96]
127,contextual_residual_unet_1/conv2d_16_1/convolution/Cast:0,"[96, 192, 3, 3]"
128,contextual_residual_unet_1/conv2d_16_1/Squeeze:0,[96]
129,contextual_residual_unet_1/conv2d_15_1/convolution/Cast:0,"[96, 192, 1, 1]"
130,contextual_residual_unet_1/conv2d_15_1/Squeeze:0,[96]
131,contextual_residual_unet_1/conv2d_14_1/convolution/Cast:0,"[1, 2, 7, 7]"
132,contextual_residual_unet_1/conv2d_14_1/Reshape:0,[1]
133,contextual_residual_unet_1/conv2d_13_1/convolution/Cast:0,"[128, 128, 3, 3]"
134,contextual_residual_unet_1/conv2d_13_1/Squeeze:0,[128]
135,contextual_residual_unet_1/conv2d_12_1/convolution/Cast:0,"[128, 128, 3, 3]"
136,contextual_residual_unet_1/conv2d_12_1/Squeeze:0,[128]
137,contextual_residual_unet_1/conv2d_11_1/convolution/Cast:0,"[128, 128, 3, 3]"
138,contextual_residual_unet_1/conv2d_11_1/Squeeze:0,[128]
139,contextual_residual_unet_1/conv2d_10_1/convolution/Cast:0,"[128, 96, 3, 3]"
140,contextual_residual_unet_1/conv2d_10_1/Squeeze:0,[128]
141,contextual_residual_unet_1/conv2d_1/convolution/Cast:0,"[32, 7, 3, 3]"
142,contextual_residual_unet_1/conv2d_1/Squeeze:0,[32]
143,contextual_residual_unet_1/conv2d_1/Gelu/add/x:0,[]
144,contextual_residual_unet_1/context_embedding_1/Gelu/mul/x:0,[]
145,contextual_residual_unet_1/context_embedding_1/Cast/Cast:0,"[64, 128]"
146,contextual_residual_unet_1/context_embedding_1/BiasAdd/Cast:0,[128]
147,const_fold_opt__1120,[4]
148,const_fold_opt__1119,[3]
149,const_fold_opt__1115,[5]
150,const_fold_opt__1114,[1]
151,const_fold_opt__1106,[1]
152,const_fold_opt__1104,[1]
153,const_fold_opt__1103,[5]
154,const_fold_opt__1100,[1]
155,const_fold_opt__1099,[3]
156,const_fold_opt__1091,[1]
157,const_fold_opt__1079,[1]
158,const_fold_opt__1077,[1]
159,const_fold_opt__1073,[4]
160,const_fold_opt__1072,[1]
161,const_fold_opt__1070__1578,[5]
162,const_fold_opt__1065,[5]
163,const_fold_opt__1063,[5]
164,const_fold_opt__1062,[5]
165,const_fold_opt__1059,[4]
166,const_fold_opt__1054,[4]
167,const_fold_opt__1049,[3]
168,const_fold_opt__1036,[5]
169,const_fold_opt__1034,[4]
170,const_fold_opt__1021,[5]
171,const_fold_opt__1015,[4]
172,const_ends__372,[1]
173,const_axes__508,[1]
174,const_axes__1131,[2]
175,ConstantFolding/contextual_residual_unet_1/context_embedding_1/Gelu/truediv_recip:0,[]
176,Const__958,[4]
1 index name shape
2 0 new_shape__1590 [5]
3 1 new_shape__1589 [5]
4 2 new_shape__1588 [5]
5 3 new_shape__1587 [5]
6 4 new_shape__1586 [5]
7 5 new_shape__1585 [5]
8 6 new_shape__1013 [4]
9 7 new_shape__1010 [4]
10 8 new_shape__1008 [4]
11 9 einsum124219583030736_ba_batch_axes__1283 [2]
12 10 einsum124219582908752_ba_left_set__1510 [1]
13 11 einsum124219582908752_ba_final_axes__1513 [1]
14 12 einsum124218983837520_id_axes__1281 [1]
15 13 einsum124218981442064_ba__1__1213 [1]
16 14 einsum124218844259344_ba_ones__1436 [1]
17 15 contextual_residual_unet_1/up_sampling2d_1_2/Repeat_1/concat/values_1__9 [1]
18 16 contextual_residual_unet_1/skip_proj_2_1/convolution/Cast:0 [32, 64, 1, 1]
19 17 contextual_residual_unet_1/skip_proj_2_1/Squeeze:0 [32]
20 18 contextual_residual_unet_1/skip_proj_1_1/convolution/Cast:0 [64, 96, 1, 1]
21 19 contextual_residual_unet_1/skip_proj_1_1/Squeeze:0 [64]
22 20 contextual_residual_unet_1/skip_proj_0_1/convolution/Cast:0 [96, 128, 1, 1]
23 21 contextual_residual_unet_1/skip_proj_0_1/Squeeze:0 [96]
24 22 contextual_residual_unet_1/reshape_8_1/Reshape_shape__1125 [4]
25 23 contextual_residual_unet_1/reshape_7_1/Reshape_shape__1129 [3]
26 24 contextual_residual_unet_1/reshape_5_1/Reshape_shape__1130 [4]
27 25 contextual_residual_unet_1/reshape_4_1/Reshape_shape__1127 [3]
28 26 contextual_residual_unet_1/reshape_2_2/Reshape_shape__1128 [4]
29 27 contextual_residual_unet_1/reshape_1_1/Reshape_shape__1126 [3]
30 28 contextual_residual_unet_1/group_normalization_9_1/Cast_2:0 [1, 1, 1, 8, 12]
31 29 contextual_residual_unet_1/group_normalization_9_1/Cast_1:0 [1, 1, 1, 8, 12]
32 30 contextual_residual_unet_1/group_normalization_8_1/Cast_2:0 [1, 1, 1, 8, 16]
33 31 contextual_residual_unet_1/group_normalization_8_1/Cast_1:0 [1, 1, 1, 8, 16]
34 32 contextual_residual_unet_1/group_normalization_7_1/Cast_2:0 [1, 1, 1, 8, 16]
35 33 contextual_residual_unet_1/group_normalization_7_1/Cast_1:0 [1, 1, 1, 8, 16]
36 34 contextual_residual_unet_1/group_normalization_6_1/Cast_2:0 [1, 1, 1, 8, 16]
37 35 contextual_residual_unet_1/group_normalization_6_1/Cast_1:0 [1, 1, 1, 8, 16]
38 36 contextual_residual_unet_1/group_normalization_5_1/Cast_2:0 [1, 1, 1, 8, 16]
39 37 contextual_residual_unet_1/group_normalization_5_1/Cast_1:0 [1, 1, 1, 8, 16]
40 38 contextual_residual_unet_1/group_normalization_4_1/Cast_2:0 [1, 1, 1, 8, 12]
41 39 contextual_residual_unet_1/group_normalization_4_1/Cast_1:0 [1, 1, 1, 8, 12]
42 40 contextual_residual_unet_1/group_normalization_3_1/Cast_2:0 [1, 1, 1, 8, 12]
43 41 contextual_residual_unet_1/group_normalization_3_1/Cast_1:0 [1, 1, 1, 8, 12]
44 42 contextual_residual_unet_1/group_normalization_2_1/add/y:0 []
45 43 contextual_residual_unet_1/group_normalization_2_1/Cast_2:0 [1, 1, 1, 8, 8]
46 44 contextual_residual_unet_1/group_normalization_2_1/Cast_1:0 [1, 1, 1, 8, 8]
47 45 contextual_residual_unet_1/group_normalization_1_2/Cast_2:0 [1, 1, 1, 8, 8]
48 46 contextual_residual_unet_1/group_normalization_1_2/Cast_1:0 [1, 1, 1, 8, 8]
49 47 contextual_residual_unet_1/group_normalization_14_1/Cast_2:0 [1, 1, 1, 8, 4]
50 48 contextual_residual_unet_1/group_normalization_14_1/Cast_1:0 [1, 1, 1, 8, 4]
51 49 contextual_residual_unet_1/group_normalization_13_1/Cast_2:0 [1, 1, 1, 8, 4]
52 50 contextual_residual_unet_1/group_normalization_13_1/Cast_1:0 [1, 1, 1, 8, 4]
53 51 contextual_residual_unet_1/group_normalization_12_1/Cast_2:0 [1, 1, 1, 8, 8]
54 52 contextual_residual_unet_1/group_normalization_12_1/Cast_1:0 [1, 1, 1, 8, 8]
55 53 contextual_residual_unet_1/group_normalization_11_1/Cast_2:0 [1, 1, 1, 8, 8]
56 54 contextual_residual_unet_1/group_normalization_11_1/Cast_1:0 [1, 1, 1, 8, 8]
57 55 contextual_residual_unet_1/group_normalization_10_1/Cast_2:0 [1, 1, 1, 8, 12]
58 56 contextual_residual_unet_1/group_normalization_10_1/Cast_1:0 [1, 1, 1, 8, 12]
59 57 contextual_residual_unet_1/group_normalization_1/Cast_2:0 [1, 1, 1, 8, 4]
60 58 contextual_residual_unet_1/group_normalization_1/Cast_1:0 [1, 1, 1, 8, 4]
61 59 contextual_residual_unet_1/decoder_q_proj_2_1/convolution/Cast:0 [32, 64, 1, 1]
62 60 contextual_residual_unet_1/decoder_q_proj_1_1/convolution/Cast:0 [64, 96, 1, 1]
63 61 contextual_residual_unet_1/decoder_q_proj_1_1/Squeeze:0 [64]
64 62 contextual_residual_unet_1/decoder_q_proj_0_1/convolution/Cast:0 [96, 128, 1, 1]
65 63 contextual_residual_unet_1/decoder_mha_2_1/value_1/Reshape:0 [32, 128]
66 64 contextual_residual_unet_1/decoder_mha_2_1/value_1/Add/Cast:0 [4, 32]
67 65 contextual_residual_unet_1/decoder_mha_2_1/query_1/Reshape:0 [32, 128]
68 66 contextual_residual_unet_1/decoder_mha_2_1/key_1/Reshape:0 [32, 128]
69 67 contextual_residual_unet_1/decoder_mha_2_1/attention_output_1/Reshape_1:0 [128, 32]
70 68 contextual_residual_unet_1/decoder_mha_2_1/attention_output_1/BiasAdd/Cast:0 [32]
71 69 contextual_residual_unet_1/decoder_mha_2_1/Cast_1/x:0 []
72 70 contextual_residual_unet_1/decoder_mha_1_1/value_1/Reshape:0 [64, 256]
73 71 contextual_residual_unet_1/decoder_mha_1_1/value_1/Add/Cast:0 [4, 64]
74 72 contextual_residual_unet_1/decoder_mha_1_1/query_1/Reshape:0 [64, 256]
75 73 contextual_residual_unet_1/decoder_mha_1_1/key_1/Reshape:0 [64, 256]
76 74 contextual_residual_unet_1/decoder_mha_1_1/attention_output_1/Reshape_1:0 [256, 64]
77 75 contextual_residual_unet_1/decoder_mha_1_1/Cast_1/x:0 []
78 76 contextual_residual_unet_1/decoder_mha_0_1/value_1/Reshape:0 [96, 384]
79 77 contextual_residual_unet_1/decoder_mha_0_1/value_1/Add/Cast:0 [4, 96]
80 78 contextual_residual_unet_1/decoder_mha_0_1/query_1/Reshape:0 [96, 384]
81 79 contextual_residual_unet_1/decoder_mha_0_1/key_1/Reshape:0 [96, 384]
82 80 contextual_residual_unet_1/decoder_mha_0_1/attention_output_1/Reshape_1:0 [384, 96]
83 81 contextual_residual_unet_1/decoder_mha_0_1/attention_output_1/BiasAdd/Cast:0 [96]
84 82 contextual_residual_unet_1/decoder_mha_0_1/Cast_1/x:0 []
85 83 contextual_residual_unet_1/decoder_ctx_kv_proj_2_1/Cast/Cast:0 [128, 32]
86 84 contextual_residual_unet_1/decoder_ctx_kv_proj_2_1/BiasAdd/Cast:0 [32]
87 85 contextual_residual_unet_1/decoder_ctx_kv_proj_1_1/Cast/Cast:0 [128, 64]
88 86 contextual_residual_unet_1/decoder_ctx_kv_proj_1_1/BiasAdd/Cast:0 [64]
89 87 contextual_residual_unet_1/decoder_ctx_kv_proj_0_1/Cast/Cast:0 [128, 96]
90 88 contextual_residual_unet_1/decoder_ctx_kv_proj_0_1/BiasAdd/Cast:0 [96]
91 89 contextual_residual_unet_1/conv2d_9_1/convolution/Cast:0 [128, 96, 1, 1]
92 90 contextual_residual_unet_1/conv2d_9_1/Squeeze:0 [128]
93 91 contextual_residual_unet_1/conv2d_8_1/convolution/Cast:0 [96, 96, 3, 3]
94 92 contextual_residual_unet_1/conv2d_8_1/Squeeze:0 [96]
95 93 contextual_residual_unet_1/conv2d_7_1/convolution/Cast:0 [96, 64, 3, 3]
96 94 contextual_residual_unet_1/conv2d_7_1/Squeeze:0 [96]
97 95 contextual_residual_unet_1/conv2d_6_1/convolution/Cast:0 [96, 64, 1, 1]
98 96 contextual_residual_unet_1/conv2d_6_1/Squeeze:0 [96]
99 97 contextual_residual_unet_1/conv2d_5_1/convolution/Cast:0 [64, 64, 3, 3]
100 98 contextual_residual_unet_1/conv2d_5_1/Squeeze:0 [64]
101 99 contextual_residual_unet_1/conv2d_4_1/convolution/Cast:0 [64, 32, 3, 3]
102 100 contextual_residual_unet_1/conv2d_4_1/Squeeze:0 [64]
103 101 contextual_residual_unet_1/conv2d_3_1/convolution/Cast:0 [64, 32, 1, 1]
104 102 contextual_residual_unet_1/conv2d_3_1/Squeeze:0 [64]
105 103 contextual_residual_unet_1/conv2d_2_1/convolution/Cast:0 [32, 7, 3, 3]
106 104 contextual_residual_unet_1/conv2d_2_1/Squeeze:0 [32]
107 105 contextual_residual_unet_1/conv2d_26_1/convolution/ReadVariableOp:0 [3, 32, 3, 3]
108 106 contextual_residual_unet_1/conv2d_26_1/Squeeze:0 [3]
109 107 contextual_residual_unet_1/conv2d_25_1/convolution/Cast:0 [32, 32, 3, 3]
110 108 contextual_residual_unet_1/conv2d_25_1/Squeeze:0 [32]
111 109 contextual_residual_unet_1/conv2d_24_1/convolution/Cast:0 [32, 64, 3, 3]
112 110 contextual_residual_unet_1/conv2d_24_1/Squeeze:0 [32]
113 111 contextual_residual_unet_1/conv2d_23_1/convolution/Cast:0 [32, 64, 1, 1]
114 112 contextual_residual_unet_1/conv2d_23_1/Squeeze:0 [32]
115 113 contextual_residual_unet_1/conv2d_22_1/convolution/Cast:0 [1, 2, 7, 7]
116 114 contextual_residual_unet_1/conv2d_22_1/Reshape:0 [1]
117 115 contextual_residual_unet_1/conv2d_21_1/convolution/Cast:0 [64, 64, 3, 3]
118 116 contextual_residual_unet_1/conv2d_21_1/Squeeze:0 [64]
119 117 contextual_residual_unet_1/conv2d_20_1/convolution/Cast:0 [64, 128, 3, 3]
120 118 contextual_residual_unet_1/conv2d_20_1/Squeeze:0 [64]
121 119 contextual_residual_unet_1/conv2d_1_2/convolution/Cast:0 [64, 32, 3, 3]
122 120 contextual_residual_unet_1/conv2d_1_2/Squeeze:0 [64]
123 121 contextual_residual_unet_1/conv2d_19_1/convolution/Cast:0 [64, 128, 1, 1]
124 122 contextual_residual_unet_1/conv2d_19_1/Squeeze:0 [64]
125 123 contextual_residual_unet_1/conv2d_18_1/convolution/Cast:0 [1, 2, 7, 7]
126 124 contextual_residual_unet_1/conv2d_18_1/Reshape:0 [1]
127 125 contextual_residual_unet_1/conv2d_17_1/convolution/Cast:0 [96, 96, 3, 3]
128 126 contextual_residual_unet_1/conv2d_17_1/Squeeze:0 [96]
129 127 contextual_residual_unet_1/conv2d_16_1/convolution/Cast:0 [96, 192, 3, 3]
130 128 contextual_residual_unet_1/conv2d_16_1/Squeeze:0 [96]
131 129 contextual_residual_unet_1/conv2d_15_1/convolution/Cast:0 [96, 192, 1, 1]
132 130 contextual_residual_unet_1/conv2d_15_1/Squeeze:0 [96]
133 131 contextual_residual_unet_1/conv2d_14_1/convolution/Cast:0 [1, 2, 7, 7]
134 132 contextual_residual_unet_1/conv2d_14_1/Reshape:0 [1]
135 133 contextual_residual_unet_1/conv2d_13_1/convolution/Cast:0 [128, 128, 3, 3]
136 134 contextual_residual_unet_1/conv2d_13_1/Squeeze:0 [128]
137 135 contextual_residual_unet_1/conv2d_12_1/convolution/Cast:0 [128, 128, 3, 3]
138 136 contextual_residual_unet_1/conv2d_12_1/Squeeze:0 [128]
139 137 contextual_residual_unet_1/conv2d_11_1/convolution/Cast:0 [128, 128, 3, 3]
140 138 contextual_residual_unet_1/conv2d_11_1/Squeeze:0 [128]
141 139 contextual_residual_unet_1/conv2d_10_1/convolution/Cast:0 [128, 96, 3, 3]
142 140 contextual_residual_unet_1/conv2d_10_1/Squeeze:0 [128]
143 141 contextual_residual_unet_1/conv2d_1/convolution/Cast:0 [32, 7, 3, 3]
144 142 contextual_residual_unet_1/conv2d_1/Squeeze:0 [32]
145 143 contextual_residual_unet_1/conv2d_1/Gelu/add/x:0 []
146 144 contextual_residual_unet_1/context_embedding_1/Gelu/mul/x:0 []
147 145 contextual_residual_unet_1/context_embedding_1/Cast/Cast:0 [64, 128]
148 146 contextual_residual_unet_1/context_embedding_1/BiasAdd/Cast:0 [128]
149 147 const_fold_opt__1120 [4]
150 148 const_fold_opt__1119 [3]
151 149 const_fold_opt__1115 [5]
152 150 const_fold_opt__1114 [1]
153 151 const_fold_opt__1106 [1]
154 152 const_fold_opt__1104 [1]
155 153 const_fold_opt__1103 [5]
156 154 const_fold_opt__1100 [1]
157 155 const_fold_opt__1099 [3]
158 156 const_fold_opt__1091 [1]
159 157 const_fold_opt__1079 [1]
160 158 const_fold_opt__1077 [1]
161 159 const_fold_opt__1073 [4]
162 160 const_fold_opt__1072 [1]
163 161 const_fold_opt__1070__1578 [5]
164 162 const_fold_opt__1065 [5]
165 163 const_fold_opt__1063 [5]
166 164 const_fold_opt__1062 [5]
167 165 const_fold_opt__1059 [4]
168 166 const_fold_opt__1054 [4]
169 167 const_fold_opt__1049 [3]
170 168 const_fold_opt__1036 [5]
171 169 const_fold_opt__1034 [4]
172 170 const_fold_opt__1021 [5]
173 171 const_fold_opt__1015 [4]
174 172 const_ends__372 [1]
175 173 const_axes__508 [1]
176 174 const_axes__1131 [2]
177 175 ConstantFolding/contextual_residual_unet_1/context_embedding_1/Gelu/truediv_recip:0 []
178 176 Const__958 [4]
+25 -9
View File
@@ -406,26 +406,42 @@ class SBLoadModel:
# even if the relative path is somehow manipulated.
# ------------------------------------------------------------------
module_path = (model_dir / 'contextual_residual_unet_v4.py').resolve()
# Updated lightweight architecture lives in *_pt.py*
module_path = (model_dir / 'contextual_residual_unet_v4_pt.py').resolve()
allowed_root = model_dir.resolve()
if not str(module_path).startswith(str(allowed_root)):
raise RuntimeError("Blocked unsafe module import: path escapes plugin directory")
sys.path.append(str(model_dir))
spec = importlib.util.spec_from_file_location('contextual_residual_unet_v4', module_path)
spec = importlib.util.spec_from_file_location('contextual_residual_unet_v4_pt', module_path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module) # type: ignore
ContextualResidualUNetV4Torch = module.ContextualResidualUNetV4Torch
device_str = 'cuda' if device == 'GPU' and torch.cuda.is_available() else 'cpu'
# Attempt to locate the matching ONNX graph so the wrapper can rebuild
# the network topology deterministically.
# Prefer TorchScript if it exists next to the safetensors
base_no_ext = os.path.splitext(model_path)[0]
onnx_candidate = base_no_ext + '.onnx'
model_pt = ContextualResidualUNetV4Torch(onnx_candidate if os.path.isfile(onnx_candidate) else None)
state = safe_load(model_path, device=device_str)
model_pt.load_state_dict(state, strict=False)
model_pt.eval().to(device_str)
pt_path_candidates = [base_no_ext + '.pt', base_no_ext + '_scripted.pt']
pt_path = next((p for p in pt_path_candidates if os.path.isfile(p)), None)
if os.path.isfile(pt_path):
try:
model_pt = torch.jit.load(pt_path, map_location=device_str)
model_pt.eval()
except Exception as e:
raise RuntimeError(f"Failed to load TorchScript companion file {pt_path}: {e}")
else:
# Fall back to python architecture + direct state_dict load (legacy path)
model_pt = ContextualResidualUNetV4Torch()
state_in = safe_load(model_path, device='cpu')
try:
model_pt.load_state_dict(state_in, strict=True)
except Exception as e:
raise RuntimeError("Checkpoint did not match architecture and no .pt file found. "
"Convert the model to TorchScript to avoid mismatches.\n" + str(e))
model_pt.eval()
model_info = {
"model": model_pt,
+1
View File
@@ -0,0 +1 @@
index,name,shape
1 index name shape

Some files were not shown because too many files have changed in this diff Show More