Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2744,17 +2744,23 @@ def predict_with_cfg(z, cfg_scale, positive_embeds, negative_embeds, timestep, i
if vace_data is not None:
window_vace_data = []
for vace_entry in vace_data:
partial_context = vace_entry["context"][0][:, c]
vace_tensor = vace_entry["context"][0]
vace_len = vace_tensor.shape[1]

safe_c = [min(idx, vace_len - 1) for idx in c]

partial_context = vace_tensor[:, safe_c]

if has_ref:
partial_context[:, 0] = vace_entry["context"][0][:, 0]
partial_context[:, 0] = vace_tensor[:, 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

Expand Down