Nodes/ComfyUI-NetflixVoid/VOID PQ5 Decode Video
ComfyUI Node

VOID PQ5 Decode Video

Latents back into frames, trimmed to your real video length

By jaskirat05·Created 5 months ago·Updated 5 months ago· 0
VOID PQ5 Decode Video
  • model
  • latents
  • video
original_frame_count1

The last node in the VOID pipeline, and the one whose output you actually save. It takes the latents from VOID PQ5 Sampler, runs them through the model's VAE decoder, and hands you a normal IMAGE batch you can feed into VHS_VideoCombine (or any video saver) to get an mp4. If the sampler is where the GPU works, this is where it finishes.

There's one input here that trips people up constantly, and it's the whole reason this article exists: original_frame_count. The sampler works on latents that were padded to the model's temporal shape - (N // 4) * 4 + 1 and capped at the model's max length. If you decode that and save it blindly, you get a video that's longer than your source clip, with mirrored/padded frames tacked on. original_frame_count tells the decoder how many frames to keep, and it trims the output to exactly your input length.

How it works

It VAE-decodes the latent batch, moves the result to CPU as floats, permutes it from the model's [B, C, T, H, W] layout into ComfyUI's [T, H, W, C] IMAGE format, clamps to 0–1, then slices off everything after original_frame_count. That's it - decode, trim, hand back frames.

The inputs that matter

  • model - from VOID PQ5 Load Model. It needs the model wire because the VAE lives in the pipeline bundle.
  • latents - the sampler's output.
  • original_frame_count (INT, default 1) - the frame count of your original video. Don't leave this at 1. In the example workflow it's fed from VOID PQ5 Encode Video's original_frame_count output (the encode node tracks the true length before padding). If you're doing two-pass VOID, note that pass-2's decode trims to its input's frame count, which is pass-1's output - same number, since pass 1 didn't change length.

Output: video (IMAGE) - a clean frame batch ready for VHS_VideoCombine.

Install & gotchas

Pack standard (Manager → "ComfyUI-NetflixVoid", or clone into custom_nodes). No downloads; the VAE comes from the loaded pipeline bundle.

Two failure shapes worth knowing. Set original_frame_count wrong (too high) and you'll see the mirrored padding frames at the end of the output - the fix is wiring the encode node's count through, not guessing. And if your decoded video is a different resolution than your source, that's not this node - the encoder resized to the model's 384×672 and nothing upscales it back; a post-pass upscaler is on you if you need the original resolution back.

CategoryVOID/PQ5

Inputs (3)

NameTypeDefaultDescription
modelPQ5_MODEL
latentsPQ5_LATENTS
original_frame_countINT11–100000

Outputs (1)

NameTypeDescription
videoIMAGE