Anima 2B Dynamic Group Switcher
The 30-way prompt switch that bypasses whole groups for you
- text
Of the three nodes in this pack, this is the clever one. At first glance AnimaDynamicGroupSwitch looks like a plain text switch - pick one of up to 30 string inputs, get it out of text. But the front end does the part that's actually worth having: it looks at which ComfyUI group each connected input's source node lives in, names the dropdown options after those groups, and when you pick one it greys out (bypasses) every node in the other groups. It's a group switcher disguised as a text router.
What it's for
The workflow it's designed around: you've built two or three different style pipelines - say, one painterly chain with one set of artists, one lineart chain with another - and each lives in its own named group on the canvas. The final prompt string from each group wires into text_1, text_2, text_3 here. Flip the dropdown and you swap which prompt feeds your KSampler and bypass the losing groups so their nodes don't burn a frame of compute. For Anima in particular, where you're expected to keep a dozen artist styles in rotation, this is the "A/B my styles without dismantling the graph" node.
How it works
The backend is deliberately dumb: it parses the leading integer out of active_style ("2: Lineart Group" → 2) and returns the matching text_N input. The active_style combo starts with a single placeholder, 1: Unconnected, because the real options are generated by JavaScript at runtime based on what you actually connect - VALIDATE_INPUTS returns True so the backend accepts combo values it never saw at registration. The JS then does the group detective work: for each connected input it finds the source node, figures out which group that node sits inside, and rebuilds the dropdown as N: GroupName. The label on each input slot shows the group name too, so text_3 [Lineart Group] tells you exactly what you're switching between. Change a connection and the whole thing re-labels itself.
Inputs and output
- text_1 … text_30 - the channels. Each is a STRING input with
forceInput, so they're meant to be wired from prompt-building nodes (this pack's two templates, or any other text output). Unconnected slots show up as "Unconnected" in the dropdown; connect enough and they vanish. - active_style - the only required input, and it's the dropdown. Select which channel (and which group) is live.
- text - the single output: whatever the selected channel contained.
The catch
The dropdown is only as good as your group titles. It reads group.title, so the "Lineart" and "Painterly" names you see are whatever you named those groups - call your groups "Group 1" and "Group 2" and that's exactly what the switch will say. Name the groups before you wire things up, or the whole "dynamic" feature just returns two boring numbers. Also note the bypass logic keys off the group the source node lives in, so it only does its thing when the input is actually connected to a node inside a group - a floating unconnected text_2 won't grey anything out (there's nothing to grey).
Install
Same pack, same story - no dependencies beyond ComfyUI itself:
cd ComfyUI/custom_nodes
git clone https://github.com/mizukir0418-gif/ComfyUI-Anima-Style-Explorer-Prompt.git
Restart ComfyUI and it shows up under Anima2B (the only node in the pack with its own category). Manager users: search the pack title. The ~1.6 GB sidebar database for the style browser is optional and unrelated to this node.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| active_style | COMBO | 1 options: 1: Unconnected | |
| text_1opt | STRING | — | |
| text_2opt | STRING | — | |
| text_3opt | STRING | — | |
| text_4opt | STRING | — | |
| text_5opt | STRING | — | |
| text_6opt | STRING | — | |
| text_7opt | STRING | — | |
| text_8opt | STRING | — | |
| text_9opt | STRING | — | |
| text_10opt | STRING | — | |
| text_11opt | STRING | — | |
| text_12opt | STRING | — | |
| text_13opt | STRING | — | |
| text_14opt | STRING | — | |
| text_15opt | STRING | — | |
| text_16opt | STRING | — | |
| text_17opt | STRING | — | |
| text_18opt | STRING | — | |
| text_19opt | STRING | — | |
| text_20opt | STRING | — | |
| text_21opt | STRING | — | |
| text_22opt | STRING | — | |
| text_23opt | STRING | — | |
| text_24opt | STRING | — | |
| text_25opt | STRING | — | |
| text_26opt | STRING | — | |
| text_27opt | STRING | — | |
| text_28opt | STRING | — | |
| text_29opt | STRING | — | |
| text_30opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |