Nodes/KJNodes for ComfyUI/Get Preview Override Frames
ComfyUI Node Runs on cloud

Get Preview Override Frames

Save the frames from the denoise preview

By kijai·Created 3 years ago·Updated 2 days ago· 3,030
Get Preview Override Frames
  • model
  • after_sample
  • frames

You know the little live preview that updates while a sampler denoises, the image slowly resolving out of noise? This node lets you capture that whole sequence as real frames you can save. It's the second half of a two-node pair: a Model Preview Override node records the intermediate previews during sampling, and Get Preview Override Frames hands them to you afterward as an image batch. People use it to make those satisfying "watch it denoise" animations, or just to inspect how a generation evolved step by step.

It's part of KJNodes, kijai's utility pack, in the sampling group.

How it works

The Model Preview Override node, wired into your model before the sampler, captures the preview frames as sampling runs. Those frames sit there until something asks for them - which is what this node does. The tricky part is timing: ComfyUI needs to run this node after sampling finishes, or the frames won't exist yet. The node solves that with a small trick built into its inputs, which is why it takes an after_sample connection that has nothing to do with the frames themselves.

The inputs and output that matter

  • model - wire this from the same Model Preview Override node that's feeding your sampler. That's the source of the captured frames.
  • after_sample - connect this to something downstream of the sampler (the sampler's LATENT or IMAGE output). It's a sequencing hook: by depending on a post-sampling value, the node is forced to execute after sampling completes, so the frames are ready. It's not used for its data - it's there to pin execution order.

The output is frames, an IMAGE batch of the captured previews. Send it to a video-combine to make the denoise animation, or a save node to keep the sequence.

Installing it

ComfyUI Manager → search KJNodes for ComfyUI → install → restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt, and restart.

Where people get burned

  • No frames without the override node. This node doesn't capture anything itself - it only retrieves what Model Preview Override recorded. If you wire it up without that node upstream feeding the same sampler, there's nothing to hand back.
  • Wiring after_sample wrong. The whole reason that input exists is execution order. Connect it to the sampler's output (or something after it), not to something that runs before sampling - get that backwards and the node may run early and come back empty.
  • Same model, both places. The model here has to be the exact Model Preview Override instance that fed the sampler, not a separate copy of the model. It's the specific override node that holds the captured frames.
CategoryKJNodes/sampling

Inputs (2)

NameTypeDefaultDescription
modelMODELThe model output by Model Preview Override (used to locate the captured frames).
after_sampleLATENT,IMAGEAnything from after the sampler (LATENT or IMAGE). The value is ignored — it just forces this node to run after sampling.

Outputs (1)

NameTypeDescription
framesIMAGE