Get First Image
Grab the first frame of a video batch without killing the rest of it
- image
- image
- count
If you've ever wanted to hand a video to an image-model or an LLM task and been told "sorry, that's a batch, trim it first" - this is the node that gets you out of that. Get First Image takes an image batch [B,H,W,C] (or a list of image tensors) and returns just the first frame, as a clean single image. It's one of those boring little nodes you don't think about until you need it, and then it saves you a whole detour through batch-slice math.
The author's own framing is the best one-liner for when to reach for it: feed the first frame of a video or chain into an image-description (Smart LM) task without forcing video-mode summarization or trimming. If your chain feeds the whole batch into a vision model that wants one image, you either pre-trim frames or the model does something annoying with the timeline. This node sidesteps both. It's also handy for image-to-video work where you want the first frame of a loaded clip as your start image.
How it works
Mechanically it's about as simple as it looks: the input is flattened into its list of frames, the node returns frames[0], and its second output tells you how many frames were actually there. The count output is easy to ignore, but don't - it's a free sanity check. If you wire count into a Show Text or log node you'll immediately see whether you fed in a 24-frame clip or accidentally a single image, which makes debugging the rest of the workflow much less mystical.
If the input is empty (nothing connected, or a list that flattened to zero frames), the node logs a warning and returns a 1×64×64 black image with count = 0 rather than crashing. That's graceful, but it's also a silent-failure trap: a black 64×64 frame can flow downstream and do something weird before you notice. Check the console, or check count.
Wiring it up
- image (in) - the batch or list of images.
- image (out) - a single
[1,H,W,C]frame, straight into a Preview, Save, a detailer, or a vision model. - count (out) - total frames that went in.
A single image passes through unchanged, so you can leave it in a chain permanently without it doing any harm when the batch happens to be one frame.
Installing it
This node ships in the ComfyUI_Eclipse pack, which is a big all-in-one utility suite from r-vage (the RvTools lineage). Easiest route is ComfyUI Manager → Custom Nodes → search ComfyUI_Eclipse, or from a terminal:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse
Restart ComfyUI and you'll find it under Eclipse → Image → Batch Operations. The pack's requirements.txt is mostly packages ComfyUI already ships (torch, numpy, Pillow, opencv-python); on a bare install you may need to pip install -r requirements.txt once. One real gotcha: Eclipse is built against the newer ComfyUI API and its fancier widgets want frontend 1.51.2+, so if you're on an old portable install, update ComfyUI first or some nodes won't behave.
The catch worth knowing
Because this pack's v4.0 cleanup removed all legacy nodes, old workflows made with the previous RvTools_v2 line won't load as-is - there's a Workflow Migration Tool built in if you hit that. For this node specifically, none of that matters; it's new and tiny. The one thing to remember is the black-placeholder behavior on empty input. Feed it something, check the count, move on.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image batch [B,H,W,C] or list of images. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| count | INT | — |