Update nodes.py

This commit is contained in:
kijai
2025-05-18 21:09:36 +03:00
parent fd562e9730
commit d547482ad6
+4 -2
View File
@@ -1554,6 +1554,8 @@ class WanVideoImageToVideoEncode:
"fun_or_fl2v_model": ("BOOLEAN", {"default": True, "tooltip": "Enable when using official FLF2V or Fun model"}),
"temporal_mask": ("MASK", {"tooltip": "mask"}),
"extra_latents": ("LATENT", {"tooltip": "Extra latents to add to the input front, used for Skyreels A2 reference images"}),
"tiled_vae": ("BOOLEAN", {"default": False, "tooltip": "Use tiled VAE encoding for reduced memory use"}),
}
}
@@ -1564,7 +1566,7 @@ class WanVideoImageToVideoEncode:
def process(self, vae, width, height, num_frames, force_offload, noise_aug_strength,
start_latent_strength, end_latent_strength, start_image=None, end_image=None, control_embeds=None, fun_or_fl2v_model=False,
temporal_mask=None, extra_latents=None, clip_embeds=None):
temporal_mask=None, extra_latents=None, clip_embeds=None, tiled_vae=False):
device = mm.get_torch_device()
offload_device = mm.unet_offload_device()
@@ -1642,7 +1644,7 @@ class WanVideoImageToVideoEncode:
temporal_mask = common_upscale(temporal_mask.unsqueeze(1), W, H, "nearest", "disabled").squeeze(1)
concatenated = resized_start_image[:,:num_frames] * temporal_mask[:num_frames].unsqueeze(0)
y = vae.encode([concatenated.to(device=device, dtype=vae.dtype)], device, end_=(end_image is not None and not fun_or_fl2v_model))[0]
y = vae.encode([concatenated.to(device=device, dtype=vae.dtype)], device, end_=(end_image is not None and not fun_or_fl2v_model),tiled=tiled_vae)[0]
has_ref = False
if extra_latents is not None:
samples = extra_latents["samples"].squeeze(0)