๐๏ธ VRGDG_Extract_Frame_Number
Turn one frame number into a list, and let the frames ride along
- images
- masks
- index_list
- images
- masks
Some nodes generate; some nodes organize. VRGDG_Extract_Frame_Number is firmly in the second camp - it's a small plumbing helper that takes a single frame number, turns it into an index_list that other nodes can iterate over, and lets any images or masks you hook in pass straight through on the way.
What it's for. In video pipelines you constantly hit the mismatch where one part of the graph wants a single number ("use frame 7") and another part wants a list ("here are the frames to process"). This node bridges that: you give it frame_number, and it hands back an index_list (a LIST output) containing the index or indices you need for downstream looping and batching nodes. It lives in the image category because its party trick is the passthrough - wire an IMAGE batch into images and a MASK into masks, and they come out the other side untouched alongside your list. So a node further down gets both "which frames" and "the actual frames" in one connection, without you building a separate pass-through branch.
The inputs. Three, and two are optional:
frame_number- the INT you care about. This is the only input you must set.images(optional) - an image batch to carry through.masks(optional) - a mask batch to carry through.
The outputs. index_list (LIST), images (IMAGE), masks (MASK). If you didn't connect images or masks, those outputs are simply empty.
This fits the pack's philosophy well - VRGameDevGirl's workflows are built around the idea that scene/frame indices drive everything, and half the battle is getting those numbers to the right node in the right shape. Extract_Frame_Number is the shape-shifter for that job.
Installing it. It's part of the vrgamedev pack, so:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
or install via ComfyUI Manager and restart.
Troubleshooting. The main thing to check is the data type on the wire. index_list is a LIST output, not a plain INT - if the node you're feeding expects an integer, the connection may refuse or behave oddly. And because the images/masks passthrough does no processing, what you get out is exactly what you put in: if the downstream node sees the wrong frame, the answer isn't here, it's in whatever produced the image batch. This is a utility node with a narrow, honest job - if you're expecting it to actually extract a frame into its own image, that's not it. It extracts a number into a list, and that's plenty useful.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_number | INT | 1 | โ |
| imagesopt | IMAGE | โ | |
| masksopt | MASK | โ |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| index_list | LIST | โ |
| images | IMAGE | โ |
| masks | MASK | โ |