Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

ComfyUI library: VACE and VOID windows decode only the window and keep the clip's shape

Claude619d8c9cf1f0
diff --git a/scripts/comfy/hand-built/scene-mesh-moge.json b/scripts/comfy/hand-built/scene-mesh-moge.json
index d5c45381..03816cdf 100644
--- a/scripts/comfy/hand-built/scene-mesh-moge.json
+++ b/scripts/comfy/hand-built/scene-mesh-moge.json
@@ -23,14 +23,18 @@
"3": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a > 2048",
+ "expression": "max(a, b) > 2048",
"values.a": [
"2",
0
+ ],
+ "values.b": [
+ "2",
+ 1
]
},
"_meta": {
- "title": "Longer than 2048 px?"
+ "title": "Longer edge over 2048 px?"
}
},
"4": {
diff --git a/scripts/comfy/hand-built/video-erase-void.json b/scripts/comfy/hand-built/video-erase-void.json
index 868be735..d5be6128 100644
--- a/scripts/comfy/hand-built/video-erase-void.json
+++ b/scripts/comfy/hand-built/video-erase-void.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 45
- },
- "_meta": {
- "title": "Frames to process (frames; rounded down so (frames-1)/4+1 is even, e.g. 45, 53, 61 ... 197)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (8n+5 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 672,
- "height": 384,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; VOID trained at 672x384, multiples of 8)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -215,11 +200,17 @@
"11",
0
],
- "width": 672,
- "height": 384,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1
},
@@ -333,6 +324,18 @@
"title": "Pass 1 frames"
}
},
+ "30": {
+ "class_type": "GetImageSize",
+ "inputs": {
+ "image": [
+ "2",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Source size and frames decoded"
+ }
+ },
"40": {
"class_type": "OpticalFlowLoader",
"inputs": {
@@ -353,11 +356,17 @@
"26",
0
],
- "width": 672,
- "height": 384,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1
},
@@ -542,13 +551,13 @@
"title": "Save video"
}
},
- "60": {
+ "61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "3",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -556,44 +565,193 @@
]
},
"_meta": {
- "title": "Window start in seconds"
+ "title": "Window length in seconds"
}
},
- "61": {
+ "62": {
+ "class_type": "TrimAudioDuration",
+ "inputs": {
+ "audio": [
+ "2",
+ 1
+ ],
+ "start_index": 0,
+ "duration": [
+ "61",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The window's sound, as long as its frames (none for silent clips)"
+ }
+ },
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 197 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 197
+ },
+ "_meta": {
+ "title": "Frame cap per window (197 = VOID)"
+ }
+ },
+ "84": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a / b",
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
"values.a": [
- "4",
+ "82",
0
],
"values.b": [
- "2",
+ "81",
2
+ ],
+ "values.c": [
+ "83",
+ 0
]
},
"_meta": {
- "title": "Window length in seconds"
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
}
},
- "62": {
- "class_type": "TrimAudioDuration",
+ "85": {
+ "class_type": "Video Slice",
"inputs": {
- "audio": [
- "2",
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(5, floor((min(a, c) - 5) / 8) * 8 + 5)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 8n+5 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 672
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 384
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(8, floor(min(sqrt(a * b * c / d), 1024, 1024 * c / d) / 8) * 8)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 8, <= 1024)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(8, floor(min(sqrt(a * b * d / c), 1024, 1024 * d / c) / 8) * 8)",
+ "values.a": [
+ "87",
+ 0
],
- "start_index": [
- "60",
+ "values.b": [
+ "88",
0
],
- "duration": [
- "61",
+ "values.c": [
+ "30",
0
+ ],
+ "values.d": [
+ "30",
+ 1
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "Work height (multiple of 8, <= 1024)"
}
}
}
diff --git a/scripts/comfy/hand-built/video-inpaint-wan-vace-painted.json b/scripts/comfy/hand-built/video-inpaint-wan-vace-painted.json
index 09d26439..d4b08b83 100644
--- a/scripts/comfy/hand-built/video-inpaint-wan-vace-painted.json
+++ b/scripts/comfy/hand-built/video-inpaint-wan-vace-painted.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -241,11 +226,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -365,12 +356,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -524,30 +515,13 @@
"title": "Save video"
}
},
- "60": {
- "class_type": "ComfyMathExpression",
- "inputs": {
- "expression": "a / b",
- "values.a": [
- "3",
- 0
- ],
- "values.b": [
- "2",
- 2
- ]
- },
- "_meta": {
- "title": "Window start in seconds"
- }
- },
"61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "4",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -565,17 +539,14 @@
"2",
1
],
- "start_index": [
- "60",
- 0
- ],
+ "start_index": 0,
"duration": [
"61",
0
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
"70": {
@@ -608,12 +579,18 @@
0
],
"upscale_method": "bilinear",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "At the work size"
+ "title": "At the work size (scaled like the frames)"
}
},
"73": {
@@ -628,5 +605,174 @@
"_meta": {
"title": "First-frame mask"
}
+ },
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
+ "values.a": [
+ "82",
+ 0
+ ],
+ "values.b": [
+ "81",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
+ }
+ },
+ "85": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work height (multiple of 16, <= 1280)"
+ }
}
}
diff --git a/scripts/comfy/hand-built/video-inpaint-wan-vace.json b/scripts/comfy/hand-built/video-inpaint-wan-vace.json
index 9eac2fb4..15bb5c83 100644
--- a/scripts/comfy/hand-built/video-inpaint-wan-vace.json
+++ b/scripts/comfy/hand-built/video-inpaint-wan-vace.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -254,11 +239,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -378,12 +369,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -537,13 +528,13 @@
"title": "Save video"
}
},
- "60": {
+ "61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "3",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -551,44 +542,193 @@
]
},
"_meta": {
- "title": "Window start in seconds"
+ "title": "Window length in seconds"
+ }
+ },
+ "62": {
+ "class_type": "TrimAudioDuration",
+ "inputs": {
+ "audio": [
+ "2",
+ 1
+ ],
+ "start_index": 0,
+ "duration": [
+ "61",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
- "61": {
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a / b",
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
"values.a": [
- "4",
+ "82",
0
],
"values.b": [
- "2",
+ "81",
2
+ ],
+ "values.c": [
+ "83",
+ 0
]
},
"_meta": {
- "title": "Window length in seconds"
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
}
},
- "62": {
- "class_type": "TrimAudioDuration",
+ "85": {
+ "class_type": "Video Slice",
"inputs": {
- "audio": [
- "2",
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
],
- "start_index": [
- "60",
+ "values.b": [
+ "88",
0
],
- "duration": [
- "61",
+ "values.c": [
+ "30",
0
+ ],
+ "values.d": [
+ "30",
+ 1
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "Work height (multiple of 16, <= 1280)"
}
}
}
diff --git a/scripts/comfy/hand-built/video-insert-wan-vace.json b/scripts/comfy/hand-built/video-insert-wan-vace.json
index 8b9c88a6..6d508021 100644
--- a/scripts/comfy/hand-built/video-insert-wan-vace.json
+++ b/scripts/comfy/hand-built/video-insert-wan-vace.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"10": {
@@ -209,11 +194,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -337,12 +328,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -505,30 +496,13 @@
"title": "What to put in (image: object, product or character on a plain background)"
}
},
- "60": {
- "class_type": "ComfyMathExpression",
- "inputs": {
- "expression": "a / b",
- "values.a": [
- "3",
- 0
- ],
- "values.b": [
- "2",
- 2
- ]
- },
- "_meta": {
- "title": "Window start in seconds"
- }
- },
"61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "4",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -546,17 +520,14 @@
"2",
1
],
- "start_index": [
- "60",
- 0
- ],
+ "start_index": 0,
"duration": [
"61",
0
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
"70": {
@@ -589,12 +560,18 @@
0
],
"upscale_method": "bilinear",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "At the work size"
+ "title": "At the work size (scaled like the frames)"
}
},
"74": {
@@ -605,12 +582,181 @@
0
],
"amount": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
"title": "Same region in every frame"
}
+ },
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
+ "values.a": [
+ "82",
+ 0
+ ],
+ "values.b": [
+ "81",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
+ }
+ },
+ "85": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work height (multiple of 16, <= 1280)"
+ }
}
}
diff --git a/scripts/comfy/hand-built/video-swap-wan-vace.json b/scripts/comfy/hand-built/video-swap-wan-vace.json
index 4d660931..bc26009b 100644
--- a/scripts/comfy/hand-built/video-swap-wan-vace.json
+++ b/scripts/comfy/hand-built/video-swap-wan-vace.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -254,11 +239,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -382,12 +373,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -550,13 +541,13 @@
"title": "What to put in (image: object, product or character on a plain background)"
}
},
- "60": {
+ "61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "3",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -564,44 +555,193 @@
]
},
"_meta": {
- "title": "Window start in seconds"
+ "title": "Window length in seconds"
+ }
+ },
+ "62": {
+ "class_type": "TrimAudioDuration",
+ "inputs": {
+ "audio": [
+ "2",
+ 1
+ ],
+ "start_index": 0,
+ "duration": [
+ "61",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
- "61": {
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a / b",
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
"values.a": [
- "4",
+ "82",
0
],
"values.b": [
- "2",
+ "81",
2
+ ],
+ "values.c": [
+ "83",
+ 0
]
},
"_meta": {
- "title": "Window length in seconds"
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
}
},
- "62": {
- "class_type": "TrimAudioDuration",
+ "85": {
+ "class_type": "Video Slice",
"inputs": {
- "audio": [
- "2",
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
],
- "start_index": [
- "60",
+ "values.b": [
+ "88",
0
],
- "duration": [
- "61",
+ "values.c": [
+ "30",
0
+ ],
+ "values.d": [
+ "30",
+ 1
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "Work height (multiple of 16, <= 1280)"
}
}
}
diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjs
index 2fb78064..49119d64 100644
--- a/scripts/comfy/library.spec.mjs
+++ b/scripts/comfy/library.spec.mjs
@@ -2496,26 +2496,35 @@ export const SPEC = [
capability: 'remove-object',
handBuilt: 'hand-built/video-inpaint-wan-vace.json',
bindings: {
- video: [b('1', 'file')], startFrame: [b('3', 'value')], frames: [b('4', 'value')], width: [b('6', 'width'), b('19', 'width')], height: [b('6', 'height'), b('19', 'height')],
+ video: [b('1', 'file')], startTime: [b('85', 'start_time')], duration: [b('82', 'value')], width: [b('87', 'value')], height: [b('88', 'value')],
maskPrompt: [b('8', 'text')], maskGrow: [b('11', 'expand')], prompt: [b('16', 'text')], negativePrompt: [b('17', 'text')], checkpoint: [b('20', 'unet_name')],
loraStrength: [b('21', 'strength_model')], shift: [b('22', 'shift')], seed: [b('23', 'seed')], steps: [b('23', 'steps')], cfg: [b('23', 'cfg')],
},
outputs: [{ node: '38', kind: 'video' }],
defaults: { checkpoint: 'wan2.1_vace_14B_fp16.safetensors' },
- limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16, frameStep: 4 },
+ limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16 },
vramGb: 24,
license: 'Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); SAM 3.1 under Meta\'s SAM License (commercial use allowed under its terms); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)',
notes:
'maskPrompt = what to remove (SAM 3.1 text prompt, e.g. "the man in the red jacket"; up to 4 matching objects are tracked); prompt = the scene WITHOUT it. ' +
- 'One window per job: frames (4n+1, at most 81) from startFrame, both in SOURCE frames, because the graph runs at the clip\'s own fps (GetVideoComponents): the provider computes them with the fps of the clip\'s header, ' +
- 'not the 16 fps default. Longer clips: one job per window, joined with video-concat-N (seams between windows untested, inferred). ' +
- 'width x height = the work size VACE renders at (multiple of 16, 832x480 by default); give it the clip\'s shape (aspect ratio "auto"): the window is centre-cropped to it and the result is scaled back to the source size uncropped. ' +
+ 'One window per job, in SECONDS: startTime and duration (params.startTime and params.endTime - startTime, which the provider already fills). Video Slice decodes only that window, at most 81 frames + half a frame ' +
+ 'at the clip\'s own fps (read from a 0.1 s probe slice), so RAM no longer grows with the clip and one window needs no fps app side. The graph keeps the largest 4n+1 frames it decoded (at most 81: 2.7 s at 30 fps, ' +
+ '3.375 s at 24 fps, 5.06 s at 16 fps) and trims the sound to exactly those frames. duration 0 = the longest window; a longer duration is cut at 81 frames. ' +
+ 'Longer clips: one job per window, startTime = k x 81 / fps and duration = 81 / fps (fps from the clip\'s header), joined with video-concat-N (seams between windows untested, inferred). ' +
+ 'width x height = the work-size BUDGET (832x480 by default): VACE renders about width x height pixels in the CLIP\'s own shape (multiples of 16, at most 1280 a side; a 9:16 clip renders at 464x832), ' +
+ 'scaled, never cropped, so the paste-back lines up whatever aspect ratio the request had. ' +
'SAM3_VideoTrack follows the object through the window, GrowMask (maskGrow px) covers edges and contact shadows, the control video blanks the masked area (as Comfy-Org\'s video_wan_vace_inpainting template) ' +
'and WanVaceToVideo regenerates it. The result is pasted into the ORIGINAL frames at full resolution through a 6 px soft mask (GrowMaskWithBlur): every pixel outside the mask stays the source\'s own. ' +
- 'The window\'s sound is kept (silent clips work). Speed: the template\'s CausVid LoRA is CC-BY-NC-4.0, so this uses the Apache-2.0 lightx2v T2V 4-step LoRA (4 steps, cfg 1, euler, shift 5; ' +
+ 'The window\'s sound is kept (silent clips work). RAM: the window is held at the source size as float32 in several copies (decoded, cut, scaled back, pasted; ~25 MB per 1080p frame, ' +
+ 'so roughly 10 GB for 81 frames at 1080p, inferred): downscale 4K sources first. ' +
+ 'Changed from the research graph: the seconds-based window (the research bound startFrame / frames on the whole decoded clip and centre-cropped to width x height). ' +
+ 'Speed: the template\'s CausVid LoRA is CC-BY-NC-4.0, so this uses the Apache-2.0 lightx2v T2V 4-step LoRA (4 steps, cfg 1, euler, shift 5; ' +
'the pairing with VACE is inferred, not GPU-tested); loraStrength 0 + steps 20 + cfg 6 is the slow full-quality path. checkpoint wan2.1_vace_1.3B_fp16.safetensors (4.31 GB) fits 8 GB cards and needs loraStrength 0, steps 20, cfg 6 ' +
- '(no 4-step LoRA for 1.3B). No new download: every default file is already in the library. Validated by /prompt only (no GPU here); the window-and-sound part ' +
- '(ImageFromBatch + TrimAudioDuration at the clip\'s fps -> CreateVideo) ran on CPU on a clip with sound (the window\'s 0.84 s kept) and a silent one (no audio track, no error).',
+ '(no 4-step LoRA for 1.3B). No new download: every default file is already in the library. Validated by /prompt only (no GPU here). ' +
+ 'The window, sound and work-size nodes ran on CPU (the built graph\'s own nodes, VACE replaced by the work-size frames scaled back): an 8 s 360x640 30 fps clip with sound, ' +
+ 'startTime 1, duration 0 -> 81 frames, 2.700 s of picture and 2.700 s of sound, rendered at 464x832 and back, matching source frames 30-110 (27.2 dB PSNR at offset 0 vs 19 dB one frame off; ' +
+ 'the research graph\'s centre crop gave 16.4 dB at every offset, i.e. misplaced); startTime 2, duration 1 -> 29 frames, 0.967 s of both; startTime and duration 81/30 -> frames 81-161; ' +
+ 'a silent clip -> 81 frames, no sound track, no error; a 60 s clip, window at 50 s: 0.6 s instead of 2.6 s with the whole-clip decode.',
},
{
id: 'video-inpaint-wan-vace-painted',
@@ -2523,20 +2532,22 @@ export const SPEC = [
capability: 'remove-object',
handBuilt: 'hand-built/video-inpaint-wan-vace-painted.json',
bindings: {
- video: [b('1', 'file')], mask: [b('70', 'image')], startFrame: [b('3', 'value')], frames: [b('4', 'value')],
- width: [b('6', 'width'), b('19', 'width'), b('72', 'width')], height: [b('6', 'height'), b('19', 'height'), b('72', 'height')],
+ video: [b('1', 'file')], mask: [b('70', 'image')], startTime: [b('85', 'start_time')], duration: [b('82', 'value')],
+ width: [b('87', 'value')], height: [b('88', 'value')],
maskGrow: [b('11', 'expand')], prompt: [b('16', 'text')], negativePrompt: [b('17', 'text')], checkpoint: [b('20', 'unet_name')],
loraStrength: [b('21', 'strength_model')], shift: [b('22', 'shift')], seed: [b('23', 'seed')], steps: [b('23', 'steps')], cfg: [b('23', 'cfg')],
},
outputs: [{ node: '38', kind: 'video' }],
defaults: { checkpoint: 'wan2.1_vace_14B_fp16.safetensors' },
- limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16, frameStep: 4 },
+ limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16 },
vramGb: 24,
license: 'Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); SAM 3.1 under Meta\'s SAM License (commercial use allowed under its terms); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)',
notes:
- 'mask = a PNG of the window\'s FIRST frame, read from the red channel: white = the object to remove, black = keep (the clip\'s shape; it is scaled to the work size like the frames). ' +
+ 'mask = a PNG of the window\'s FIRST frame, read from the red channel: white = the object to remove, black = keep (in the clip\'s shape). ' +
'SAM3_VideoTrack takes it as initial_mask and tracks the object through the window. Changed from the research graph: the mask is read from the red channel (Fuobe\'s mask convention, as flux1-fill-inpaint) instead of alpha. ' +
- 'Everything else as video-inpaint-wan-vace: windows of frames (4n+1, at most 81) from startFrame in source frames, width x height in the clip\'s shape, paste-back into the original frames, the window\'s sound kept. ' +
+ 'The mask is scaled to the work size like the frames (not cropped), so any PNG size lines up. ' +
+ 'Everything else as video-inpaint-wan-vace: windows in seconds (startTime, duration; at most 81 frames, the largest 4n+1 decoded), width x height = the work-size budget in the clip\'s shape, ' +
+ 'paste-back into the original frames, the window\'s sound kept. ' +
'For a window after the first, the mask must be painted on (or tracked to) that window\'s first frame. Validated by /prompt only (no GPU here).',
},
{
@@ -2545,12 +2556,13 @@ export const SPEC = [
capability: 'remove-object',
handBuilt: 'hand-built/video-erase-void.json',
bindings: {
- video: [b('1', 'file')], startFrame: [b('3', 'value')], frames: [b('4', 'value')], width: [b('6', 'width'), b('19', 'width'), b('41', 'width')],
- height: [b('6', 'height'), b('19', 'height'), b('41', 'height')], maskPrompt: [b('8', 'text')], maskGrow: [b('11', 'expand')], prompt: [b('16', 'text')],
+ video: [b('1', 'file')], startTime: [b('85', 'start_time')], duration: [b('82', 'value')], width: [b('87', 'value')],
+ height: [b('88', 'value')], maskPrompt: [b('8', 'text')], maskGrow: [b('11', 'expand')], prompt: [b('16', 'text')],
negativePrompt: [b('17', 'text')], cfg: [b('21', 'cfg'), b('44', 'cfg')], steps: [b('22', 'steps'), b('45', 'steps')], seed: [b('24', 'noise_seed')], skipPass2: [b('49', 'value')],
},
outputs: [{ node: '52', kind: 'video' }],
- limits: { maxFrames: 197, dimensionMultiple: 8 },
+ defaults: { skipPass2: false },
+ limits: { maxWidth: 1024, maxHeight: 1024, maxFrames: 197, dimensionMultiple: 8 },
vramGb: 40,
license:
'VOID weights Apache-2.0 (netflix/void-model), BUT fine-tuned from CogVideoX-Fun-V1.5-5b-InP, whose 5B transformer is under the CogVideoX License: free for academic research; commercial use only after ' +
@@ -2559,12 +2571,17 @@ export const SPEC = [
notes:
'The premium removal: VOID also removes what the object causes (shadows, reflections, objects it holds falling). Comfy-Org template utility_void_video_inpainting (2026-05-14), flattened, ' +
'with SAM3_VideoTrack (maskPrompt) instead of per-frame SAM3_Detect. The binary mask goes straight into VOIDInpaintConditioning (1 = remove) as in the template; VOIDQuadmaskPreprocess is only for VOID\'s own 4-level quadmasks. ' +
- 'frames is rounded down by the node so the latent length is even: 45, 53, 61 ... 197 (8n+5), counted in source frames from startFrame like the VACE graphs. ' +
- 'Output = the work size (672x384 by default, VOID\'s training size; multiples of 8), not the source size: the whole frame is re-rendered, so upscale afterwards if needed. The window\'s sound is kept. ' +
+ 'Window in seconds like the VACE graphs (startTime, duration; Video Slice decodes only the window, at most 197 frames + half a frame at the clip\'s fps): the graph keeps the largest 8n+5 frames it decoded ' +
+ '(45, 53 ... 197: an even latent length, which VOIDInpaintConditioning / VOIDWarpedNoise would otherwise round down to) and trims the sound to exactly those frames, so picture and sound stay the same length. ' +
+ 'duration 0 = the longest window (197 frames, 7.9 s at 25 fps); windows of 197 / fps seconds tile a longer clip. ' +
+ 'Output = the work size, not the source size: width x height is the budget (672x384 by default, VOID\'s training size) in the CLIP\'s shape (multiples of 8, at most 1024 a side; 672x376 for 16:9, 376x672 for 9:16), ' +
+ 'scaled, never cropped: the whole frame is re-rendered, so upscale afterwards if needed. The window\'s sound is kept. ' +
'Pass 2 re-samples with noise warped along pass 1\'s optical flow (RAFT) for steadier long clips; skipPass2 true halves the time (pass 1 "is sufficient for most videos" per Netflix\'s card). ' +
'The switch is lazy, so pass 2 does not run then, but void_pass2 and the RAFT file must still be installed (/prompt checks every loader that feeds the output). ' +
'Downloads 32.5 GB: 2 x 11.14 GB passes, T5-XXL fp16 9.79 GB (the same file as FLUX\'s t5xxl_fp16), CogVideoX VAE 0.43 GB, RAFT 0.02 GB. ' +
- 'VRAM in ComfyUI is unverified: Netflix\'s reference code needs 40 GB+, a 24 GB card with offloading is plausible (inferred). Validated by /prompt only (no GPU here).',
+ 'VRAM in ComfyUI is unverified: Netflix\'s reference code needs 40 GB+, a 24 GB card with offloading is plausible (inferred). Validated by /prompt only (no GPU here). ' +
+ 'Changed from the research graph: the seconds-based window, the in-graph 8n+5 count and the aspect-keeping work size (the research bound startFrame / frames and centre-cropped). ' +
+ 'The window and work-size nodes ran on CPU: a 10 s 640x360 25 fps clip with sound, startTime 0.5, duration 0 -> 197 frames at 672x376, 7.880 s of picture and of sound; duration 2 -> 45 frames, 1.800 s of both.',
},
{
id: 'video-swap-wan-vace',
@@ -2572,19 +2589,19 @@ export const SPEC = [
capability: 'video-swap',
handBuilt: 'hand-built/video-swap-wan-vace.json',
bindings: {
- video: [b('1', 'file')], image: [b('40', 'image')], startFrame: [b('3', 'value')], frames: [b('4', 'value')], width: [b('6', 'width'), b('19', 'width')], height: [b('6', 'height'), b('19', 'height')],
+ video: [b('1', 'file')], image: [b('40', 'image')], startTime: [b('85', 'start_time')], duration: [b('82', 'value')], width: [b('87', 'value')], height: [b('88', 'value')],
maskPrompt: [b('8', 'text')], maskGrow: [b('11', 'expand')], prompt: [b('16', 'text')], negativePrompt: [b('17', 'text')], checkpoint: [b('20', 'unet_name')],
loraStrength: [b('21', 'strength_model')], shift: [b('22', 'shift')], seed: [b('23', 'seed')], steps: [b('23', 'steps')], cfg: [b('23', 'cfg')],
},
outputs: [{ node: '38', kind: 'video' }],
defaults: { checkpoint: 'wan2.1_vace_14B_fp16.safetensors' },
- limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16, frameStep: 4 },
+ limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16 },
vramGb: 24,
license: 'Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); SAM 3.1 under Meta\'s SAM License (commercial use allowed under its terms); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)',
notes:
'Genjutsu "Object Swap" on the open engine. maskPrompt = what to replace (the tracked mask, as video-inpaint-wan-vace); image = the new object, product or character, best cut out on a plain or white background ' +
'(bg-remove-birefnet); prompt describes the result. The reference goes to WanVaceToVideo.reference_image (one extra latent frame that TrimVideoLatent drops) and the masked area is regenerated following the original motion. ' +
- 'One image: with several references the provider sends the first (or a collage). Window rules (frames 4n+1 <= 81 from startFrame in source frames, width x height in the clip\'s shape), the paste-back into the original frames ' +
+ 'One image: with several references the provider sends the first (or a collage). Window rules (startTime / duration in seconds, at most 81 frames; width x height = the work-size budget in the clip\'s shape), the paste-back into the original frames ' +
'and the kept sound are as video-inpaint-wan-vace. For a whole person, SCAIL-2 Character Replacement (template video_wan21_scail2_character_replacement) keeps the body motion better (not built). Validated by /prompt only (no GPU here).',
},
{
@@ -2593,21 +2610,21 @@ export const SPEC = [
capability: 'video-insert',
handBuilt: 'hand-built/video-insert-wan-vace.json',
bindings: {
- video: [b('1', 'file')], image: [b('40', 'image')], mask: [b('70', 'image')], startFrame: [b('3', 'value')], frames: [b('4', 'value')],
- width: [b('6', 'width'), b('19', 'width'), b('72', 'width')], height: [b('6', 'height'), b('19', 'height'), b('72', 'height')],
+ video: [b('1', 'file')], image: [b('40', 'image')], mask: [b('70', 'image')], startTime: [b('85', 'start_time')], duration: [b('82', 'value')],
+ width: [b('87', 'value')], height: [b('88', 'value')],
maskGrow: [b('11', 'expand')], prompt: [b('16', 'text')], negativePrompt: [b('17', 'text')], checkpoint: [b('20', 'unet_name')],
loraStrength: [b('21', 'strength_model')], shift: [b('22', 'shift')], seed: [b('23', 'seed')], steps: [b('23', 'steps')], cfg: [b('23', 'cfg')],
},
outputs: [{ node: '38', kind: 'video' }],
defaults: { checkpoint: 'wan2.1_vace_14B_fp16.safetensors' },
- limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16, frameStep: 4 },
+ limits: { maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16 },
vramGb: 24,
license: 'Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)',
notes:
- 'mask = the region where the new object should appear, a PNG in the clip\'s shape read from the red channel (white = the region, black = keep); it is held for every frame of the window (RepeatImageBatch), ' +
+ 'mask = the region where the new object should appear, a PNG in the clip\'s shape read from the red channel (white = the region, black = keep), scaled (not cropped) to the work size; it is held for every frame of the window (RepeatImageBatch), ' +
'so it suits a static or slow camera (without the repeat WanVaceToVideo would pad a one-frame mask with 1 = generate and regenerate the whole clip). image = the object (best cut out on white); ' +
'prompt = what appears where and what it does. No SAM. Changed from the research graph: the mask is read from the red channel (Fuobe\'s mask convention) instead of alpha. ' +
- 'Window rules, paste-back and the kept sound as video-inpaint-wan-vace. Validated by /prompt only (no GPU here).',
+ 'Window rules (startTime / duration in seconds, at most 81 frames), the work-size budget, paste-back and the kept sound as video-inpaint-wan-vace. Validated by /prompt only (no GPU here).',
},
// ---- Faceless "Frame by frame": Ken Burns over a still ------------------------------
@@ -2695,7 +2712,8 @@ export const SPEC = [
'params.format -> format (+ profile): prores_422_hq -> video/ProRes + hq; prores_4444 -> video/ProRes + 4444 (also lt, standard, 4444xq); h265_10bit -> video/h265-mp4 (pix_fmt yuv420p10le, its first option); ' +
'ffv1 -> video/ffv1-mkv (lossless, rgba64le); h264 -> video/h264-mp4; exr -> video-export-exr. VHS falls back to each format widget\'s default when an input is missing, and adds profile only for ProRes. ' +
'VHS writes <prefix>_00001.<ext> (.mov ProRes, .mp4 H.264/H.265, .mkv FFV1; no sound) and, when the clip has sound, <prefix>_00001-audio.<ext>, the only file the history lists (under "gifs"); ' +
- 'it also leaves a first-frame .png next to them. ' +
+ 'it also leaves a first-frame .png next to them. Storage: /view serves .mkv as video/x-matroska, which storage.ts has no extension for, so an FFV1 export is saved as <id>.bin (kind video) until ' +
+ 'EXT_BY_TYPE / TYPE_BY_EXT know mkv (feature package). ' +
'Decodes the whole clip (GetVideoComponents): RAM grows with the length. ' +
'Ran here (CPU, two sessions, a 1 s 64x64 16 fps clip with AAC sound, 0.16-0.4 s each, checked with ffprobe): ProRes HQ .mov yuv444p10le + pcm_s16le; ProRes 4444 yuv444p12le; h265-mp4 HEVC Main 10 yuv420p10le + AAC; ' +
'ffv1-mkv gbrap16le + FLAC; h264-mp4 High yuv420p + AAC; 16 frames and 1.000 s in every file; bt709 tags (FFV1: gbr matrix, sRGB transfer, bt709 primaries).',
@@ -2726,7 +2744,8 @@ export const SPEC = [
license: 'n/a (no model; ComfyUI core)',
notes:
'params.format "exr" of the export-video operation. One half-float .exr per frame (role frames, in frame order); input_color_space sRGB applies the inverse sRGB curve, so the files are scene-linear Rec.709. ' +
- 'The app zips the sequence. No sound. Decodes the whole clip: RAM grows with the length. ' +
+ 'The app zips the sequence. No sound. Decodes the whole clip: RAM grows with the length. Storage: /view serves .exr as image/aces, which storage.ts has no extension for, ' +
+ 'so each frame is saved as an image .bin until EXT_BY_TYPE / TYPE_BY_EXT know exr (feature package; the zip is the deliverable anyway). ' +
'Ran here (CPU, two sessions, 1 s 64x64 16 fps clip, 0.06-0.2 s): 16 .exr files (<prefix>_00001.exr ...), HALF B/G/R channels, ZIP compression, linear transfer.',
},
@@ -2787,7 +2806,8 @@ export const SPEC = [
license: 'MIT (microsoft/MoGe 2 and 3, Comfy-Org/MoGe repack)',
notes:
'Cinema Studio "Create 3D scene": photo -> textured GLB of the WHOLE frame (role scene) + a depth PNG (role depth). From the official template 3d_moge_perspective_to_mesh (2026-05-15): normal-map previews dropped, the depth PNG added; ' +
- 'images over 2048 px are resized first. The browser orbits the GLB, captures a view, and qwen-image-edit-2511 re-renders it with the original photo. ' +
+ 'images with a longer edge over 2048 px are resized to 2048 first (changed from the research graph, which tested the width only, so tall portraits went through at full size; checked on CPU: ' +
+ '1536x3000 -> 1048x2048, 3000x1536 -> 2048x1048, 1024x768 unchanged). The browser orbits the GLB, captures a view, and qwen-image-edit-2511 re-renders it with the original photo. ' +
'resolutionLevel 0-9 (detail), fovX = horizontal field of view in degrees (0 = estimate), decimation 2 for phones (about 4x fewer triangles, inferred). ' +
'checkpoint moge_2_vitl_normal_fp16 (0.66 GB) by default; moge_3_vitl_fp16 (0.74 GB) and moge_3_vitg_fp16 (2.50 GB) load through the same node. ' +
'Research run on the 4-core CPU: a 768x768 living-room photo became a 25.2 MB GLB (556k vertices, 1.08M triangles, one texture, depth 0.35-6.58 m) in 42 s, +1.6 GB RSS. VRAM unverified (MoGe 2 ViT-L is ~0.33B parameters). ' +
@@ -2803,7 +2823,7 @@ export const SPEC = [
seed: [b('88:6', 'seed'), b('88:55', 'seed')], splatFormat: [b('92', 'format')], orbitFrames: [b('75', 'frames')],
},
outputs: [{ node: '51', kind: 'model3d', role: 'splat' }, { node: '42', kind: 'video', role: 'turntable' }],
- defaults: { splatFormat: 'spz' },
+ defaults: { splatFormat: 'spz', cutout: true },
limits: { maxGaussians: 1048576 },
vramGb: 8,
license:
@@ -2813,6 +2833,9 @@ export const SPEC = [
'Subject or product splat (3D Angles, 3D Jutsu props, a splat alternative to TRELLIS.2 spins). The official template 3d_triposplat_image_to_gaussian_splat (2026-06-02) with the UI-only live-preview patch removed ' +
'and a 75-frame H.264 orbit (RenderSplat + CreateCameraInfo orbit yaw 35, pitch 30, distance 2.5; role turntable, 25 fps). Subject only: BiRefNet cuts it out first (cutout false = use the image\'s own alpha). ' +
'Output 1 (role splat): splatFormat spz (Niantic, gzip, ~10x smaller, base colour), ply (full spherical harmonics) or ksplat, saved by SaveGLB under that extension (meta.format = the extension). ' +
+ 'Storage: ComfyUI\'s /view serves all three as application/octet-stream (Python mimetypes knows none), so persistOutput falls back to the extension: storage.ts maps spz / ply to model/x-spz / model/ply ' +
+ '(added by catalog-4) and so kind model3d, but ksplat has no mapping and lands as an image .bin; collectOutputs sets only meta.role, so the provider sets meta.format (and a contentType for ksplat). ' +
+ 'cutout is true by default (manifest defaults). ' +
'numGaussians up to 1,048,576 (262,144 by default); seed drives both the sampler and the decoder. RenderSplat also takes a look_at camera, so a view picked in the browser can be rendered on the server. ' +
'3.78 GB of weights (TripoSplat 0.74, DINOv3 ViT-H 1.68, TripoSplat VAE decoder 0.58, FLUX.2 VAE 0.34, BiRefNet 0.44). VRAM unverified. Validated by /prompt only.',
},
diff --git a/scripts/comfy/validate-workflows.mjs b/scripts/comfy/validate-workflows.mjs
index dd8d1d6c..0b29d209 100644
--- a/scripts/comfy/validate-workflows.mjs
+++ b/scripts/comfy/validate-workflows.mjs
@@ -105,6 +105,8 @@ function sampleValue(key, entry, uploads) {
}
const DUMMY_LORAS = { loraHigh: 'fuobe_validate_lora_high.safetensors', loraLow: 'fuobe_validate_lora_low.safetensors', lora: 'fuobe_validate_lora.safetensors' };
+// Loader inputs whose combo lists the server's input folder (the same loaders build-library.mjs requires a binding for).
+const UPLOAD_INPUTS = { LoadImage: 'image', LoadImageMask: 'image', LoadVideo: 'file', VHS_LoadVideo: 'video', LoadAudio: 'audio', VHS_LoadAudioUpload: 'audio' };
function ensureDummy(folder, file, created) {
const p = path.join(MODELS_DIR, folder, file);
@@ -250,6 +252,17 @@ async function main() {
const prevSubset = readJson(path.join(OUT_DIR, 'object_info.subset.json'), {});
const subset = {};
for (const c of [...classes].sort()) subset[c] = objectInfo[c] || prevSubset[c] || null;
+ // Upload combos list whatever the server's input folder holds right now (other sessions' uploads too):
+ // keep only the validation fixtures, so the file does not change with the server's state.
+ const fixtures = new Set(Object.values(uploads));
+ for (const [cls, inp] of Object.entries(UPLOAD_INPUTS)) {
+ const def = subset[cls] && JSON.parse(JSON.stringify(subset[cls]));
+ const spec = def?.input?.required?.[inp] ?? def?.input?.optional?.[inp];
+ if (!spec) continue;
+ if (Array.isArray(spec[0])) spec[0] = spec[0].filter((o) => fixtures.has(o));
+ else if (Array.isArray(spec[1]?.options)) spec[1].options = spec[1].options.filter((o) => fixtures.has(o));
+ subset[cls] = def;
+ }
writeJson(path.join(OUT_DIR, 'object_info.subset.json'), subset);
writeJson(manifestPath, manifest);
diff --git a/scripts/comfy/validation-state.json b/scripts/comfy/validation-state.json
index 3ef5d28b..042e2067 100644
--- a/scripts/comfy/validation-state.json
+++ b/scripts/comfy/validation-state.json
@@ -3,13 +3,13 @@
"sha256": "f18c08cd22f37ccadb81cf557c4624e894c71dd718685e7b3030c92c9893be6a",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:06.665Z"
+ "at": "2026-10-23T00:12:21.245Z"
},
"audio-loop-crossfade": {
"sha256": "97a181dd41506ca676dd88cb238da5e7871ce7101b74186991e4be33a0a2654c",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:05.393Z"
+ "at": "2026-10-23T00:12:21.235Z"
},
"audio-timeline": {
"sha256": "b483019231d6add28874dc3c835a85726eaccdaf0c1d60c0d2f0431159a7711a",
@@ -33,7 +33,7 @@
"sha256": "8bb4d7bca5145d94ee1d509e50e23ef40e4cd21cb7c152bbba32751eca4ea013",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:26.274Z"
+ "at": "2026-10-23T00:12:16.404Z"
},
"captions-qwen3-asr": {
"sha256": "75286c2efad353c7285df2eea90782db99e7b7e994adeeaaf242a2e70c790bf7",
@@ -69,7 +69,7 @@
"sha256": "62de41ccfa9c0fcce1599c8f5f712b983e767800af5b73a4e06cb71a1aa649ea",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:25.995Z"
+ "at": "2026-10-23T00:12:12.541Z"
},
"flux1-fill-inpaint": {
"sha256": "1805c40665be21f24ac3f48c9bb5f3a8a901ac4e8ac3f75578d1f66bd83a5bbb",
@@ -165,13 +165,13 @@
"sha256": "7bfa7ebe14aa128a4b9b513e653998c5293ddc9221ca1d668191d27dc52725f6",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:26.415Z"
+ "at": "2026-10-23T00:12:16.834Z"
},
"image-to-splat-triposplat": {
"sha256": "cb65f4660b4d5fef3c0544146ed51b7d3acf059f3190a102dccf8166908f5413",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:40.971Z"
+ "at": "2026-10-23T00:12:21.310Z"
},
"infinitetalk-native": {
"sha256": "816327852679ebc006a3842668c35a0c9127f724690abc4d58d7e820d2cf0de5",
@@ -195,7 +195,7 @@
"sha256": "83a7470b9574b0e297e0fc2c8e1eb3e280f0bf77784f397b4f01516f8f18604e",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:26.098Z"
+ "at": "2026-10-23T00:12:15.716Z"
},
"interpolate-rife-vfi": {
"sha256": "bec30ae2655d256ad465f02fb5249b7a6ec08c57cd3d6ca2f5425428f1f6f95c",
@@ -207,7 +207,7 @@
"sha256": "34c5bdc4b0a425d82b5971ca31eae697da6b7363ea48b30dfe055d7a8573976d",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:05.238Z"
+ "at": "2026-10-23T00:12:21.225Z"
},
"layers-qwen-image-layered": {
"sha256": "7e8aae04b028f3e0000ca59ab953c4af5be0a1a65f734481d8162179d6cc9e77",
@@ -273,7 +273,7 @@
"sha256": "2cc591a75dbc160f91475e1f0e06c4a6a321adf6ad3a90b92648eea456322705",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:02.691Z"
+ "at": "2026-10-23T00:12:19.538Z"
},
"palette-transfer-image": {
"sha256": "3287bd729386b870c9797679512d46526e17e66b09736029ca55867c6670e43f",
@@ -333,7 +333,7 @@
"sha256": "4c941f187a7278ba7996e2d30c3ac65b295472b05b746958d1e87294f18ec1ef",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:09.261Z"
+ "at": "2026-10-23T00:12:21.322Z"
},
"relight-qwen-edit-2509": {
"sha256": "06aa8787ebbc6fd40a4e95b3040a748c4544598ee7b795530c0e90e841a96ac8",
@@ -348,10 +348,10 @@
"at": "2026-10-16T23:33:15.071Z"
},
"scene-mesh-moge": {
- "sha256": "23eb02752b1e13077b037faeeef57de4b2959d3000ae4e9eaa50411f70bc0df3",
+ "sha256": "5557989f94b8b498adbfc576b7b85a54be71892de14180a8aa7e607e90137c8e",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:07.669Z"
+ "at": "2026-10-23T00:12:21.301Z"
},
"sdxl-t2i": {
"sha256": "ae16cc9b74193179da08136571719871c3e31e2abacf5297985657c2fe5e9fbf",
@@ -411,7 +411,7 @@
"sha256": "cd21914faa22195c7cf3fd4346c20ba1306d434bf565456ac6bfaa24743d08e3",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:07.304Z"
+ "at": "2026-10-23T00:12:21.280Z"
},
"storyboard-qwen-edit-2509-next-scene": {
"sha256": "779d2a53bb5d45cfad1fe9da71e9258b4cf04af0036ae4708d74cc3788938106",
@@ -447,7 +447,7 @@
"sha256": "0cbdf80883b7249dda9128050fc9c4f3c3df414b3cb3283bc057f389251fa010",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:26.313Z"
+ "at": "2026-10-23T00:12:16.529Z"
},
"tryon-flux2-klein-4b": {
"sha256": "3e697e48a436c9340b26524a1303c1c13a300d116ecab604e3981dbebd9195ef",
@@ -513,7 +513,7 @@
"sha256": "2b3f625be7e9c9356384f601edaca89f582bc4c1315e9f8d449b3cf2d7e08c8c",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:07.490Z"
+ "at": "2026-10-23T00:12:21.293Z"
},
"video-bg-remove-birefnet": {
"sha256": "08da8d310a04add6eb729fb67f3a82b63b0a806368ce49fc498dfe6aeb58c83e",
@@ -549,7 +549,7 @@
"sha256": "70ed1a9d7d25e3022e0289e8c1c4db3a6471e616201e3c1575150ce68cfef108",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:26.125Z"
+ "at": "2026-10-23T00:12:15.938Z"
},
"video-concat-sound1-3": {
"sha256": "fde35477afe1883be1078a91cb0d1fda6548d9aefec2a78c74fc63c3a9a7dec0",
@@ -594,22 +594,22 @@
"at": "2026-10-16T23:33:22.128Z"
},
"video-erase-void": {
- "sha256": "6a2f22e04b9427b587f5e61a826c35b15aba351e11e556c94eb8d84482407e6b",
+ "sha256": "667f8b59d931311b5081e2407ef53aee0b39a36007cf838ba18b64d5d2681bdc",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:40.640Z"
+ "at": "2026-10-23T00:12:20.436Z"
},
"video-export-exr": {
"sha256": "59de86f898829c9ed60d059d038e3a5b3f5df8fdd675a76579eacaae1526c6a8",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:07.142Z"
+ "at": "2026-10-23T00:12:21.270Z"
},
"video-export-pro": {
"sha256": "94b6ad366376bad9348ddd79e137b012bed54184e7d269cb66952cee5c1d6ca4",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:06.854Z"
+ "at": "2026-10-23T00:12:21.253Z"
},
"video-extend-wan22-fun-vace": {
"sha256": "c6e30d4d5acf5d3d97c59fe02194e4b80fc21278ea0e946547060b80efd70ae0",
@@ -618,22 +618,22 @@
"at": "2026-10-16T23:33:13.889Z"
},
"video-inpaint-wan-vace": {
- "sha256": "2ec20430ca30fed0354cd00f9a87679073162c3a6cafe9292ab08b8b318ff4fc",
+ "sha256": "71aaa43c8ac4bb0a764a9a835d96d1c47b33244f741611c7036ebea8ffcef3a7",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:03.404Z"
+ "at": "2026-10-23T00:12:19.803Z"
},
"video-inpaint-wan-vace-painted": {
- "sha256": "b5528dfa2ebd1d21ee8576071d905fd862a97c0b1c3aded5117c0a32a083727d",
+ "sha256": "2563d3d6a4ecac8d21d7831324eb4c0e93797afce58eaed71015bca3aa7549ab",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:03.638Z"
+ "at": "2026-10-23T00:12:20.124Z"
},
"video-insert-wan-vace": {
- "sha256": "713f6c7ac94738c043abc035babfe9afac045a902b7d230152be51d4c37f1df4",
+ "sha256": "5f57a143e6b2357badf59ebaa3d6d5c834c03330dee79f8af96d9b2307b5be24",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:05.062Z"
+ "at": "2026-10-23T00:12:21.209Z"
},
"video-mux-audio": {
"sha256": "68af795bae0c0e89749819173916044e4024a6ce3035f830b48c80e0b6899181",
@@ -669,7 +669,7 @@
"sha256": "f51f27af77dd2f61d51553241b15f6b5af14e6c06ff3342b24e810dff3e87f93",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:07.018Z"
+ "at": "2026-10-23T00:12:21.261Z"
},
"video-segment-resample": {
"sha256": "957899bf0bd99a4bf9e2407a6149392eccc2ee6d8338088809992025e4d4b45d",
@@ -678,16 +678,16 @@
"at": "2026-10-17T21:02:01.523Z"
},
"video-swap-wan-vace": {
- "sha256": "47d216d2c2237d0c422c31be82c6af53b12b9e8e2b7a7e9466755b8a17720c41",
+ "sha256": "717e31d787cd715e09c343d321c4106277fa41e76c896c54453fe0d49dbe050c",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:04.932Z"
+ "at": "2026-10-23T00:12:20.787Z"
},
"video-trim": {
"sha256": "7c611e027051c751670b1716031b6bbe61e21d5db990410fde4d7a54994815e8",
"validated": true,
"error": null,
- "at": "2026-10-17T21:29:21.076Z"
+ "at": "2026-10-23T00:12:16.143Z"
},
"voice-change-chatterbox": {
"sha256": "ad8b9d59f8cb4632f2859db6a0ee2e8b6114263a9507f144554cd827ceea3f0c",
@@ -705,7 +705,7 @@
"sha256": "c78c05dc0d19131b8ccbc40aebff19323d0c7de70f6d93a4aeb2e76773637e27",
"validated": true,
"error": null,
- "at": "2026-10-22T23:20:02.570Z"
+ "at": "2026-10-23T00:12:15.574Z"
},
"wan22-flf2v-14b": {
"sha256": "8fe5dfa9f3705bdc640960bc8fdb7d4fe28a2cf21e9c942a28c90d1dcc8c4e11",
@@ -735,7 +735,7 @@
"sha256": "344df9a302da8ec9afe0bcd6606e241f7e4f301bb337d78987d7030edf6b68ba",
"validated": true,
"error": null,
- "at": "2026-10-22T23:27:26.063Z"
+ "at": "2026-10-23T00:12:12.945Z"
},
"wan22-i2v-14b-lora": {
"sha256": "95908d67a56cb8eb7db7e7fc36047b5480b416e9a1a6a5712da691daf9cfe000",
diff --git a/src/lib/comfy.ts b/src/lib/comfy.ts
index 2baabb25..0c4f585b 100644
--- a/src/lib/comfy.ts
+++ b/src/lib/comfy.ts
@@ -87,7 +87,7 @@ export interface ManifestWorkflow {
source: string;
bindings: Partial<Record<BindingKey, BindingTarget[]>>;
outputs: ManifestOutput[];
- defaults: Record<string, number | string>;
+ defaults: Record<string, number | string | boolean>;
limits?: Record<string, number>;
models: ManifestModel[];
customNodes: { name: string; repo: string }[];
diff --git a/tests/comfy-library-4.test.ts b/tests/comfy-library-4.test.ts
index f9778abe..0c409dfb 100644
--- a/tests/comfy-library-4.test.ts
+++ b/tests/comfy-library-4.test.ts
@@ -1,7 +1,10 @@
import fs from "node:fs";
+import os from "node:os";
import path from "node:path";
-import { describe, expect, it } from "vitest";
-import type { ComfyWorkflow, Manifest, ManifestOutput } from "@/lib/comfy";
+import { afterAll, describe, expect, it } from "vitest";
+import type { Operation } from "@/lib/catalog/types";
+import type { ComfyWorkflow, Manifest, ManifestOutput, ManifestWorkflow } from "@/lib/comfy";
+import type { MediaInfo } from "@/lib/media-probe";
// The round-4 ComfyUI library (docs/research/comfyui-oss-4.json): the 17 graphs with the bindings and outputs the
// feature packages drive, and the CausVid licence fix of wan21-vace-14b-ref2v.
@@ -11,14 +14,14 @@ const byId = new Map(manifest.workflows.map((w) => [w.id, w]));
const graph = (id: string) => JSON.parse(fs.readFileSync(path.join(dir, `${id}.json`), "utf8")) as ComfyWorkflow;
const subset = JSON.parse(fs.readFileSync(path.join(dir, "object_info.subset.json"), "utf8")) as Record<string, unknown>;
-const VACE = ["startFrame", "frames", "width", "height", "maskGrow", "prompt", "negativePrompt", "checkpoint", "loraStrength", "shift", "seed", "steps", "cfg", "filenamePrefix"];
+const VACE = ["startTime", "duration", "width", "height", "maskGrow", "prompt", "negativePrompt", "checkpoint", "loraStrength", "shift", "seed", "steps", "cfg", "filenamePrefix"];
const ROUND4: Record<string, { capability: string; bindings: string[]; outputs: [string, string?][] }> = {
"ocr-lines-qwen35": { capability: "ocr", bindings: ["image", "maxSize", "checkpoint", "instruction", "maxTokens", "filenamePrefix"], outputs: [["text", "lines"], ["text", "frame"]] },
"video-inpaint-wan-vace": { capability: "remove-object", bindings: ["video", "maskPrompt", ...VACE], outputs: [["video"]] },
"video-inpaint-wan-vace-painted": { capability: "remove-object", bindings: ["video", "mask", ...VACE], outputs: [["video"]] },
"video-erase-void": {
capability: "remove-object",
- bindings: ["video", "startFrame", "frames", "width", "height", "maskPrompt", "maskGrow", "prompt", "negativePrompt", "cfg", "steps", "seed", "skipPass2", "filenamePrefix"],
+ bindings: ["video", "startTime", "duration", "width", "height", "maskPrompt", "maskGrow", "prompt", "negativePrompt", "cfg", "steps", "seed", "skipPass2", "filenamePrefix"],
outputs: [["video"]],
},
"video-swap-wan-vace": { capability: "video-swap", bindings: ["video", "image", "maskPrompt", ...VACE], outputs: [["video"]] },
@@ -79,12 +82,15 @@ describe("round-4 ComfyUI workflows", () => {
for (const w of manifest.workflows) for (const o of w.outputs) if (o.role) expect(ROLES, `${w.id} ${o.role}`).toContain(o.role);
});
- it("states the limits the app plans windows and jobs with", () => {
+ it("states the limits and defaults the app plans windows and jobs with", () => {
for (const id of ["video-inpaint-wan-vace", "video-inpaint-wan-vace-painted", "video-swap-wan-vace", "video-insert-wan-vace"]) {
- expect(byId.get(id)!.limits).toMatchObject({ maxFrames: 81, dimensionMultiple: 16 });
- expect(byId.get(id)!.defaults).toMatchObject({ frameStep: 4, checkpoint: "wan2.1_vace_14B_fp16.safetensors", steps: 4, cfg: 1, loraStrength: 1 });
+ expect(byId.get(id)!.limits).toEqual({ maxWidth: 1280, maxHeight: 1280, maxFrames: 81, dimensionMultiple: 16 });
+ expect(byId.get(id)!.defaults).toMatchObject({ startTime: 0, duration: 0, width: 832, height: 480, checkpoint: "wan2.1_vace_14B_fp16.safetensors", steps: 4, cfg: 1, loraStrength: 1 });
+ expect(byId.get(id)!.defaults.frameStep, id).toBeUndefined(); // the graph counts the frames itself
}
- expect(byId.get("video-erase-void")!.limits).toMatchObject({ maxFrames: 197 });
+ expect(byId.get("video-erase-void")!.limits).toEqual({ maxWidth: 1024, maxHeight: 1024, maxFrames: 197, dimensionMultiple: 8 });
+ expect(byId.get("video-erase-void")!.defaults).toMatchObject({ startTime: 0, duration: 0, width: 672, height: 384, skipPass2: false });
+ expect(byId.get("image-to-splat-triposplat")!.defaults).toMatchObject({ cutout: true, splatFormat: "spz" });
expect(byId.get("kenburns-still")!.limits).toMatchObject({ maxDurationSec: 10 });
expect(byId.get("audio-loop-crossfade")!.limits).toMatchObject({ maxDurationSec: 600 });
expect(byId.get("reference-brief-gemma4")!.defaults).toMatchObject({ fps: 24, frameStep: 1, frames: 720 });
@@ -146,3 +152,249 @@ describe("round-4 ComfyUI workflows", () => {
}
});
});
+
+// ---------------------------------------------------------------------------
+// Graph wiring the contract depends on (the bindings alone would not catch a re-wired graph).
+
+type Link = [string, number];
+const isLink = (v: unknown): v is Link => Array.isArray(v) && v.length === 2 && typeof v[0] === "string" && typeof v[1] === "number";
+const linkOf = (v: unknown): Link => {
+ expect(isLink(v), JSON.stringify(v)).toBe(true);
+ return v as Link;
+};
+/** Every node that reads output `out` of node `nid`. */
+const readersOf = (g: ComfyWorkflow, nid: string, out = 0) =>
+ Object.entries(g).filter(([, n]) => Object.values(n.inputs).some((v) => isLink(v) && v[0] === nid && v[1] === out));
+const ofClass = (g: ComfyWorkflow, cls: string) => Object.entries(g).filter(([, n]) => n.class_type === cls);
+/** A ComfyMathExpression, evaluated in JS (the graphs use only arithmetic, comparisons, min, max, floor and sqrt). */
+const evalMath = (expr: unknown, vars: Record<string, number>): number =>
+ Number(new Function("min", "max", "floor", "sqrt", ...Object.keys(vars), `return (${String(expr)});`)(Math.min, Math.max, Math.floor, Math.sqrt, ...Object.values(vars)));
+
+const SAMPLE_SIZES = {
+ vace: [
+ [[832, 480, 1080, 1920], [464, 832]], // 9:16 phone clip, default budget
+ [[832, 480, 1920, 1080], [832, 464]],
+ [[1280, 720, 1920, 1080], [1280, 720]],
+ [[832, 480, 1000, 1000], [624, 624]],
+ [[1280, 720, 2560, 1080], [1280, 528]], // ultra-wide: capped at 1280 a side
+ ],
+ void: [
+ [[672, 384, 640, 360], [672, 376]],
+ [[672, 384, 360, 640], [376, 672]],
+ [[1024, 576, 1920, 1080], [1024, 576]],
+ ],
+} as const;
+const WINDOWS: Record<string, { cap: number; counts: [number, number][]; lengthUsers: string[]; model: string; workScales: number; sizes: (typeof SAMPLE_SIZES)[keyof typeof SAMPLE_SIZES] }> = {};
+for (const id of ["video-inpaint-wan-vace", "video-inpaint-wan-vace-painted", "video-swap-wan-vace", "video-insert-wan-vace"]) {
+ WINDOWS[id] = {
+ cap: 81,
+ counts: [[82, 81], [81, 81], [80, 77], [30, 29], [5, 5], [1, 1]],
+ lengthUsers: ["ComfyMathExpression", "ImageFromBatch", ...(id === "video-insert-wan-vace" ? ["RepeatImageBatch"] : []), "WanVaceToVideo"],
+ model: "WanVaceToVideo",
+ workScales: id.endsWith("-painted") || id === "video-insert-wan-vace" ? 2 : 1,
+ sizes: SAMPLE_SIZES.vace,
+ };
+}
+WINDOWS["video-erase-void"] = {
+ cap: 197,
+ counts: [[198, 197], [197, 197], [196, 189], [50, 45], [53, 53], [5, 5]],
+ lengthUsers: ["ComfyMathExpression", "ImageFromBatch", "VOIDInpaintConditioning", "VOIDWarpedNoise"],
+ model: "VOIDInpaintConditioning",
+ workScales: 1,
+ sizes: SAMPLE_SIZES.void,
+};
+
+describe("round-4 window graphs: VACE remove / swap / insert and VOID", () => {
+ it.each(Object.entries(WINDOWS))("%s decodes only the window, counts its frames and keeps its sound the same length", (id, w) => {
+ const m = byId.get(id)!;
+ const g = graph(id);
+ const [video] = m.bindings.video!;
+ const [start] = m.bindings.startTime!;
+ const [dur] = m.bindings.duration!;
+ expect(m.bindings.frames, id).toBeUndefined();
+ expect(m.bindings.startFrame, id).toBeUndefined();
+ expect(g[video.node].class_type).toBe("LoadVideo");
+ // Nothing decodes the whole clip: the loader feeds only Video Slice nodes (the window and a 0.1 s fps probe).
+ expect(readersOf(g, video.node).map(([, n]) => n.class_type)).toEqual(["Video Slice", "Video Slice"]);
+ const slice = g[start.node];
+ expect([slice.class_type, start.input]).toEqual(["Video Slice", "start_time"]);
+ expect(slice.inputs.video).toEqual([video.node, 0]);
+ expect(g[dur.node].class_type).toBe("PrimitiveFloat");
+ const span = g[linkOf(slice.inputs.duration)[0]];
+ expect(span.inputs["values.a"]).toEqual([dur.node, 0]);
+ const probeParts = g[linkOf(span.inputs["values.b"])[0]];
+ expect(probeParts.class_type).toBe("GetVideoComponents");
+ expect(linkOf(span.inputs["values.b"])[1]).toBe(2); // fps
+ const probe = g[linkOf(probeParts.inputs.video)[0]];
+ expect(probe.class_type).toBe("Video Slice");
+ expect(probe.inputs).toMatchObject({ video: [video.node, 0], start_time: 0 });
+ expect(Number(probe.inputs.duration)).toBeGreaterThan(0);
+ expect(Number(probe.inputs.duration)).toBeLessThanOrEqual(0.1);
+ expect(g[linkOf(span.inputs["values.c"])[0]].inputs.value).toBe(w.cap);
+ const seconds = (a: number, b: number) => evalMath(span.inputs.expression, { a, b, c: w.cap });
+ expect(seconds(0, 30)).toBeCloseTo((w.cap + 0.5) / 30, 9); // 0 = the longest window
+ expect(seconds(1, 30)).toBe(1);
+ expect(seconds(600, 25)).toBeCloseTo((w.cap + 0.5) / 25, 9); // never more than the cap
+
+ // The window: its components, the frames kept (the largest 4n+1 / 8n+5 decoded, at most the cap), the cut.
+ const [partsId] = readersOf(g, start.node).find(([, n]) => n.class_type === "GetVideoComponents")!;
+ const [, cut] = readersOf(g, partsId, 0).find(([, n]) => n.class_type === "ImageFromBatch")!;
+ expect(cut.inputs.batch_index).toBe(0);
+ const framesLink = linkOf(cut.inputs.length);
+ expect(framesLink[1]).toBe(1); // the INT output
+ const frames = g[framesLink[0]];
+ expect(frames.class_type).toBe("ComfyMathExpression");
+ const decoded = linkOf(frames.inputs["values.a"]);
+ expect([g[decoded[0]].class_type, decoded[1]]).toEqual(["GetImageSize", 2]); // batch_size
+ expect(g[decoded[0]].inputs.image).toEqual([partsId, 0]);
+ for (const [n, kept] of w.counts) expect(evalMath(frames.inputs.expression, { a: n, c: w.cap }), `${n} decoded`).toBe(kept);
+ const users = Object.values(g).filter((n) => Object.values(n.inputs).some((v) => JSON.stringify(v) === JSON.stringify(framesLink)));
+ expect(users.map((n) => n.class_type).sort()).toEqual([...w.lengthUsers].sort());
+
+ // Sound: the window's own, trimmed to exactly the kept frames at the clip's fps, muxed with them.
+ const [[trimId, trim]] = ofClass(g, "TrimAudioDuration");
+ expect(trim.inputs).toMatchObject({ audio: [partsId, 1], start_index: 0 });
+ expect(g[linkOf(trim.inputs.duration)[0]].inputs).toMatchObject({ expression: "a / b", "values.a": framesLink, "values.b": [partsId, 2] });
+ const create = g[linkOf(g[m.outputs[0].node].inputs.video)[0]];
+ expect(create.class_type).toBe("CreateVideo");
+ expect(create.inputs).toMatchObject({ fps: [partsId, 2], audio: [trimId, 0] });
+ });
+
+ it.each(Object.entries(WINDOWS))("%s renders a work-size budget in the clip's own shape, scaled and never cropped", (id, w) => {
+ const m = byId.get(id)!;
+ const g = graph(id);
+ expect(m.bindings.width).toHaveLength(1);
+ expect(m.bindings.height).toHaveLength(1);
+ const [bw] = m.bindings.width!;
+ const [bh] = m.bindings.height!;
+ expect([g[bw.node].class_type, g[bh.node].class_type]).toEqual(["PrimitiveInt", "PrimitiveInt"]);
+ const scales = ofClass(g, "ImageScale");
+ for (const [nid, n] of scales) expect(n.inputs.crop, `${id} node ${nid}`).toBe("disabled"); // the paste-back is exact
+ const work = scales.filter(([, n]) => isLink(n.inputs.width) && g[(n.inputs.width as Link)[0]].class_type === "ComfyMathExpression");
+ expect(work).toHaveLength(w.workScales); // the frames (and the painted mask)
+ const [, first] = work[0];
+ const fw = g[linkOf(first.inputs.width)[0]];
+ const fh = g[linkOf(first.inputs.height)[0]];
+ for (const e of [fw, fh]) {
+ expect(e.inputs["values.a"]).toEqual([bw.node, 0]);
+ expect(e.inputs["values.b"]).toEqual([bh.node, 0]);
+ const [src] = linkOf(e.inputs["values.c"]);
+ expect(g[src].class_type).toBe("GetImageSize");
+ expect([e.inputs["values.c"], e.inputs["values.d"]]).toEqual([[src, 0], [src, 1]]);
+ }
+ for (const [[a, b, c, d], want] of w.sizes) expect([evalMath(fw.inputs.expression, { a, b, c, d }), evalMath(fh.inputs.expression, { a, b, c, d })], `${a}x${b} on ${c}x${d}`).toEqual(want);
+ // Everything renders at that one size.
+ for (const [, n] of [...work, ...ofClass(g, w.model)]) expect([n.inputs.width, n.inputs.height]).toEqual([first.inputs.width, first.inputs.height]);
+ if (id === "video-erase-void") for (const [, n] of ofClass(g, "VOIDWarpedNoise")) expect([n.inputs.width, n.inputs.height]).toEqual([first.inputs.width, first.inputs.height]);
+ });
+
+ it("VOID's skipPass2 switch picks pass 1 when true and pass 2 when false", () => {
+ const g = graph("video-erase-void");
+ const [skip] = byId.get("video-erase-void")!.bindings.skipPass2!;
+ expect(g[skip.node]).toMatchObject({ class_type: "PrimitiveBoolean", inputs: { value: false } });
+ const [[, sw]] = readersOf(g, skip.node).filter(([, n]) => n.class_type === "ComfySwitchNode");
+ const unetOf = (l: unknown) => {
+ const decode = g[linkOf(l)[0]];
+ expect(decode.class_type).toBe("VAEDecode");
+ const sampler = g[linkOf(decode.inputs.samples)[0]];
+ const guider = g[linkOf(sampler.inputs.guider)[0]];
+ return g[linkOf(guider.inputs.model)[0]].inputs.unet_name;
+ };
+ expect(unetOf(sw.inputs.on_true)).toBe("void_pass1.safetensors");
+ expect(unetOf(sw.inputs.on_false)).toBe("void_pass2.safetensors");
+ });
+
+ it("TripoSplat's cutout switch uses BiRefNet when true and the image's own alpha when false", () => {
+ const g = graph("image-to-splat-triposplat");
+ const w = byId.get("image-to-splat-triposplat")!;
+ const [cut] = w.bindings.cutout!;
+ const [img] = w.bindings.image!;
+ const sw = g[cut.node];
+ expect([sw.class_type, cut.input, sw.inputs.switch, w.defaults.cutout]).toEqual(["ComfySwitchNode", "switch", true, true]);
+ const birefnet = g[linkOf(sw.inputs.on_true)[0]];
+ expect(birefnet).toMatchObject({ class_type: "RemoveBackground", inputs: { image: [img.node, 0] } });
+ expect(g[linkOf(sw.inputs.on_false)[0]]).toMatchObject({ class_type: "InvertMask", inputs: { mask: [img.node, 1] } });
+ expect(readersOf(g, cut.node).map(([, n]) => n.class_type)).toEqual(["TripoSplatPreprocessImage"]);
+ });
+
+ it("the end card reads the ad's picture and its sound from the one upload", () => {
+ const g = graph("video-append-endcard");
+ const targets = byId.get("video-append-endcard")!.bindings.video!;
+ expect(targets.map((t) => `${g[t.node].class_type}.${t.input}`)).toEqual(["LoadVideo.file", "LoadAudio.audio"]);
+ const [concat] = ofClass(g, "ConcatenateVideo").map(([, n]) => n);
+ expect(concat.inputs["videos.video0"]).toEqual([targets[0].node, 0]);
+ const pad = g[linkOf(concat.inputs.complete_audio)[0]];
+ expect(pad).toMatchObject({ class_type: "AudioConcat", inputs: { audio1: [targets[1].node, 0], direction: "after" } });
+ });
+
+ it("MoGe resizes on the longer edge, so tall portraits are capped too", () => {
+ const g = graph("scene-mesh-moge");
+ const [img] = byId.get("scene-mesh-moge")!.bindings.image!;
+ const [[sizeId]] = readersOf(g, img.node).filter(([, n]) => n.class_type === "GetImageSize");
+ const [[testId, test]] = readersOf(g, sizeId, 0).filter(([, n]) => n.class_type === "ComfyMathExpression");
+ expect(test.inputs).toMatchObject({ "values.a": [sizeId, 0], "values.b": [sizeId, 1] });
+ for (const [a, b, big] of [[1536, 3000, true], [3000, 1536, true], [2048, 2048, false], [1024, 768, false]] as const) expect(Boolean(evalMath(test.inputs.expression, { a, b })), `${a}x${b}`).toBe(big);
+ const [[, sw]] = readersOf(g, testId, 2).filter(([, n]) => n.class_type === "ComfySwitchNode");
+ expect(g[linkOf(sw.inputs.on_true)[0]]).toMatchObject({ class_type: "ResizeImagesByLongerEdge", inputs: { longer_edge: 2048 } });
+ expect(sw.inputs.on_false).toEqual([img.node, 0]);
+ });
+});
+
+// ---------------------------------------------------------------------------
+// Every round-4 workflow bound for real through the provider (prepareWorkflow → applyBindings on the library graph).
+
+const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-comfy-library-4-"));
+process.env.FUOBE_DATA_DIR = tmp;
+process.env.COMFYUI_URL = "http://comfy.test:8188";
+const { prepareWorkflow } = await import("@/server/providers/comfyui");
+afterAll(() => fs.rmSync(tmp, { recursive: true, force: true }));
+
+const GIVEN = new Set(["img1.png", "mask.png", "clip.mp4", "voice.wav", "voice2.wav", "curve.wav"]);
+const portrait: MediaInfo = { container: "mp4", hasVideo: true, hasAudio: true, duration: 8, videoDuration: 8, width: 360, height: 640, fps: 30, frames: 240 };
+async function prepare(id: string) {
+ return prepareWorkflow(
+ id,
+ {
+ prompt: "a quiet street",
+ negativePrompt: "blurry",
+ images: ["img1.png"],
+ mask: "mask.png",
+ video: "clip.mp4",
+ audio: "voice.wav",
+ startTime: 1,
+ endTime: 3,
+ seed: 7,
+ extra: { audio2: "voice2.wav", fadeCurve: "curve.wav" },
+ },
+ // The round-4 operations live in the catalog-4 package; none of them changes how the bindings are filled.
+ { generationId: "gen1", op: "v2v" as Operation, upload: async (_d, _t, name) => `up_${name}`, media: (n) => (n === "clip.mp4" ? portrait : undefined), serverRam: async () => undefined },
+ );
+}
+const valuesAt = (wf: ComfyWorkflow, m: ManifestWorkflow, key: string) => (m.bindings[key] ?? []).map((t) => wf[t.node].inputs[t.input]);
+
+describe("round-4 workflows through the provider", () => {
+ it.each(Object.keys(ROUND4))("%s: every upload slot, the seed and the file prefix are filled", async (id) => {
+ const { workflow, manifest: m } = await prepare(id);
+ for (const [nid, n] of Object.entries(workflow)) {
+ const inp = MEDIA[n.class_type];
+ if (inp) expect(GIVEN.has(String(n.inputs[inp])), `${id} node ${nid} ${n.class_type}.${inp} = ${n.inputs[inp]}`).toBe(true);
+ if ("filename_prefix" in n.inputs && m.outputs.some((o) => o.node === nid)) expect(n.inputs.filename_prefix, `${id} ${nid}`).toBe("fuobe/gen1");
+ }
+ for (const v of valuesAt(workflow, m, "seed")) expect(v).toBe(7);
+ });
+
+ it("fills the VACE / VOID window in seconds and the work-size budget, with no fps needed", async () => {
+ for (const id of Object.keys(WINDOWS)) {
+ const { workflow, manifest: m } = await prepare(id);
+ expect(valuesAt(workflow, m, "startTime"), id).toEqual([1]);
+ expect(valuesAt(workflow, m, "duration"), id).toEqual([2]);
+ expect([...valuesAt(workflow, m, "width"), ...valuesAt(workflow, m, "height")], id).toEqual(id === "video-erase-void" ? [672, 384] : [832, 480]);
+ }
+ });
+
+ it("fills the brief's frame window at its fixed 24 fps", async () => {
+ const { workflow, manifest: m } = await prepare("reference-brief-gemma4");
+ expect(valuesAt(workflow, m, "startFrame")).toEqual([24]);
+ expect(valuesAt(workflow, m, "frames")).toEqual([49]);
+ });
+});
diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.json
index b3254c75..56b441d5 100644
--- a/workflows/comfyui/manifest.json
+++ b/workflows/comfyui/manifest.json
@@ -1,6 +1,6 @@
{
"version": 1,
- "generatedAt": "2026-10-22T23:27:12.402Z",
+ "generatedAt": "2026-10-23T00:20:02.191Z",
"comfyuiCommit": "fc04da91b2ab12f99e4716371a7e4f98ac982597",
"comfyuiVersion": "0.41.0",
"workflowTemplatesVersion": "0.11.86",
@@ -11580,36 +11580,28 @@
"input": "file"
}
],
- "startFrame": [
+ "startTime": [
{
- "node": "3",
- "input": "value"
+ "node": "85",
+ "input": "start_time"
}
],
- "frames": [
+ "duration": [
{
- "node": "4",
+ "node": "82",
"input": "value"
}
],
"width": [
{
- "node": "6",
- "input": "width"
- },
- {
- "node": "19",
- "input": "width"
+ "node": "87",
+ "input": "value"
}
],
"height": [
{
- "node": "6",
- "input": "height"
- },
- {
- "node": "19",
- "input": "height"
+ "node": "88",
+ "input": "value"
}
],
"maskPrompt": [
@@ -11688,14 +11680,13 @@
"defaults": {
"width": 832,
"height": 480,
- "frames": 81,
"steps": 4,
"cfg": 1,
"shift": 5,
+ "duration": 0,
"loraStrength": 1,
- "startFrame": 0,
+ "startTime": 0,
"maskGrow": 16,
- "frameStep": 4,
"checkpoint": "wan2.1_vace_14B_fp16.safetensors"
},
"limits": {
@@ -11745,7 +11736,7 @@
"vramGb": 24,
"license": "Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); SAM 3.1 under Meta's SAM License (commercial use allowed under its terms); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)",
"validated": true,
- "notes": "maskPrompt = what to remove (SAM 3.1 text prompt, e.g. \"the man in the red jacket\"; up to 4 matching objects are tracked); prompt = the scene WITHOUT it. One window per job: frames (4n+1, at most 81) from startFrame, both in SOURCE frames, because the graph runs at the clip's own fps (GetVideoComponents): the provider computes them with the fps of the clip's header, not the 16 fps default. Longer clips: one job per window, joined with video-concat-N (seams between windows untested, inferred). width x height = the work size VACE renders at (multiple of 16, 832x480 by default); give it the clip's shape (aspect ratio \"auto\"): the window is centre-cropped to it and the result is scaled back to the source size uncropped. SAM3_VideoTrack follows the object through the window, GrowMask (maskGrow px) covers edges and contact shadows, the control video blanks the masked area (as Comfy-Org's video_wan_vace_inpainting template) and WanVaceToVideo regenerates it. The result is pasted into the ORIGINAL frames at full resolution through a 6 px soft mask (GrowMaskWithBlur): every pixel outside the mask stays the source's own. The window's sound is kept (silent clips work). Speed: the template's CausVid LoRA is CC-BY-NC-4.0, so this uses the Apache-2.0 lightx2v T2V 4-step LoRA (4 steps, cfg 1, euler, shift 5; the pairing with VACE is inferred, not GPU-tested); loraStrength 0 + steps 20 + cfg 6 is the slow full-quality path. checkpoint wan2.1_vace_1.3B_fp16.safetensors (4.31 GB) fits 8 GB cards and needs loraStrength 0, steps 20, cfg 6 (no 4-step LoRA for 1.3B). No new download: every default file is already in the library. Validated by /prompt only (no GPU here); the window-and-sound part (ImageFromBatch + TrimAudioDuration at the clip's fps -> CreateVideo) ran on CPU on a clip with sound (the window's 0.84 s kept) and a silent one (no audio track, no error)."
+ "notes": "maskPrompt = what to remove (SAM 3.1 text prompt, e.g. \"the man in the red jacket\"; up to 4 matching objects are tracked); prompt = the scene WITHOUT it. One window per job, in SECONDS: startTime and duration (params.startTime and params.endTime - startTime, which the provider already fills). Video Slice decodes only that window, at most 81 frames + half a frame at the clip's own fps (read from a 0.1 s probe slice), so RAM no longer grows with the clip and one window needs no fps app side. The graph keeps the largest 4n+1 frames it decoded (at most 81: 2.7 s at 30 fps, 3.375 s at 24 fps, 5.06 s at 16 fps) and trims the sound to exactly those frames. duration 0 = the longest window; a longer duration is cut at 81 frames. Longer clips: one job per window, startTime = k x 81 / fps and duration = 81 / fps (fps from the clip's header), joined with video-concat-N (seams between windows untested, inferred). width x height = the work-size BUDGET (832x480 by default): VACE renders about width x height pixels in the CLIP's own shape (multiples of 16, at most 1280 a side; a 9:16 clip renders at 464x832), scaled, never cropped, so the paste-back lines up whatever aspect ratio the request had. SAM3_VideoTrack follows the object through the window, GrowMask (maskGrow px) covers edges and contact shadows, the control video blanks the masked area (as Comfy-Org's video_wan_vace_inpainting template) and WanVaceToVideo regenerates it. The result is pasted into the ORIGINAL frames at full resolution through a 6 px soft mask (GrowMaskWithBlur): every pixel outside the mask stays the source's own. The window's sound is kept (silent clips work). RAM: the window is held at the source size as float32 in several copies (decoded, cut, scaled back, pasted; ~25 MB per 1080p frame, so roughly 10 GB for 81 frames at 1080p, inferred): downscale 4K sources first. Changed from the research graph: the seconds-based window (the research bound startFrame / frames on the whole decoded clip and centre-cropped to width x height). Speed: the template's CausVid LoRA is CC-BY-NC-4.0, so this uses the Apache-2.0 lightx2v T2V 4-step LoRA (4 steps, cfg 1, euler, shift 5; the pairing with VACE is inferred, not GPU-tested); loraStrength 0 + steps 20 + cfg 6 is the slow full-quality path. checkpoint wan2.1_vace_1.3B_fp16.safetensors (4.31 GB) fits 8 GB cards and needs loraStrength 0, steps 20, cfg 6 (no 4-step LoRA for 1.3B). No new download: every default file is already in the library. Validated by /prompt only (no GPU here). The window, sound and work-size nodes ran on CPU (the built graph's own nodes, VACE replaced by the work-size frames scaled back): an 8 s 360x640 30 fps clip with sound, startTime 1, duration 0 -> 81 frames, 2.700 s of picture and 2.700 s of sound, rendered at 464x832 and back, matching source frames 30-110 (27.2 dB PSNR at offset 0 vs 19 dB one frame off; the research graph's centre crop gave 16.4 dB at every offset, i.e. misplaced); startTime 2, duration 1 -> 29 frames, 0.967 s of both; startTime and duration 81/30 -> frames 81-161; a silent clip -> 81 frames, no sound track, no error; a 60 s clip, window at 50 s: 0.6 s instead of 2.6 s with the whole-clip decode."
},
{
"id": "video-inpaint-wan-vace-painted",
@@ -11766,44 +11757,28 @@
"input": "image"
}
],
- "startFrame": [
+ "startTime": [
{
- "node": "3",
- "input": "value"
+ "node": "85",
+ "input": "start_time"
}
],
- "frames": [
+ "duration": [
{
- "node": "4",
+ "node": "82",
"input": "value"
}
],
"width": [
{
- "node": "6",
- "input": "width"
- },
- {
- "node": "19",
- "input": "width"
- },
- {
- "node": "72",
- "input": "width"
+ "node": "87",
+ "input": "value"
}
],
"height": [
{
- "node": "6",
- "input": "height"
- },
- {
- "node": "19",
- "input": "height"
- },
- {
- "node": "72",
- "input": "height"
+ "node": "88",
+ "input": "value"
}
],
"maskGrow": [
@@ -11876,14 +11851,13 @@
"defaults": {
"width": 832,
"height": 480,
- "frames": 81,
"steps": 4,
"cfg": 1,
"shift": 5,
+ "duration": 0,
"loraStrength": 1,
- "startFrame": 0,
+ "startTime": 0,
"maskGrow": 16,
- "frameStep": 4,
"checkpoint": "wan2.1_vace_14B_fp16.safetensors"
},
"limits": {
@@ -11933,7 +11907,7 @@
"vramGb": 24,
"license": "Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); SAM 3.1 under Meta's SAM License (commercial use allowed under its terms); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)",
"validated": true,
- "notes": "mask = a PNG of the window's FIRST frame, read from the red channel: white = the object to remove, black = keep (the clip's shape; it is scaled to the work size like the frames). SAM3_VideoTrack takes it as initial_mask and tracks the object through the window. Changed from the research graph: the mask is read from the red channel (Fuobe's mask convention, as flux1-fill-inpaint) instead of alpha. Everything else as video-inpaint-wan-vace: windows of frames (4n+1, at most 81) from startFrame in source frames, width x height in the clip's shape, paste-back into the original frames, the window's sound kept. For a window after the first, the mask must be painted on (or tracked to) that window's first frame. Validated by /prompt only (no GPU here)."
+ "notes": "mask = a PNG of the window's FIRST frame, read from the red channel: white = the object to remove, black = keep (in the clip's shape). SAM3_VideoTrack takes it as initial_mask and tracks the object through the window. Changed from the research graph: the mask is read from the red channel (Fuobe's mask convention, as flux1-fill-inpaint) instead of alpha. The mask is scaled to the work size like the frames (not cropped), so any PNG size lines up. Everything else as video-inpaint-wan-vace: windows in seconds (startTime, duration; at most 81 frames, the largest 4n+1 decoded), width x height = the work-size budget in the clip's shape, paste-back into the original frames, the window's sound kept. For a window after the first, the mask must be painted on (or tracked to) that window's first frame. Validated by /prompt only (no GPU here)."
},
{
"id": "video-erase-void",
@@ -11948,44 +11922,28 @@
"input": "file"
}
],
- "startFrame": [
+ "startTime": [
{
- "node": "3",
- "input": "value"
+ "node": "85",
+ "input": "start_time"
}
],
- "frames": [
+ "duration": [
{
- "node": "4",
+ "node": "82",
"input": "value"
}
],
"width": [
{
- "node": "6",
- "input": "width"
- },
- {
- "node": "19",
- "input": "width"
- },
- {
- "node": "41",
- "input": "width"
+ "node": "87",
+ "input": "value"
}
],
"height": [
{
- "node": "6",
- "input": "height"
- },
- {
- "node": "19",
- "input": "height"
- },
- {
- "node": "41",
- "input": "height"
+ "node": "88",
+ "input": "value"
}
],
"maskPrompt": [
@@ -12060,13 +12018,16 @@
"defaults": {
"width": 672,
"height": 384,
- "frames": 45,
"steps": 30,
"cfg": 6,
- "startFrame": 0,
- "maskGrow": 8
+ "duration": 0,
+ "startTime": 0,
+ "maskGrow": 8,
+ "skipPass2": false
},
"limits": {
+ "maxWidth": 1024,
+ "maxHeight": 1024,
"maxFrames": 197,
"dimensionMultiple": 8
},
@@ -12112,7 +12073,7 @@
"vramGb": 40,
"license": "VOID weights Apache-2.0 (netflix/void-model), BUT fine-tuned from CogVideoX-Fun-V1.5-5b-InP, whose 5B transformer is under the CogVideoX License: free for academic research; commercial use only after registering for its basic commercial licence (open.bigmodel.cn), and at most 1 million service visits a month without a further licence; no military or illegal use. T5-XXL and the CogVideoX VAE Apache-2.0; RAFT BSD-3-Clause; SAM 3.1 under Meta's SAM License",
"validated": true,
- "notes": "The premium removal: VOID also removes what the object causes (shadows, reflections, objects it holds falling). Comfy-Org template utility_void_video_inpainting (2026-05-14), flattened, with SAM3_VideoTrack (maskPrompt) instead of per-frame SAM3_Detect. The binary mask goes straight into VOIDInpaintConditioning (1 = remove) as in the template; VOIDQuadmaskPreprocess is only for VOID's own 4-level quadmasks. frames is rounded down by the node so the latent length is even: 45, 53, 61 ... 197 (8n+5), counted in source frames from startFrame like the VACE graphs. Output = the work size (672x384 by default, VOID's training size; multiples of 8), not the source size: the whole frame is re-rendered, so upscale afterwards if needed. The window's sound is kept. Pass 2 re-samples with noise warped along pass 1's optical flow (RAFT) for steadier long clips; skipPass2 true halves the time (pass 1 \"is sufficient for most videos\" per Netflix's card). The switch is lazy, so pass 2 does not run then, but void_pass2 and the RAFT file must still be installed (/prompt checks every loader that feeds the output). Downloads 32.5 GB: 2 x 11.14 GB passes, T5-XXL fp16 9.79 GB (the same file as FLUX's t5xxl_fp16), CogVideoX VAE 0.43 GB, RAFT 0.02 GB. VRAM in ComfyUI is unverified: Netflix's reference code needs 40 GB+, a 24 GB card with offloading is plausible (inferred). Validated by /prompt only (no GPU here)."
+ "notes": "The premium removal: VOID also removes what the object causes (shadows, reflections, objects it holds falling). Comfy-Org template utility_void_video_inpainting (2026-05-14), flattened, with SAM3_VideoTrack (maskPrompt) instead of per-frame SAM3_Detect. The binary mask goes straight into VOIDInpaintConditioning (1 = remove) as in the template; VOIDQuadmaskPreprocess is only for VOID's own 4-level quadmasks. Window in seconds like the VACE graphs (startTime, duration; Video Slice decodes only the window, at most 197 frames + half a frame at the clip's fps): the graph keeps the largest 8n+5 frames it decoded (45, 53 ... 197: an even latent length, which VOIDInpaintConditioning / VOIDWarpedNoise would otherwise round down to) and trims the sound to exactly those frames, so picture and sound stay the same length. duration 0 = the longest window (197 frames, 7.9 s at 25 fps); windows of 197 / fps seconds tile a longer clip. Output = the work size, not the source size: width x height is the budget (672x384 by default, VOID's training size) in the CLIP's shape (multiples of 8, at most 1024 a side; 672x376 for 16:9, 376x672 for 9:16), scaled, never cropped: the whole frame is re-rendered, so upscale afterwards if needed. The window's sound is kept. Pass 2 re-samples with noise warped along pass 1's optical flow (RAFT) for steadier long clips; skipPass2 true halves the time (pass 1 \"is sufficient for most videos\" per Netflix's card). The switch is lazy, so pass 2 does not run then, but void_pass2 and the RAFT file must still be installed (/prompt checks every loader that feeds the output). Downloads 32.5 GB: 2 x 11.14 GB passes, T5-XXL fp16 9.79 GB (the same file as FLUX's t5xxl_fp16), CogVideoX VAE 0.43 GB, RAFT 0.02 GB. VRAM in ComfyUI is unverified: Netflix's reference code needs 40 GB+, a 24 GB card with offloading is plausible (inferred). Validated by /prompt only (no GPU here). Changed from the research graph: the seconds-based window, the in-graph 8n+5 count and the aspect-keeping work size (the research bound startFrame / frames and centre-cropped). The window and work-size nodes ran on CPU: a 10 s 640x360 25 fps clip with sound, startTime 0.5, duration 0 -> 197 frames at 672x376, 7.880 s of picture and of sound; duration 2 -> 45 frames, 1.800 s of both."
},
{
"id": "video-swap-wan-vace",
@@ -12133,36 +12094,28 @@
"input": "image"
}
],
- "startFrame": [
+ "startTime": [
{
- "node": "3",
- "input": "value"
+ "node": "85",
+ "input": "start_time"
}
],
- "frames": [
+ "duration": [
{
- "node": "4",
+ "node": "82",
"input": "value"
}
],
"width": [
{
- "node": "6",
- "input": "width"
- },
- {
- "node": "19",
- "input": "width"
+ "node": "87",
+ "input": "value"
}
],
"height": [
{
- "node": "6",
- "input": "height"
- },
- {
- "node": "19",
- "input": "height"
+ "node": "88",
+ "input": "value"
}
],
"maskPrompt": [
@@ -12241,14 +12194,13 @@
"defaults": {
"width": 832,
"height": 480,
- "frames": 81,
"steps": 4,
"cfg": 1,
"shift": 5,
+ "duration": 0,
"loraStrength": 1,
- "startFrame": 0,
+ "startTime": 0,
"maskGrow": 16,
- "frameStep": 4,
"checkpoint": "wan2.1_vace_14B_fp16.safetensors"
},
"limits": {
@@ -12298,7 +12250,7 @@
"vramGb": 24,
"license": "Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); SAM 3.1 under Meta's SAM License (commercial use allowed under its terms); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)",
"validated": true,
- "notes": "Genjutsu \"Object Swap\" on the open engine. maskPrompt = what to replace (the tracked mask, as video-inpaint-wan-vace); image = the new object, product or character, best cut out on a plain or white background (bg-remove-birefnet); prompt describes the result. The reference goes to WanVaceToVideo.reference_image (one extra latent frame that TrimVideoLatent drops) and the masked area is regenerated following the original motion. One image: with several references the provider sends the first (or a collage). Window rules (frames 4n+1 <= 81 from startFrame in source frames, width x height in the clip's shape), the paste-back into the original frames and the kept sound are as video-inpaint-wan-vace. For a whole person, SCAIL-2 Character Replacement (template video_wan21_scail2_character_replacement) keeps the body motion better (not built). Validated by /prompt only (no GPU here)."
+ "notes": "Genjutsu \"Object Swap\" on the open engine. maskPrompt = what to replace (the tracked mask, as video-inpaint-wan-vace); image = the new object, product or character, best cut out on a plain or white background (bg-remove-birefnet); prompt describes the result. The reference goes to WanVaceToVideo.reference_image (one extra latent frame that TrimVideoLatent drops) and the masked area is regenerated following the original motion. One image: with several references the provider sends the first (or a collage). Window rules (startTime / duration in seconds, at most 81 frames; width x height = the work-size budget in the clip's shape), the paste-back into the original frames and the kept sound are as video-inpaint-wan-vace. For a whole person, SCAIL-2 Character Replacement (template video_wan21_scail2_character_replacement) keeps the body motion better (not built). Validated by /prompt only (no GPU here)."
},
{
"id": "video-insert-wan-vace",
@@ -12325,44 +12277,28 @@
"input": "image"
}
],
- "startFrame": [
+ "startTime": [
{
- "node": "3",
- "input": "value"
+ "node": "85",
+ "input": "start_time"
}
],
- "frames": [
+ "duration": [
{
- "node": "4",
+ "node": "82",
"input": "value"
}
],
"width": [
{
- "node": "6",
- "input": "width"
- },
- {
- "node": "19",
- "input": "width"
- },
- {
- "node": "72",
- "input": "width"
+ "node": "87",
+ "input": "value"
}
],
"height": [
{
- "node": "6",
- "input": "height"
- },
- {
- "node": "19",
- "input": "height"
- },
- {
- "node": "72",
- "input": "height"
+ "node": "88",
+ "input": "value"
}
],
"maskGrow": [
@@ -12435,14 +12371,13 @@
"defaults": {
"width": 832,
"height": 480,
- "frames": 81,
"steps": 4,
"cfg": 1,
"shift": 5,
+ "duration": 0,
"loraStrength": 1,
- "startFrame": 0,
+ "startTime": 0,
"maskGrow": 16,
- "frameStep": 4,
"checkpoint": "wan2.1_vace_14B_fp16.safetensors"
},
"limits": {
@@ -12486,7 +12421,7 @@
"vramGb": 24,
"license": "Apache-2.0 (Wan 2.1 VACE 14B, lightx2v T2V LoRA, umT5, Wan VAE); GrowMaskWithBlur from ComfyUI-KJNodes (GPL-3.0 code)",
"validated": true,
- "notes": "mask = the region where the new object should appear, a PNG in the clip's shape read from the red channel (white = the region, black = keep); it is held for every frame of the window (RepeatImageBatch), so it suits a static or slow camera (without the repeat WanVaceToVideo would pad a one-frame mask with 1 = generate and regenerate the whole clip). image = the object (best cut out on white); prompt = what appears where and what it does. No SAM. Changed from the research graph: the mask is read from the red channel (Fuobe's mask convention) instead of alpha. Window rules, paste-back and the kept sound as video-inpaint-wan-vace. Validated by /prompt only (no GPU here)."
+ "notes": "mask = the region where the new object should appear, a PNG in the clip's shape read from the red channel (white = the region, black = keep), scaled (not cropped) to the work size; it is held for every frame of the window (RepeatImageBatch), so it suits a static or slow camera (without the repeat WanVaceToVideo would pad a one-frame mask with 1 = generate and regenerate the whole clip). image = the object (best cut out on white); prompt = what appears where and what it does. No SAM. Changed from the research graph: the mask is read from the red channel (Fuobe's mask convention) instead of alpha. Window rules (startTime / duration in seconds, at most 81 frames), the work-size budget, paste-back and the kept sound as video-inpaint-wan-vace. Validated by /prompt only (no GPU here)."
},
{
"id": "kenburns-still",
@@ -12803,7 +12738,7 @@
"vramGb": 0,
"license": "n/a (no model; VideoHelperSuite GPL-3.0 code and the system ffmpeg's prores_ks / libx265 / ffv1 / libx264 encoders)",
"validated": true,
- "notes": "params.format -> format (+ profile): prores_422_hq -> video/ProRes + hq; prores_4444 -> video/ProRes + 4444 (also lt, standard, 4444xq); h265_10bit -> video/h265-mp4 (pix_fmt yuv420p10le, its first option); ffv1 -> video/ffv1-mkv (lossless, rgba64le); h264 -> video/h264-mp4; exr -> video-export-exr. VHS falls back to each format widget's default when an input is missing, and adds profile only for ProRes. VHS writes <prefix>_00001.<ext> (.mov ProRes, .mp4 H.264/H.265, .mkv FFV1; no sound) and, when the clip has sound, <prefix>_00001-audio.<ext>, the only file the history lists (under \"gifs\"); it also leaves a first-frame .png next to them. Decodes the whole clip (GetVideoComponents): RAM grows with the length. Ran here (CPU, two sessions, a 1 s 64x64 16 fps clip with AAC sound, 0.16-0.4 s each, checked with ffprobe): ProRes HQ .mov yuv444p10le + pcm_s16le; ProRes 4444 yuv444p12le; h265-mp4 HEVC Main 10 yuv420p10le + AAC; ffv1-mkv gbrap16le + FLAC; h264-mp4 High yuv420p + AAC; 16 frames and 1.000 s in every file; bt709 tags (FFV1: gbr matrix, sRGB transfer, bt709 primaries)."
+ "notes": "params.format -> format (+ profile): prores_422_hq -> video/ProRes + hq; prores_4444 -> video/ProRes + 4444 (also lt, standard, 4444xq); h265_10bit -> video/h265-mp4 (pix_fmt yuv420p10le, its first option); ffv1 -> video/ffv1-mkv (lossless, rgba64le); h264 -> video/h264-mp4; exr -> video-export-exr. VHS falls back to each format widget's default when an input is missing, and adds profile only for ProRes. VHS writes <prefix>_00001.<ext> (.mov ProRes, .mp4 H.264/H.265, .mkv FFV1; no sound) and, when the clip has sound, <prefix>_00001-audio.<ext>, the only file the history lists (under \"gifs\"); it also leaves a first-frame .png next to them. Storage: /view serves .mkv as video/x-matroska, which storage.ts has no extension for, so an FFV1 export is saved as <id>.bin (kind video) until EXT_BY_TYPE / TYPE_BY_EXT know mkv (feature package). Decodes the whole clip (GetVideoComponents): RAM grows with the length. Ran here (CPU, two sessions, a 1 s 64x64 16 fps clip with AAC sound, 0.16-0.4 s each, checked with ffprobe): ProRes HQ .mov yuv444p10le + pcm_s16le; ProRes 4444 yuv444p12le; h265-mp4 HEVC Main 10 yuv420p10le + AAC; ffv1-mkv gbrap16le + FLAC; h264-mp4 High yuv420p + AAC; 16 frames and 1.000 s in every file; bt709 tags (FFV1: gbr matrix, sRGB transfer, bt709 primaries)."
},
{
"id": "video-sdr-to-hdr",
@@ -12882,7 +12817,7 @@
"vramGb": 0,
"license": "n/a (no model; ComfyUI core)",
"validated": true,
- "notes": "params.format \"exr\" of the export-video operation. One half-float .exr per frame (role frames, in frame order); input_color_space sRGB applies the inverse sRGB curve, so the files are scene-linear Rec.709. The app zips the sequence. No sound. Decodes the whole clip: RAM grows with the length. Ran here (CPU, two sessions, 1 s 64x64 16 fps clip, 0.06-0.2 s): 16 .exr files (<prefix>_00001.exr ...), HALF B/G/R channels, ZIP compression, linear transfer."
+ "notes": "params.format \"exr\" of the export-video operation. One half-float .exr per frame (role frames, in frame order); input_color_space sRGB applies the inverse sRGB curve, so the files are scene-linear Rec.709. The app zips the sequence. No sound. Decodes the whole clip: RAM grows with the length. Storage: /view serves .exr as image/aces, which storage.ts has no extension for, so each frame is saved as an image .bin until EXT_BY_TYPE / TYPE_BY_EXT know exr (feature package; the zip is the deliverable anyway). Ran here (CPU, two sessions, 1 s 64x64 16 fps clip, 0.06-0.2 s): 16 .exr files (<prefix>_00001.exr ...), HALF B/G/R channels, ZIP compression, linear transfer."
},
{
"id": "still-to-clip",
@@ -13107,7 +13042,7 @@
"vramGb": 4,
"license": "MIT (microsoft/MoGe 2 and 3, Comfy-Org/MoGe repack)",
"validated": true,
- "notes": "Cinema Studio \"Create 3D scene\": photo -> textured GLB of the WHOLE frame (role scene) + a depth PNG (role depth). From the official template 3d_moge_perspective_to_mesh (2026-05-15): normal-map previews dropped, the depth PNG added; images over 2048 px are resized first. The browser orbits the GLB, captures a view, and qwen-image-edit-2511 re-renders it with the original photo. resolutionLevel 0-9 (detail), fovX = horizontal field of view in degrees (0 = estimate), decimation 2 for phones (about 4x fewer triangles, inferred). checkpoint moge_2_vitl_normal_fp16 (0.66 GB) by default; moge_3_vitl_fp16 (0.74 GB) and moge_3_vitg_fp16 (2.50 GB) load through the same node. Research run on the 4-core CPU: a 768x768 living-room photo became a 25.2 MB GLB (556k vertices, 1.08M triangles, one texture, depth 0.35-6.58 m) in 42 s, +1.6 GB RSS. VRAM unverified (MoGe 2 ViT-L is ~0.33B parameters). TripoSplat (image-to-splat-triposplat) rebuilds the subject only, not the scene."
+ "notes": "Cinema Studio \"Create 3D scene\": photo -> textured GLB of the WHOLE frame (role scene) + a depth PNG (role depth). From the official template 3d_moge_perspective_to_mesh (2026-05-15): normal-map previews dropped, the depth PNG added; images with a longer edge over 2048 px are resized to 2048 first (changed from the research graph, which tested the width only, so tall portraits went through at full size; checked on CPU: 1536x3000 -> 1048x2048, 3000x1536 -> 2048x1048, 1024x768 unchanged). The browser orbits the GLB, captures a view, and qwen-image-edit-2511 re-renders it with the original photo. resolutionLevel 0-9 (detail), fovX = horizontal field of view in degrees (0 = estimate), decimation 2 for phones (about 4x fewer triangles, inferred). checkpoint moge_2_vitl_normal_fp16 (0.66 GB) by default; moge_3_vitl_fp16 (0.74 GB) and moge_3_vitg_fp16 (2.50 GB) load through the same node. Research run on the 4-core CPU: a 768x768 living-room photo became a 25.2 MB GLB (556k vertices, 1.08M triangles, one texture, depth 0.35-6.58 m) in 42 s, +1.6 GB RSS. VRAM unverified (MoGe 2 ViT-L is ~0.33B parameters). TripoSplat (image-to-splat-triposplat) rebuilds the subject only, not the scene."
},
{
"id": "image-to-splat-triposplat",
@@ -13196,7 +13131,8 @@
"cfg": 3,
"numGaussians": 262144,
"orbitFrames": 75,
- "splatFormat": "spz"
+ "splatFormat": "spz",
+ "cutout": true
},
"limits": {
"maxGaussians": 1048576
@@ -13237,7 +13173,7 @@
"vramGb": 8,
"license": "MIT (VAST-AI/TripoSplat weights); the dino_v3_vit_h image encoder is under the DINOv3 License (royalty-free, commercial use allowed, trade-control limits; the app must show a \"Built with DINOv3\" notice); FLUX.2 VAE Apache-2.0; BiRefNet MIT",
"validated": true,
- "notes": "Subject or product splat (3D Angles, 3D Jutsu props, a splat alternative to TRELLIS.2 spins). The official template 3d_triposplat_image_to_gaussian_splat (2026-06-02) with the UI-only live-preview patch removed and a 75-frame H.264 orbit (RenderSplat + CreateCameraInfo orbit yaw 35, pitch 30, distance 2.5; role turntable, 25 fps). Subject only: BiRefNet cuts it out first (cutout false = use the image's own alpha). Output 1 (role splat): splatFormat spz (Niantic, gzip, ~10x smaller, base colour), ply (full spherical harmonics) or ksplat, saved by SaveGLB under that extension (meta.format = the extension). numGaussians up to 1,048,576 (262,144 by default); seed drives both the sampler and the decoder. RenderSplat also takes a look_at camera, so a view picked in the browser can be rendered on the server. 3.78 GB of weights (TripoSplat 0.74, DINOv3 ViT-H 1.68, TripoSplat VAE decoder 0.58, FLUX.2 VAE 0.34, BiRefNet 0.44). VRAM unverified. Validated by /prompt only."
+ "notes": "Subject or product splat (3D Angles, 3D Jutsu props, a splat alternative to TRELLIS.2 spins). The official template 3d_triposplat_image_to_gaussian_splat (2026-06-02) with the UI-only live-preview patch removed and a 75-frame H.264 orbit (RenderSplat + CreateCameraInfo orbit yaw 35, pitch 30, distance 2.5; role turntable, 25 fps). Subject only: BiRefNet cuts it out first (cutout false = use the image's own alpha). Output 1 (role splat): splatFormat spz (Niantic, gzip, ~10x smaller, base colour), ply (full spherical harmonics) or ksplat, saved by SaveGLB under that extension (meta.format = the extension). Storage: ComfyUI's /view serves all three as application/octet-stream (Python mimetypes knows none), so persistOutput falls back to the extension: storage.ts maps spz / ply to model/x-spz / model/ply (added by catalog-4) and so kind model3d, but ksplat has no mapping and lands as an image .bin; collectOutputs sets only meta.role, so the provider sets meta.format (and a contentType for ksplat). cutout is true by default (manifest defaults). numGaussians up to 1,048,576 (262,144 by default); seed drives both the sampler and the decoder. RenderSplat also takes a look_at camera, so a view picked in the browser can be rendered on the server. 3.78 GB of weights (TripoSplat 0.74, DINOv3 ViT-H 1.68, TripoSplat VAE decoder 0.58, FLUX.2 VAE 0.34, BiRefNet 0.44). VRAM unverified. Validated by /prompt only."
},
{
"id": "reference-brief-gemma4",
diff --git a/workflows/comfyui/object_info.subset.json b/workflows/comfyui/object_info.subset.json
index 4a20165f..2821f9f8 100644
--- a/workflows/comfyui/object_info.subset.json
+++ b/workflows/comfyui/object_info.subset.json
@@ -9756,8 +9756,6 @@
"required": {
"image": [
[
- "example.png",
- "fuobe_6hmQxYQr.png",
"fuobe_validate.png",
"fuobe_validate_mask.png"
],
@@ -9808,8 +9806,6 @@
"required": {
"image": [
[
- "example.png",
- "fuobe_6hmQxYQr.png",
"fuobe_validate.png",
"fuobe_validate_mask.png"
],
diff --git a/workflows/comfyui/scene-mesh-moge.json b/workflows/comfyui/scene-mesh-moge.json
index aed6f67e..e58d5c16 100644
--- a/workflows/comfyui/scene-mesh-moge.json
+++ b/workflows/comfyui/scene-mesh-moge.json
@@ -23,14 +23,18 @@
"3": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a > 2048",
+ "expression": "max(a, b) > 2048",
"values.a": [
"2",
0
+ ],
+ "values.b": [
+ "2",
+ 1
]
},
"_meta": {
- "title": "Longer than 2048 px?"
+ "title": "Longer edge over 2048 px?"
}
},
"4": {
diff --git a/workflows/comfyui/video-erase-void.json b/workflows/comfyui/video-erase-void.json
index 868be735..d5be6128 100644
--- a/workflows/comfyui/video-erase-void.json
+++ b/workflows/comfyui/video-erase-void.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 45
- },
- "_meta": {
- "title": "Frames to process (frames; rounded down so (frames-1)/4+1 is even, e.g. 45, 53, 61 ... 197)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (8n+5 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 672,
- "height": 384,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; VOID trained at 672x384, multiples of 8)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -215,11 +200,17 @@
"11",
0
],
- "width": 672,
- "height": 384,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1
},
@@ -333,6 +324,18 @@
"title": "Pass 1 frames"
}
},
+ "30": {
+ "class_type": "GetImageSize",
+ "inputs": {
+ "image": [
+ "2",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Source size and frames decoded"
+ }
+ },
"40": {
"class_type": "OpticalFlowLoader",
"inputs": {
@@ -353,11 +356,17 @@
"26",
0
],
- "width": 672,
- "height": 384,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1
},
@@ -542,13 +551,13 @@
"title": "Save video"
}
},
- "60": {
+ "61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "3",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -556,44 +565,193 @@
]
},
"_meta": {
- "title": "Window start in seconds"
+ "title": "Window length in seconds"
}
},
- "61": {
+ "62": {
+ "class_type": "TrimAudioDuration",
+ "inputs": {
+ "audio": [
+ "2",
+ 1
+ ],
+ "start_index": 0,
+ "duration": [
+ "61",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The window's sound, as long as its frames (none for silent clips)"
+ }
+ },
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 197 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 197
+ },
+ "_meta": {
+ "title": "Frame cap per window (197 = VOID)"
+ }
+ },
+ "84": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a / b",
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
"values.a": [
- "4",
+ "82",
0
],
"values.b": [
- "2",
+ "81",
2
+ ],
+ "values.c": [
+ "83",
+ 0
]
},
"_meta": {
- "title": "Window length in seconds"
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
}
},
- "62": {
- "class_type": "TrimAudioDuration",
+ "85": {
+ "class_type": "Video Slice",
"inputs": {
- "audio": [
- "2",
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(5, floor((min(a, c) - 5) / 8) * 8 + 5)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 8n+5 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 672
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 384
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(8, floor(min(sqrt(a * b * c / d), 1024, 1024 * c / d) / 8) * 8)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 8, <= 1024)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(8, floor(min(sqrt(a * b * d / c), 1024, 1024 * d / c) / 8) * 8)",
+ "values.a": [
+ "87",
+ 0
],
- "start_index": [
- "60",
+ "values.b": [
+ "88",
0
],
- "duration": [
- "61",
+ "values.c": [
+ "30",
0
+ ],
+ "values.d": [
+ "30",
+ 1
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "Work height (multiple of 8, <= 1024)"
}
}
}
diff --git a/workflows/comfyui/video-inpaint-wan-vace-painted.json b/workflows/comfyui/video-inpaint-wan-vace-painted.json
index f42982f5..a7ebadf1 100644
--- a/workflows/comfyui/video-inpaint-wan-vace-painted.json
+++ b/workflows/comfyui/video-inpaint-wan-vace-painted.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -241,11 +226,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -365,12 +356,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -524,30 +515,13 @@
"title": "Save video"
}
},
- "60": {
- "class_type": "ComfyMathExpression",
- "inputs": {
- "expression": "a / b",
- "values.a": [
- "3",
- 0
- ],
- "values.b": [
- "2",
- 2
- ]
- },
- "_meta": {
- "title": "Window start in seconds"
- }
- },
"61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "4",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -565,17 +539,14 @@
"2",
1
],
- "start_index": [
- "60",
- 0
- ],
+ "start_index": 0,
"duration": [
"61",
0
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
"70": {
@@ -608,12 +579,18 @@
0
],
"upscale_method": "bilinear",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "At the work size"
+ "title": "At the work size (scaled like the frames)"
}
},
"73": {
@@ -628,5 +605,174 @@
"_meta": {
"title": "First-frame mask"
}
+ },
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
+ "values.a": [
+ "82",
+ 0
+ ],
+ "values.b": [
+ "81",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
+ }
+ },
+ "85": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work height (multiple of 16, <= 1280)"
+ }
}
}
diff --git a/workflows/comfyui/video-inpaint-wan-vace.json b/workflows/comfyui/video-inpaint-wan-vace.json
index 9eac2fb4..15bb5c83 100644
--- a/workflows/comfyui/video-inpaint-wan-vace.json
+++ b/workflows/comfyui/video-inpaint-wan-vace.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -254,11 +239,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -378,12 +369,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -537,13 +528,13 @@
"title": "Save video"
}
},
- "60": {
+ "61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "3",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -551,44 +542,193 @@
]
},
"_meta": {
- "title": "Window start in seconds"
+ "title": "Window length in seconds"
+ }
+ },
+ "62": {
+ "class_type": "TrimAudioDuration",
+ "inputs": {
+ "audio": [
+ "2",
+ 1
+ ],
+ "start_index": 0,
+ "duration": [
+ "61",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
- "61": {
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a / b",
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
"values.a": [
- "4",
+ "82",
0
],
"values.b": [
- "2",
+ "81",
2
+ ],
+ "values.c": [
+ "83",
+ 0
]
},
"_meta": {
- "title": "Window length in seconds"
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
}
},
- "62": {
- "class_type": "TrimAudioDuration",
+ "85": {
+ "class_type": "Video Slice",
"inputs": {
- "audio": [
- "2",
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
],
- "start_index": [
- "60",
+ "values.b": [
+ "88",
0
],
- "duration": [
- "61",
+ "values.c": [
+ "30",
0
+ ],
+ "values.d": [
+ "30",
+ 1
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "Work height (multiple of 16, <= 1280)"
}
}
}
diff --git a/workflows/comfyui/video-insert-wan-vace.json b/workflows/comfyui/video-insert-wan-vace.json
index 8b9c88a6..6d508021 100644
--- a/workflows/comfyui/video-insert-wan-vace.json
+++ b/workflows/comfyui/video-insert-wan-vace.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"10": {
@@ -209,11 +194,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -337,12 +328,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -505,30 +496,13 @@
"title": "What to put in (image: object, product or character on a plain background)"
}
},
- "60": {
- "class_type": "ComfyMathExpression",
- "inputs": {
- "expression": "a / b",
- "values.a": [
- "3",
- 0
- ],
- "values.b": [
- "2",
- 2
- ]
- },
- "_meta": {
- "title": "Window start in seconds"
- }
- },
"61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "4",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -546,17 +520,14 @@
"2",
1
],
- "start_index": [
- "60",
- 0
- ],
+ "start_index": 0,
"duration": [
"61",
0
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
"70": {
@@ -589,12 +560,18 @@
0
],
"upscale_method": "bilinear",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "At the work size"
+ "title": "At the work size (scaled like the frames)"
}
},
"74": {
@@ -605,12 +582,181 @@
0
],
"amount": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
"title": "Same region in every frame"
}
+ },
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
+ "values.a": [
+ "82",
+ 0
+ ],
+ "values.b": [
+ "81",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
+ }
+ },
+ "85": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Work height (multiple of 16, <= 1280)"
+ }
}
}
diff --git a/workflows/comfyui/video-swap-wan-vace.json b/workflows/comfyui/video-swap-wan-vace.json
index 4d660931..bc26009b 100644
--- a/workflows/comfyui/video-swap-wan-vace.json
+++ b/workflows/comfyui/video-swap-wan-vace.json
@@ -12,30 +12,12 @@
"class_type": "GetVideoComponents",
"inputs": {
"video": [
- "1",
+ "85",
0
]
},
"_meta": {
- "title": "Frames, sound, fps"
- }
- },
- "3": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 0
- },
- "_meta": {
- "title": "First frame of the window (startFrame)"
- }
- },
- "4": {
- "class_type": "PrimitiveInt",
- "inputs": {
- "value": 81
- },
- "_meta": {
- "title": "Frames to process, 4n+1 (frames)"
+ "title": "The window's frames, sound and fps"
}
},
"5": {
@@ -45,17 +27,14 @@
"2",
0
],
- "batch_index": [
- "3",
- 0
- ],
+ "batch_index": 0,
"length": [
- "4",
- 0
+ "86",
+ 1
]
},
"_meta": {
- "title": "The window"
+ "title": "The window (4n+1 frames)"
}
},
"6": {
@@ -66,12 +45,18 @@
0
],
"upscale_method": "lanczos",
- "width": 832,
- "height": 480,
- "crop": "center"
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
+ "crop": "disabled"
},
"_meta": {
- "title": "Work size (width, height; multiples of 16)"
+ "title": "Work size (scaled, not cropped)"
}
},
"7": {
@@ -254,11 +239,17 @@
"18",
0
],
- "width": 832,
- "height": 480,
+ "width": [
+ "89",
+ 1
+ ],
+ "height": [
+ "90",
+ 1
+ ],
"length": [
- "4",
- 0
+ "86",
+ 1
],
"batch_size": 1,
"strength": 1,
@@ -382,12 +373,12 @@
"class_type": "GetImageSize",
"inputs": {
"image": [
- "5",
+ "2",
0
]
},
"_meta": {
- "title": "Source size"
+ "title": "Source size and frames decoded"
}
},
"31": {
@@ -550,13 +541,13 @@
"title": "What to put in (image: object, product or character on a plain background)"
}
},
- "60": {
+ "61": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
- "3",
- 0
+ "86",
+ 1
],
"values.b": [
"2",
@@ -564,44 +555,193 @@
]
},
"_meta": {
- "title": "Window start in seconds"
+ "title": "Window length in seconds"
+ }
+ },
+ "62": {
+ "class_type": "TrimAudioDuration",
+ "inputs": {
+ "audio": [
+ "2",
+ 1
+ ],
+ "start_index": 0,
+ "duration": [
+ "61",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The window's sound, as long as its frames (none for silent clips)"
}
},
- "61": {
+ "80": {
+ "class_type": "Video Slice",
+ "inputs": {
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": 0.1,
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "First 0.1 s only: the clip's fps"
+ }
+ },
+ "81": {
+ "class_type": "GetVideoComponents",
+ "inputs": {
+ "video": [
+ "80",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "The clip's fps"
+ }
+ },
+ "82": {
+ "class_type": "PrimitiveFloat",
+ "inputs": {
+ "value": 0
+ },
+ "_meta": {
+ "title": "Window length in seconds (duration; 0 = the longest window, 81 frames)"
+ }
+ },
+ "83": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 81
+ },
+ "_meta": {
+ "title": "Frame cap per window (81 = Wan 2.1 VACE)"
+ }
+ },
+ "84": {
"class_type": "ComfyMathExpression",
"inputs": {
- "expression": "a / b",
+ "expression": "min(a + 1e9 * (a <= 0), (c + 0.5) / b)",
"values.a": [
- "4",
+ "82",
0
],
"values.b": [
- "2",
+ "81",
2
+ ],
+ "values.c": [
+ "83",
+ 0
]
},
"_meta": {
- "title": "Window length in seconds"
+ "title": "Seconds to decode: duration (0 = no limit), at most the frame cap + half a frame"
}
},
- "62": {
- "class_type": "TrimAudioDuration",
+ "85": {
+ "class_type": "Video Slice",
"inputs": {
- "audio": [
- "2",
+ "video": [
+ "1",
+ 0
+ ],
+ "start_time": 0,
+ "duration": [
+ "84",
+ 0
+ ],
+ "strict_duration": false
+ },
+ "_meta": {
+ "title": "Decode only the window (startTime, in seconds)"
+ }
+ },
+ "86": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(1, floor((min(a, c) - 1) / 4) * 4 + 1)",
+ "values.a": [
+ "30",
+ 2
+ ],
+ "values.c": [
+ "83",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Frames in the window: the largest 4n+1 decoded, at most the cap"
+ }
+ },
+ "87": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 832
+ },
+ "_meta": {
+ "title": "Work-size budget: width (width)"
+ }
+ },
+ "88": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 480
+ },
+ "_meta": {
+ "title": "Work-size budget: height (height)"
+ }
+ },
+ "89": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * c / d), 1280, 1280 * c / d) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
+ ],
+ "values.b": [
+ "88",
+ 0
+ ],
+ "values.c": [
+ "30",
+ 0
+ ],
+ "values.d": [
+ "30",
1
+ ]
+ },
+ "_meta": {
+ "title": "Work width: about width x height pixels in the clip's shape (multiple of 16, <= 1280)"
+ }
+ },
+ "90": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "expression": "max(16, floor(min(sqrt(a * b * d / c), 1280, 1280 * d / c) / 16) * 16)",
+ "values.a": [
+ "87",
+ 0
],
- "start_index": [
- "60",
+ "values.b": [
+ "88",
0
],
- "duration": [
- "61",
+ "values.c": [
+ "30",
0
+ ],
+ "values.d": [
+ "30",
+ 1
]
},
"_meta": {
- "title": "The window's sound (none for silent clips)"
+ "title": "Work height (multiple of 16, <= 1280)"
}
}
}