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

VOID PQ5 Encode Video

Prep your footage for the VOID model (and keep track of the original frame count)

By jaskirat05·Created 5 months ago·Updated 5 months ago· 0
VOID PQ5 Encode Video
  • model
  • video
  • encoded_video
  • original_frame_count
  • video_preview

Before the VOID sampler can regenerate your video, it needs the input in a very specific shape: the right resolution, the right number of frames, and a frame count that satisfies the model's temporal constraints. This node does that preprocessing - it's the "make my arbitrary footage fit what a 5B video transformer expects" step. It doesn't do any generation, and despite the "Encode" in the name it doesn't run the VAE; it's resizing and temporal padding, plus a bookkeeping output you must not lose.

That bookkeeping output is the sneaky important part. original_frame_count is the number of frames you actually gave it, before all the padding. You feed that number into VOID PQ5 Decode Video at the end so the decoded result is trimmed back to your real video length - otherwise you'd get the padded length back and wonder why your output is longer than the input.

How it works

It takes your video as an IMAGE batch and, using the model's config from the loaded pipeline:

  1. Clamps and trims to the model's max_video_length (the config default is 197 frames, and the VOID pipeline works in temporal windows).
  2. Resizes to the model's sample_size (384×672 by default, area interpolation).
  3. Temporal padding: the model needs frame counts of the form (N // 4) * 4 + 1 - that's the video diffusion "multiples of 4 + 1" constraint. If your clip doesn't match, the node pads by mirroring frames (flipping the video along time and appending) until it does, capped at the max length.
  4. Emits a video_preview of the padded, resized result so you can see what the model will actually consume.

The inputs that matter

  • model - from VOID PQ5 Load Model. The config (sample size, max length, temporal window) comes from the loaded pipeline, not from this node's own knobs - that's why it needs the model wire.
  • video (IMAGE) - your footage. In the example workflow that's VHS_LoadVideo output; for the two-pass workflow it's pass-1's output video being fed back in.

Outputs:

  • encoded_video (PQ5_VIDEO_TENSOR) → the sampler's encoded_video input.
  • original_frame_count (INT) → route this to VOID PQ5 Decode Video's original_frame_count. The example workflow does exactly this (via the VHS loader's frame-rate info feeding the same slot).
  • video_preview (IMAGE) - what the model will see.

Install & gotchas

Pack standard (Manager → "ComfyUI-NetflixVoid", or clone into custom_nodes). No downloads of its own; requires the loaded pipeline from VOID PQ5 Load Model.

Two things to watch: if your clip is longer than the model's max length it gets silently trimmed - the video_preview is how you catch that, so glance at it. And the quadmask stage must agree with this node on frame count: the sampler errors if encoded_video and encoded_quadmask don't have the same T, so whatever max_video_length/temporal_window_size you set on VOID PQ5 Encode Quadmask needs to match what this node produced. When in doubt, leave those encode-quadmask settings at their defaults.

CategoryVOID/PQ5

Inputs (2)

NameTypeDefaultDescription
modelPQ5_MODEL
videoIMAGE

Outputs (3)

NameTypeDescription
encoded_videoPQ5_VIDEO_TENSOR
original_frame_countINT
video_previewIMAGE