From ab870a198f26307f9f460260238646157c6a56fc Mon Sep 17 00:00:00 2001 From: Anastasiy Safari Date: Sat, 10 May 2025 13:35:43 -0700 Subject: [PATCH] Fix chained VACE embeddings ignored with WanVideo Context Options --- nodes.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/nodes.py b/nodes.py index 37d33a4..bb65fae 100644 --- a/nodes.py +++ b/nodes.py @@ -3238,10 +3238,21 @@ class WanVideoSampler: partial_vace_context = None if vace_data is not None: - partial_vace_context = vace_data[0]["context"][0][:, c] - if has_ref: - partial_vace_context[:, 0] = vace_data[0]["context"][0][:, 0] - partial_vace_context = [partial_vace_context] + window_vace_data = [] + for vace_entry in vace_data: + partial_context = vace_entry["context"][0][:, c] + if has_ref: + partial_context[:, 0] = vace_entry["context"][0][:, 0] + + window_vace_data.append({ + "context": [partial_context], + "scale": vace_entry["scale"], + "start": vace_entry["start"], + "end": vace_entry["end"], + "seq_len": vace_entry["seq_len"] + }) + + partial_vace_context = window_vace_data partial_audio_proj = None if fantasytalking_embeds is not None: