β Big Image Switch
Route between up to ten images with one number
- input_0
- input_1
- input_2
- input_3
- input_4
- input_5
- input_6
- input_7
- input_8
- input_9
- selected
Sometimes you need the graph to pick which image to process based on a condition - frame 1β100 from camera A, frames 101β200 from camera B. Big Image Switch [Dream] is that router: up to ten IMAGE inputs, a select integer chooses which one flows out as selected. Same design as the pack's other Big switches, just for full images.
How it works
Connect images into input_0 through input_9, set select to an index, and the selected image passes through untouched. Since most slots stay empty, on_missing decides the fallback: previous walks down to the nearest connected input, next walks up. Image slots don't have a sentinel value (an empty IMAGE input is just None), so the fallback logic simply skips unconnected slots.
The inputs that matter
- select - INT, 0β9. Which slot to output. Drive it from a frame counter or a comparison node to switch images mid-sequence.
- on_missing -
previousornextfallback when the chosen slot is empty. - input_0 β¦ input_9 - the candidate images.
Where it fits
This is a value node in a bigger animation graph: swap between reference frames, toggle between two Image Motion [Dream] outputs, pick a base image based on progress. One honest caveat - because the switch evaluates eagerly, every connected image pipeline upstream runs regardless of selection. For images that's usually fine (they're cheap-ish), but if one branch is a heavy sampler you're not actually avoiding the work by switching.
Installing it
Ships with Dream Project Animation Nodes - ComfyUI Manager (search Dream Project Animation) or clone https://github.com/alt-key-project/comfyui-dream-project into custom_nodes, pip install -r requirements.txt, restart. No model downloads.
Common issues
The two stumbles are the same as the rest of the switch family: forgetting that select is 0-indexed (input_0 is the first), and expecting the switch to skip work on unselected branches. It won't. If you genuinely need lazy evaluation of image pipelines, the pack's Lazy switch code exists but isn't shipped active, so plan around the eager behavior.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 00β9 | β |
| on_missing | COMBO | 2 options: previous, next | |
| input_0opt | IMAGE | β | |
| input_1opt | IMAGE | β | |
| input_2opt | IMAGE | β | |
| input_3opt | IMAGE | β | |
| input_4opt | IMAGE | β | |
| input_5opt | IMAGE | β | |
| input_6opt | IMAGE | β | |
| input_7opt | IMAGE | β | |
| input_8opt | IMAGE | β | |
| input_9opt | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| selected | IMAGE | β |