fix context windows
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user