From 472ed7075715b03d113e3596126cad1e64b6490f Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Thu, 27 Nov 2025 20:08:23 +0200 Subject: [PATCH] Add node to preview image embeds --- nodes_utility.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/nodes_utility.py b/nodes_utility.py index 55cd9ce..4dd45ba 100644 --- a/nodes_utility.py +++ b/nodes_utility.py @@ -755,7 +755,26 @@ class DrawGaussianNoiseOnImage: out_rgb = torch.stack(output_images, dim=0).cpu() return (out_rgb, ) - + + +class WanVideoPreviewEmbeds: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "embeds": ("WANVIDIMAGE_EMBEDS",), + } + } + + RETURN_TYPES = ("LATENT", "MASK") + RETURN_NAMES = ("image_embeds", "mask",) + FUNCTION = "get" + CATEGORY = "WanVideoWrapper" + + def get(self, embeds): + latents = embeds.get("image_embeds", None) + mask = embeds.get("mask", None) + return ({"samples": latents.unsqueeze(0)}, mask) + NODE_CLASS_MAPPINGS = { "WanVideoImageResizeToClosest": WanVideoImageResizeToClosest, "WanVideoVACEStartToEndFrame": WanVideoVACEStartToEndFrame, @@ -769,6 +788,7 @@ NODE_CLASS_MAPPINGS = { "WanVideoPassImagesFromSamples": WanVideoPassImagesFromSamples, "FaceMaskFromPoseKeypoints": FaceMaskFromPoseKeypoints, "DrawGaussianNoiseOnImage": DrawGaussianNoiseOnImage, + "WanVideoPreviewEmbeds": WanVideoPreviewEmbeds, } NODE_DISPLAY_NAME_MAPPINGS = { "WanVideoImageResizeToClosest": "WanVideo Image Resize To Closest",