BFS Shot Unpack
Crack a shot open and use it with any video model
- shot
- guide_frames
- refs
- ref_count
- prompt
- length
- first_frame
- audio
- width
- height
- index
- shot
- previous_result
- mask
The escape hatch out of the H3-specific part of the shot loop
BFS Shot Planner hands downstream nodes a BFS_SHOT object - one per shot, opaque, with everything a shot knows about itself inside. The H3 nodes in the pack understand that object natively. For every other model, you use this: it takes one shot and returns plain values you can wire into Wan, LTX, or anything else with a guide input and a reference input.
It's also the diagnostic node. If the shot loop is misbehaving and you can't tell whether the plan or your graph is at fault, this is where you watch a single shot turn into frames, a prompt and a number.
What comes out
Twelve outputs, all plain ComfyUI types, and they're the complete contents of the shot:
guide_frames- the shot's frames, already at a length the model accepts (17n+5for H3,8n+1for LTX/Wan, whatever the plan's frame grid says).ref_imageandref_image_2- this shot's references, or a grey placeholder if nothing was set. The placeholder is deliberate: it keeps the graph shape stable, so a shot without a reference doesn't break the wiring half way through a queue loop. If your result looks like it was swapped with a grey card, check whether the reference actually made it into the plan.prompt- the shot's prompt, after the planner's global fallback.length- frames to generate, grid-valid.first_frame- the shot's first guide frame, handy for an image-to-video path that wants a real starting frame.audio- the shot's soundtrack, or silence of the right length if the source has none.width,height- generation size.index- 0-based shot number. Useful for a seed expression likeseed + indexso each shot doesn't come out identical.shot- the shot unchanged, which is what you feed to BFS Shot Repack after editing the pieces.previous_result- the frame this shot continues from when the plan has continuity enabled (queue loop, or the duet renderer); grey when it doesn't.mask- the shot's SAM 3 mask over the guide frames, all ones if the plan has no mask.
The pattern
Planner ─ shots ─► Shot Unpack ─ guide_frames ─► your model's guide / VAE Encode path
─ ref_image ────► your model's reference node
─ prompt ───────► your prompt node
─ length ───────► frame count
─ shot ─────────► Shot Repack (if you edit anything)
... sample, decode ...
BFS Shot Join ◄────── the decoded list ────────────────┘
ComfyUI does the level work for you: every node on that path that receives the list runs once per shot, and the lists pair by index. The only thing you must not do is disassemble the list halfway - keep the shot objects together until the join.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/alisson-anjos/ComfyUI-BFSNodes
cd ComfyUI-BFSNodes && pip install -r requirements.txt
Restart. This node itself is pure plumbing and needs none of the pack's heavy dependencies, but they're installed together with it anyway.
Two things people trip on
guide_frames arrives at the generation size, not the source size - if your model wants a specific resolution, you resize; the node won't do it for you. And previous_result isn't a free pass: it only has a value when the plan asked for continuity and the previous shot's result is available, which in practice means queue loop or BFS Shot H3 Duet. In auto loop with a plain sampler it's grey, and a workflow built around it will quietly render grey-anchored shots until you notice.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| shot | BFS_SHOT | — |
Outputs (13)
| Name | Type | Description |
|---|---|---|
| guide_frames | IMAGE | The shot's guide frames, already at a length the model accepts. |
| refs | IMAGE | This shot's reference pictures, <Picture 1> first, as a list: the next node runs once per picture (e.g. a background remover), and BFS Shot Repack's refs input puts them back in this shot. A grey placeholder when the shot has none. |
| ref_count | INT | How many reference pictures the shot has. |
| prompt | STRING | This shot's prompt. |
| length | INT | Frames to generate (the grid-valid length). |
| first_frame | IMAGE | First guide frame of the shot. |
| audio | AUDIO | Soundtrack of the shot (silence if the video has none). |
| width | INT | Generation width. |
| height | INT | Generation height. |
| index | INT | Shot index (0-based). |
| shot | BFS_SHOT | The same shot, unchanged: connect it to BFS Shot Repack after editing the pieces. |
| previous_result | IMAGE | The previous shot's result frame this shot continues from (Continuity in the planner; queue loop), or a grey image. |
| mask | MASK | The shot's SAM 3 mask over the guide frames (in the crop when the shot is cropped), or all ones. |