Normalize input/output names across nodes
- SourcePrep output: source_clip → trimmed_clip (distinguish from input) - MergeBack input: original_clip → source_clip (matches SourcePrep's input — same video wire from Load Video) - MergeBack input: original_clip_2 → source_clip_2 (matches SourcePrep) - Update README wiring diagram and tables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
README.md
16
README.md
@@ -35,7 +35,7 @@ Irrelevant widgets are automatically hidden based on the selected mode.
|
|||||||
|
|
||||||
| Output | Type | Description |
|
| Output | Type | Description |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `source_clip` | IMAGE | Trimmed frames — wire to mask generator's source_clip. |
|
| `trimmed_clip` | IMAGE | Trimmed frames — wire to mask generator's source_clip. |
|
||||||
| `mode` | ENUM | Selected mode — wire to mask generator's mode. |
|
| `mode` | ENUM | Selected mode — wire to mask generator's mode. |
|
||||||
| `split_index` | INT | Adjusted for the trimmed clip — wire to mask generator. |
|
| `split_index` | INT | Adjusted for the trimmed clip — wire to mask generator. |
|
||||||
| `edge_frames` | INT | Adjusted/passed through — wire to mask generator. |
|
| `edge_frames` | INT | Adjusted/passed through — wire to mask generator. |
|
||||||
@@ -270,12 +270,12 @@ Irrelevant widgets are automatically hidden based on the selected blend method.
|
|||||||
|
|
||||||
| Input | Type | Default | Description |
|
| Input | Type | Default | Description |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `original_clip` | IMAGE | — | Full original video (before any trimming). |
|
| `source_clip` | IMAGE | — | Full original video (before any trimming). Same source as VACE Source Prep's source_clip. |
|
||||||
| `vace_output` | IMAGE | — | VACE sampler output. |
|
| `vace_output` | IMAGE | — | VACE sampler output. |
|
||||||
| `vace_pipe` | VACE_PIPE | — | Pipe from VACE Source Prep carrying mode, trim bounds, and context counts. |
|
| `vace_pipe` | VACE_PIPE | — | Pipe from VACE Source Prep carrying mode, trim bounds, and context counts. |
|
||||||
| `blend_method` | ENUM | `optical_flow` | `none` (hard cut), `alpha` (linear crossfade), or `optical_flow` (motion-compensated). |
|
| `blend_method` | ENUM | `optical_flow` | `none` (hard cut), `alpha` (linear crossfade), or `optical_flow` (motion-compensated). |
|
||||||
| `of_preset` | ENUM | `balanced` | Optical flow quality: `fast`, `balanced`, `quality`, `max`. |
|
| `of_preset` | ENUM | `balanced` | Optical flow quality: `fast`, `balanced`, `quality`, `max`. |
|
||||||
| `original_clip_2` | IMAGE | *(optional)* | Second original clip for Join Extend with two separate clips. |
|
| `source_clip_2` | IMAGE | *(optional)* | Second original clip for Join Extend with two separate clips. |
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ Irrelevant widgets are automatically hidden based on the selected blend method.
|
|||||||
|
|
||||||
**Pass-through modes** (Edge Extend, Frame Interpolation, Keyframe, Video Inpaint): returns `vace_output` as-is — the VACE output IS the final result for these modes.
|
**Pass-through modes** (Edge Extend, Frame Interpolation, Keyframe, Video Inpaint): returns `vace_output` as-is — the VACE output IS the final result for these modes.
|
||||||
|
|
||||||
**Splice modes** (End, Pre, Middle, Join, Bidirectional, Replace): reconstructs `original[:trim_start] + vace_output + original[trim_end:]`, then blends across the full context zones at each seam. For two-clip Join Extend, the tail comes from `original_clip_2` instead.
|
**Splice modes** (End, Pre, Middle, Join, Bidirectional, Replace): reconstructs `source_clip[:trim_start] + vace_output + source_clip[trim_end:]`, then blends across the full context zones at each seam. For two-clip Join Extend, the tail comes from `source_clip_2` instead.
|
||||||
|
|
||||||
Context frame counts (`left_ctx`, `right_ctx`) are carried in the `vace_pipe` and determined automatically by VACE Source Prep based on the mode and input_left/input_right settings. Blending uses a smooth alpha ramp across the entire context zone. Optical flow blending warps both frames along the motion field before blending, reducing ghosting on moving subjects.
|
Context frame counts (`left_ctx`, `right_ctx`) are carried in the `vace_pipe` and determined automatically by VACE Source Prep based on the mode and input_left/input_right settings. Blending uses a smooth alpha ramp across the entire context zone. Optical flow blending warps both frames along the motion field before blending, reducing ghosting on moving subjects.
|
||||||
|
|
||||||
@@ -311,11 +311,11 @@ Merge: result = original[0:121] + vace[0:81] + original[153:274]
|
|||||||
```
|
```
|
||||||
[Load Video]
|
[Load Video]
|
||||||
│
|
│
|
||||||
├─ source_clip ──→ [VACESourcePrep] ─┬─ source_clip ──→ [MaskGen] ─→ [Sampler]
|
├─ source_clip ──→ [VACESourcePrep] ─┬─ trimmed_clip ──→ [MaskGen] ─→ [Sampler]
|
||||||
│ ├─ mode ──────────→ [MaskGen] │
|
│ ├─ mode ───────────→ [MaskGen] │
|
||||||
│ └─ vace_pipe ─────────────────┐ │
|
│ └─ vace_pipe ──────────────────┐ │
|
||||||
│ │ │
|
│ │ │
|
||||||
└─ original_clip ──────────────────────────────────────→ [VACEMergeBack] ←┘
|
└─ source_clip ───────────────────────────────────────→ [VACEMergeBack] ←┘
|
||||||
vace_output
|
vace_output
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Pass-through modes (Edge Extend, Frame Interpolation, Keyframe, Video Inpaint):
|
|||||||
Splice modes (End, Pre, Middle, Join, Bidirectional, Replace):
|
Splice modes (End, Pre, Middle, Join, Bidirectional, Replace):
|
||||||
Reconstructs original[:trim_start] + vace_output + original[trim_end:]
|
Reconstructs original[:trim_start] + vace_output + original[trim_end:]
|
||||||
with automatic blending across the full context zones.
|
with automatic blending across the full context zones.
|
||||||
For two-clip Join Extend, connect original_clip_2 — the tail comes from the second clip.
|
For two-clip Join Extend, connect source_clip_2 — the tail comes from the second clip.
|
||||||
|
|
||||||
Blend methods:
|
Blend methods:
|
||||||
none — Hard cut at seams (fastest)
|
none — Hard cut at seams (fastest)
|
||||||
@@ -101,18 +101,18 @@ Blend methods:
|
|||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
return {
|
return {
|
||||||
"required": {
|
"required": {
|
||||||
"original_clip": ("IMAGE", {"description": "Full original video (before any trimming)."}),
|
"source_clip": ("IMAGE", {"description": "Full original video (before any trimming)."}),
|
||||||
"vace_output": ("IMAGE", {"description": "VACE sampler output."}),
|
"vace_output": ("IMAGE", {"description": "VACE sampler output."}),
|
||||||
"vace_pipe": ("VACE_PIPE", {"description": "Pipe from VACE Source Prep carrying mode, trim bounds, and context counts."}),
|
"vace_pipe": ("VACE_PIPE", {"description": "Pipe from VACE Source Prep carrying mode, trim bounds, and context counts."}),
|
||||||
"blend_method": (["optical_flow", "alpha", "none"], {"default": "optical_flow", "description": "Blending method at seams."}),
|
"blend_method": (["optical_flow", "alpha", "none"], {"default": "optical_flow", "description": "Blending method at seams."}),
|
||||||
"of_preset": (["fast", "balanced", "quality", "max"], {"default": "balanced", "description": "Optical flow quality preset."}),
|
"of_preset": (["fast", "balanced", "quality", "max"], {"default": "balanced", "description": "Optical flow quality preset."}),
|
||||||
},
|
},
|
||||||
"optional": {
|
"optional": {
|
||||||
"original_clip_2": ("IMAGE", {"description": "Second original clip for Join Extend with two separate clips."}),
|
"source_clip_2": ("IMAGE", {"description": "Second original clip for Join Extend with two separate clips."}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def merge(self, original_clip, vace_output, vace_pipe, blend_method, of_preset, original_clip_2=None):
|
def merge(self, source_clip, vace_output, vace_pipe, blend_method, of_preset, source_clip_2=None):
|
||||||
mode = vace_pipe["mode"]
|
mode = vace_pipe["mode"]
|
||||||
trim_start = vace_pipe["trim_start"]
|
trim_start = vace_pipe["trim_start"]
|
||||||
trim_end = vace_pipe["trim_end"]
|
trim_end = vace_pipe["trim_end"]
|
||||||
@@ -126,13 +126,13 @@ Blend methods:
|
|||||||
# Splice modes: reconstruct full video
|
# Splice modes: reconstruct full video
|
||||||
two_clip = vace_pipe.get("two_clip", False)
|
two_clip = vace_pipe.get("two_clip", False)
|
||||||
V = vace_output.shape[0]
|
V = vace_output.shape[0]
|
||||||
head = original_clip[:trim_start]
|
head = source_clip[:trim_start]
|
||||||
if two_clip and original_clip_2 is not None:
|
if two_clip and source_clip_2 is not None:
|
||||||
tail = original_clip_2[trim_end:]
|
tail = source_clip_2[trim_end:]
|
||||||
right_orig = original_clip_2
|
right_orig = source_clip_2
|
||||||
else:
|
else:
|
||||||
tail = original_clip[trim_end:]
|
tail = source_clip[trim_end:]
|
||||||
right_orig = original_clip
|
right_orig = source_clip
|
||||||
result = torch.cat([head, vace_output, tail], dim=0)
|
result = torch.cat([head, vace_output, tail], dim=0)
|
||||||
|
|
||||||
if blend_method == "none" or (left_ctx == 0 and right_ctx == 0):
|
if blend_method == "none" or (left_ctx == 0 and right_ctx == 0):
|
||||||
@@ -146,7 +146,7 @@ Blend methods:
|
|||||||
# Blend across full left context zone
|
# Blend across full left context zone
|
||||||
for j in range(left_ctx):
|
for j in range(left_ctx):
|
||||||
alpha = (j + 1) / (left_ctx + 1)
|
alpha = (j + 1) / (left_ctx + 1)
|
||||||
result[trim_start + j] = blend_frame(original_clip[trim_start + j], vace_output[j], alpha)
|
result[trim_start + j] = blend_frame(source_clip[trim_start + j], vace_output[j], alpha)
|
||||||
|
|
||||||
# Blend across full right context zone
|
# Blend across full right context zone
|
||||||
for j in range(right_ctx):
|
for j in range(right_ctx):
|
||||||
|
|||||||
2
nodes.py
2
nodes.py
@@ -300,7 +300,7 @@ class VACESourcePrep:
|
|||||||
FUNCTION = "prepare"
|
FUNCTION = "prepare"
|
||||||
RETURN_TYPES = ("IMAGE", VACE_MODES, "INT", "INT", "MASK", "STRING", "VACE_PIPE")
|
RETURN_TYPES = ("IMAGE", VACE_MODES, "INT", "INT", "MASK", "STRING", "VACE_PIPE")
|
||||||
RETURN_NAMES = (
|
RETURN_NAMES = (
|
||||||
"source_clip", "mode", "split_index", "edge_frames",
|
"trimmed_clip", "mode", "split_index", "edge_frames",
|
||||||
"inpaint_mask", "keyframe_positions", "vace_pipe",
|
"inpaint_mask", "keyframe_positions", "vace_pipe",
|
||||||
)
|
)
|
||||||
OUTPUT_TOOLTIPS = (
|
OUTPUT_TOOLTIPS = (
|
||||||
|
|||||||
Reference in New Issue
Block a user