Selector de imágenes
Pick or batch 12 image+mask pairs without touching a router
- img1
- mask1
- img2
- mask2
- img3
- mask3
- img4
- mask4
- img5
- mask5
- img6
- mask6
- img7
- mask7
- img8
- mask8
- img9
- mask9
- img10
- mask10
- img11
- mask11
- img12
- mask12
- image
- mask
Roughly once a month you build a workflow with several alternate image branches - different crops, different generators, different upscales - and you need one clean way to pick which one runs. That's this node. It gives you twelve image slots and twelve matching mask slots with a simple on/off switch per slot. Turn on one, you get that image and mask out. Turn on several, you get them concatenated into a batch. It's an A/B switch, a batch builder, and a mask carrier in one node, and it runs entirely locally - no API, no keys.
The "Pro" in the category name isn't marketing; it's the pairing with masks. Each slot carries imgN and its companion maskN, and both come out together, so you never have to worry about an image and its mask getting out of sync downstream - a classic source of silent errors in inpainting graphs.
The three modes
- auto - the sensible default: one active slot passes through, multiple active slots build a batch.
- single_only - refuses to batch; if more than one slot is on, it raises so you notice.
- batch_only - forces batch output even from a single slot (adds a leading dimension so downstream always sees a batch).
fallback covers the "nothing is on" case: either raise an error or silently fall back to slot 1.
The inputs that matter
- on1 … on12 - the toggle switches. This is the input you'll actually touch in normal use; most people wire everything to all slots and flip switches.
- img1…img12 / mask1…mask12 - the optional image and mask inputs.
- fallback / mode - described above.
Outputs: image and mask, matching the active slots.
Installing it
ComfyUI Manager → search "COMFYUI_PROMPTMODELS" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
No API key, no model files. ComfyUI >= 0.26.0 required.
Where people get burned
The error messages are actually the feature here - if a slot is switched on but has no image connected, it raises with exactly that explanation. The trap people hit is switching on a slot and forgetting to connect it, then wondering why the run stopped. Second, batching demands matching dimensions: every active image must have identical height/width/channels or it errors out. If you're mixing a 512px branch with a 1024px branch, normalize upstream before this node. And remember the switches are workflow state - if a saved workflow has slot 5 on from an old experiment, that's what runs.
Inputs (38)
| Name | Type | Default | Description |
|---|---|---|---|
| fallback | COMBO | slot1 | 2 options: error, slot1 |
| mode | COMBO | auto | 3 options: auto, single_only, batch_only |
| on1 | BOOLEAN | true | — |
| on2 | BOOLEAN | false | — |
| on3 | BOOLEAN | false | — |
| on4 | BOOLEAN | false | — |
| on5 | BOOLEAN | false | — |
| on6 | BOOLEAN | false | — |
| on7 | BOOLEAN | false | — |
| on8 | BOOLEAN | false | — |
| on9 | BOOLEAN | false | — |
| on10 | BOOLEAN | false | — |
| on11 | BOOLEAN | false | — |
| on12 | BOOLEAN | false | — |
| img1opt | IMAGE | — | |
| mask1opt | MASK | — | |
| img2opt | IMAGE | — | |
| mask2opt | MASK | — | |
| img3opt | IMAGE | — | |
| mask3opt | MASK | — | |
| img4opt | IMAGE | — | |
| mask4opt | MASK | — | |
| img5opt | IMAGE | — | |
| mask5opt | MASK | — | |
| img6opt | IMAGE | — | |
| mask6opt | MASK | — | |
| img7opt | IMAGE | — | |
| mask7opt | MASK | — | |
| img8opt | IMAGE | — | |
| mask8opt | MASK | — | |
| img9opt | IMAGE | — | |
| mask9opt | MASK | — | |
| img10opt | IMAGE | — | |
| mask10opt | MASK | — | |
| img11opt | IMAGE | — | |
| mask11opt | MASK | — | |
| img12opt | IMAGE | — | |
| mask12opt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |