Nodes/ComfyUI-WanVideoWrapper/WanVideo Pass Images From Samples
ComfyUI Node Runs on cloud

WanVideo Pass Images From Samples

Grab already-decoded frames from Wan samples

By kijai·Created about a year ago·Updated 2 months ago· 6,650
WanVideo Pass Images From Samples
  • samples
  • images
  • output_path

This is a niche plumbing node, and that's fine - some of the most useful nodes in a big workflow are the ones that just move data around without wasting compute. Per its own description, it "gets possible already decoded images from the samples dictionary, used with Multi/InfiniteTalk sampling." In plain terms: when you run one of Wan's long-form talking-head samplers (MultiTalk, InfiniteTalk), the sampler decodes frames internally as it stitches chunks together. Rather than making you run those latents back through a VAE decode a second time, this node reaches into the samples object and pulls the frames that are already sitting there as images.

You reach for it specifically in those chunked audio-driven pipelines. In a plain I2V graph you'd just decode the latents normally; this node exists because MultiTalk/InfiniteTalk have already done that work and re-decoding would be pure waste.

How it works

The samples object coming out of a Wan sampler is a dictionary, not just a raw latent tensor - and in the multi-chunk talking-head modes it can carry decoded image frames alongside the latents. This node checks for those decoded images and passes them straight through as an IMAGE output, skipping a redundant VAE decode. If they're there, you save the decode; the node's whole reason to exist is avoiding duplicate work.

The inputs and outputs that matter

  • samples (LATENT) - the samples object from a Multi/InfiniteTalk sampler. This is the thing you're extracting frames from.

Two outputs:

  • images (IMAGE) - the already-decoded frames, ready to save or post-process.
  • output_path (STRING) - a path string associated with the output, handy for downstream saving/organizing.

How to install it

Part of the WanVideoWrapper. ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart. No model download for this one - it operates purely on the sampler's output. It only makes sense paired with the MultiTalk / InfiniteTalk audio-driven Wan setup that produces the decoded-frames-in-samples object.

Common issues & troubleshooting

No images come out. The samples you fed it didn't contain pre-decoded frames. That happens if you're not using a Multi/InfiniteTalk sampler, or the sampler didn't decode internally. In that case, use a normal VAE decode on the latents instead - this node isn't a general-purpose decoder, it only passes through what's already decoded.

Wrong node for the job. If you're on a standard I2V/T2V graph, you don't want this node at all. Decode your latents the usual way. This is specifically an optimization for the chunked talking-head modes.

Frame count looks off. These modes stitch 81-frame windows with overlap, so the frames you get reflect the sampler's internal chunking. If the count surprises you, that's the windowing of the long-form sampler, not this node mangling anything.

CategoryWanVideoWrapper

Inputs (1)

NameTypeDefaultDescription
samplesLATENT

Outputs (2)

NameTypeDescription
imagesIMAGEDecoded images from the samples dictionary
output_pathSTRINGOutput path if provided in the samples dictionary