VAE Decode Last Frame (CRT)
One node to grab the last frame of a video latent without decoding the whole thing
- samples
- vae
- IMAGE
Somewhere in almost every video workflow there's a moment where you just want to see the result without paying for the full decode. VAE Decode Last Frame (CRT) is that shortcut: it decodes a latent batch but keeps only the last item. For a video latent - shaped [batch, channels, frames, height, width] - that means one image: the final frame. Feed it a still-image batch and it gives you the last image in the batch. Either way, out comes a single IMAGE instead of a whole clip.
Why bother? Video decode is expensive. If all you need is a preview thumbnail, an end-card check, or the final frame to feed back into a chain loop, decoding 121 frames just to look at frame 121 wastes VRAM and time. This node skips straight to the point.
How it works
It's a thin wrapper over ComfyUI's regular VAE decode, with one slice on the way in. The latent tensor gets trimmed to its last item (samples[-1:]), and for 5D video latents it also keeps only the last temporal frame. Then it decodes and reshapes the result back to a plain 4D image tensor. The VAE itself does all the real work - this node is just deciding what gets decoded, which is exactly the kind of plumbing utility CRT-Nodes specializes in.
The source is easy to read if you're curious: it handles nested latents too (unbinding and restoring the batch dim), which covers the newer ComfyUI latent formats where samples can be a nested structure rather than a plain tensor.
Inputs and outputs
Two inputs, both obvious:
samples- the LATENT you want decoded. This is your video latent from the sampler, or any image latent batch.vae- the VAE used for decoding. Wire in whatever VAE your model uses (or an auto-downloaded one from CRT's AutoDL nodes).
One output: IMAGE - the decoded last frame. From there it plugs into a preview node, a Save Image, or back into the graph.
Installing it
Part of CRT-Nodes, installed once for all its nodes. ComfyUI Manager → search CRT-Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt
Restart ComfyUI after. The pack's requirements are heavy (opencv, librosa, faster-whisper, transformers…), so the install takes a minute even though this one node needs almost nothing beyond core ComfyUI.
When you'd reach for it
The honest use case list: a preview node that should show the final frame of a video instead of a mid-clip still, a first/last-frame pair for loop or extend workflows, and any chain where the next stage needs the endpoint of the previous clip. CRT's own Get First & Last Frame covers the "grab both ends" version; this node is the "I only want the end" version.
One note: it decodes after trimming, not before, so it doesn't even load the other frames into pixel space. If you're comparing the last frame across a batch of generated videos, this is the cheap way to line them up.
Common issues
There's not much to break here, and that's the point. If the node shows NaN or a red socket after a pack update, the standard CRT fix applies: right-click → Fix node (recreate). And remember it's slicing the last item - if you think you're getting frame zero, you've wired it into the wrong workflow half.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | The latent to be decoded. | |
| vae | VAE | The VAE model used for decoding the latent. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | The decoded last frame. |