Files
IxMxAMAR-ComfyUI-Utility-Me…/workflows/08_image_pro_value_ops.json
T
IxMxAMAR e8264f5abb templates: rebuild with corrected widget mapping
Investigation (Workflow trace of bundled ComfyUI frontend source) found three
real bugs in the previous regen:

1. widgets_values must be POSITIONAL — keep slots for widgets that have been
   converted to input sockets. In frontend >=1.16 widgets and sockets coexist
   (convertToInput is deprecated), so the widget object always stays in
   node.widgets and its slot in widgets_values is never removed. Skipping
   converted slots was the root cause of every shifted-value display
   (prompt text appearing in model field, NaN in numeric fields, etc).

2. ShowText was registered as 'ShowText' but pythongosssss's pack actually
   registers the class as 'ShowText|pysssss'. The bare name renders as a red
   missing-node box. Generator now emits the correct registered name.

3. Node height formula re-derived from the bundled litegraph computeSize():
   rows*20 + per-widget(20+4) + 8 trailing + 30 title + 6 footer, with
   multiline STRING widgets reserving ~100px each.

Bonus fix: validator now checks every COMBO widget value is in its choices
list (caught 100+ recipe-author typos), and the generator auto-substitutes
invalid values with the best match (case-insensitive, prefix, substring,
numeric coercion) instead of shipping invalid values.
2026-05-30 21:10:15 +05:30

269 lines
4.4 KiB
JSON

{
"last_node_id": 3,
"last_link_id": 2,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [
60,
60
],
"size": [
320,
108
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1
],
"slot_index": 0
},
{
"name": "MASK",
"type": "MASK",
"links": [],
"slot_index": 1
}
],
"properties": {
"recipe_id": "loader",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"example.png"
]
},
{
"id": 2,
"type": "UtilMegaPack_ImagePro",
"pos": [
460,
60
],
"size": [
320,
1052
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1
},
{
"name": "source",
"type": "IMAGE",
"link": null
},
{
"name": "reference",
"type": "IMAGE",
"link": null
},
{
"name": "background",
"type": "IMAGE",
"link": null
},
{
"name": "foreground",
"type": "IMAGE",
"link": null
},
{
"name": "mask",
"type": "MASK",
"link": null
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
2
],
"slot_index": 0
},
{
"name": "mask",
"type": "MASK",
"links": [],
"slot_index": 1
},
{
"name": "width",
"type": "INT",
"links": [],
"slot_index": 2
},
{
"name": "height",
"type": "INT",
"links": [],
"slot_index": 3
},
{
"name": "metadata_json",
"type": "STRING",
"links": [],
"slot_index": 4
}
],
"properties": {
"recipe_id": "proc",
"Node name for S&R": "UtilMegaPack_ImagePro"
},
"widgets_values": [
"levels",
"(use pack default)",
"",
"*.png",
"",
-1,
"randomize",
0,
0.0,
1.0,
1.0,
0.05,
0.95,
1.1,
4,
0.5,
1.0,
"normal",
1.0,
8,
2.0,
150,
4,
0.6,
0.2,
2,
2,
64,
0.0,
0.5,
30,
8,
16,
6,
8,
"high_frequency",
"swap_rgb_to_bgr",
5
]
},
{
"id": 3,
"type": "PreviewImage",
"pos": [
860,
60
],
"size": [
320,
56
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2
}
],
"outputs": [],
"properties": {
"recipe_id": "preview",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
}
],
"links": [
[
1,
1,
0,
2,
0,
"IMAGE"
],
[
2,
2,
0,
3,
0,
"IMAGE"
]
],
"groups": [
{
"title": "Input",
"bounding": [
35,
-1,
370,
194
],
"color": "#3F789E",
"font_size": 24,
"locked": false
},
{
"title": "Process",
"bounding": [
435,
-1,
370,
1138
],
"color": "#3F789E",
"font_size": 24,
"locked": false
},
{
"title": "Preview",
"bounding": [
835,
-1,
370,
142
],
"color": "#3F789E",
"font_size": 24,
"locked": false
}
],
"config": {},
"extra": {
"ds": {
"scale": 1.0,
"offset": [
0,
0
]
},
"description": "Adjust image black point, white point, and gamma using ImagePro's levels mode.",
"title": "MegaPack \u2014 ImagePro: Levels Adjustment",
"tier": 1,
"pack": "ComfyUI-Utility-MegaPack"
},
"version": 0.4
}