fix context windows

This commit is contained in:
kijai
2025-03-03 01:40:33 +02:00
parent 0183a03bf9
commit 8c451f4a2f
+3 -2
View File
@@ -1266,6 +1266,7 @@ class WanVideoSampler:
positive_prompt = text_embeds["prompt_embeds"][prompt_index]
img_emb = image_embeds.get("image_embeds", None)
partial_img_emb = None
if img_emb is not None:
print("img_emb shape", img_emb.shape)
partial_img_emb = img_emb[:, c, :, :]
@@ -1275,7 +1276,7 @@ class WanVideoSampler:
# Model inference - returns [frames, channels, height, width]
noise_pred_cond = transformer(
partial_latent_model_input,
y=[partial_img_emb],
y=[partial_img_emb] if partial_img_emb is not None else None,
t=timestep,
current_step=i,
is_uncond=False,
@@ -1285,7 +1286,7 @@ class WanVideoSampler:
if cfg[i] != 1.0:
noise_pred_uncond = transformer(
partial_latent_model_input,
y=[partial_img_emb],
y=[partial_img_emb] if partial_img_emb is not None else None,
t=timestep,
current_step=i,
is_uncond=True,