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:
2026-02-20 10:34:07 +01:00
parent f369c25b32
commit a164fbeb87
3 changed files with 21 additions and 21 deletions

View File

@@ -35,7 +35,7 @@ Irrelevant widgets are automatically hidden based on the selected mode.
| 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. |
| `split_index` | INT | Adjusted for the trimmed clip — 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 |
|---|---|---|---|
| `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_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). |
| `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
@@ -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.
**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.
@@ -311,11 +311,11 @@ Merge: result = original[0:121] + vace[0:81] + original[153:274]
```
[Load Video]
├─ source_clip ──→ [VACESourcePrep] ─┬─ source_clip ──→ [MaskGen] ─→ [Sampler]
│ ├─ mode ──────────→ [MaskGen] │
│ └─ vace_pipe ─────────────────┐ │
│ │ │
└─ original_clip ──────────────────────────────────────→ [VACEMergeBack] ←┘
├─ source_clip ──→ [VACESourcePrep] ─┬─ trimmed_clip ──→ [MaskGen] ─→ [Sampler]
│ ├─ mode ──────────→ [MaskGen] │
│ └─ vace_pipe ─────────────────┐ │
│ │
└─ source_clip ──────────────────────────────────────→ [VACEMergeBack] ←┘
vace_output
```

View File

@@ -90,7 +90,7 @@ Pass-through modes (Edge Extend, Frame Interpolation, Keyframe, Video Inpaint):
Splice modes (End, Pre, Middle, Join, Bidirectional, Replace):
Reconstructs original[:trim_start] + vace_output + original[trim_end:]
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:
none — Hard cut at seams (fastest)
@@ -101,18 +101,18 @@ Blend methods:
def INPUT_TYPES(cls):
return {
"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_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."}),
"of_preset": (["fast", "balanced", "quality", "max"], {"default": "balanced", "description": "Optical flow quality preset."}),
},
"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"]
trim_start = vace_pipe["trim_start"]
trim_end = vace_pipe["trim_end"]
@@ -126,13 +126,13 @@ Blend methods:
# Splice modes: reconstruct full video
two_clip = vace_pipe.get("two_clip", False)
V = vace_output.shape[0]
head = original_clip[:trim_start]
if two_clip and original_clip_2 is not None:
tail = original_clip_2[trim_end:]
right_orig = original_clip_2
head = source_clip[:trim_start]
if two_clip and source_clip_2 is not None:
tail = source_clip_2[trim_end:]
right_orig = source_clip_2
else:
tail = original_clip[trim_end:]
right_orig = original_clip
tail = source_clip[trim_end:]
right_orig = source_clip
result = torch.cat([head, vace_output, tail], dim=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
for j in range(left_ctx):
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
for j in range(right_ctx):

View File

@@ -300,7 +300,7 @@ class VACESourcePrep:
FUNCTION = "prepare"
RETURN_TYPES = ("IMAGE", VACE_MODES, "INT", "INT", "MASK", "STRING", "VACE_PIPE")
RETURN_NAMES = (
"source_clip", "mode", "split_index", "edge_frames",
"trimmed_clip", "mode", "split_index", "edge_frames",
"inpaint_mask", "keyframe_positions", "vace_pipe",
)
OUTPUT_TOOLTIPS = (