β Big Text Switch
Pick between up to ten strings on the fly
- selected
Animation graphs are full of "this frame use prompt A, that frame use prompt B" moments, and manually rewiring is not an option mid-render. Big Text Switch [Dream] is the pack's answer for text: up to ten STRING inputs, one select value picks which one comes out. The same pattern repeats across the pack as Big Float/Int/Image/Latent/Palette switches - once you learn one, you've learned all six.
How it works
You plug strings into input_0 through input_9 (all optional - only connect the ones you use), set select to an index 0β9, and the node outputs that input as selected. The clever part is on_missing: because not every input is connected, the node needs to know what to do if you select an empty slot. Set it to previous and it walks backward to the nearest connected input; set it to next and it walks forward. So select doesn't have to match a connected slot exactly - the node finds the closest real value. Text inputs also have a special sentinel placeholder (β) so an unconnected-but-selected slot is reliably treated as "empty" rather than a blank string.
The inputs that matter
- select - INT, 0β9. The slot you want. This is the input you'll drive with a frame counter or
Boolean To Intto swap prompts mid-animation. - on_missing -
previousornext. What to do when the chosen slot is empty. - input_0 β¦ input_9 - the candidate strings. Up to ten, connect as many as you need.
Where it fits
Wire several Text Input [Dream] (or prompt-builder) outputs into it, drive select from a frame counter, and different parts of your animation get different prompts without touching the graph. It's also handy for toggling between a positive prompt and a test prompt by just changing one number. Note these Big switches evaluate all their inputs eagerly - the pack has (commented-out) Lazy switch variants that only run the selected branch, but as shipped, everything upstream of the switch runs.
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 main thing people trip on is select exceeding what's connected and then wondering why they get a weird value - that's the sentinel placeholder for unconnected text slots, which the on_missing logic is there to handle. Keep on_missing set deliberately. And because inputs are eager, if one of your ten branches is expensive (like an image pipeline), the switch won't save you compute - use it for cheap values like strings and numbers.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 00β9 | β |
| on_missing | COMBO | 2 options: previous, next | |
| input_0opt | STRING | β | β |
| input_1opt | STRING | β | β |
| input_2opt | STRING | β | β |
| input_3opt | STRING | β | β |
| input_4opt | STRING | β | β |
| input_5opt | STRING | β | β |
| input_6opt | STRING | β | β |
| input_7opt | STRING | β | β |
| input_8opt | STRING | β | β |
| input_9opt | STRING | β | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| selected | STRING | β |