Add node to preview image embeds

This commit is contained in:
kijai
2025-11-27 20:08:23 +02:00
parent 44feb24290
commit 472ed70757
+21 -1
View File
@@ -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",