Inputs Basic + Prompt Switch
One node that picks the prompt, loads the checkpoint, and sets the sampler
- MODEL
- CLIP
- VAE
- ckpt name
- sampler
- scheduler
- cfg
- steps
- latent
- width
- height
- seed
- batch size
- text
- label
- index
Normal workflow evolution in ComfyUI: you build a graph, then you add a text switch to cycle prompts, then you realize the prompts want different samplers and seeds, then you're wiring five nodes together just to make a list of presets work. AUNInputsBasicSwitch short-circuits all of that. It fuses a text index switch with the AUN Inputs Basic loader - pick one of up to 20 text slots and the node loads the checkpoint, the latent, and the sampler settings for you, with the switch's text driving the loader directly. No connection between them needed.
The mechanism is where it gets genuinely nice. Each text slot is scanned for key=value tokens - model, sampler, scheduler, cfg, steps, seed. Found tokens override the matching loader widgets, and are then removed from the text that goes out the text output. So a slot can be:
sdxl_base_v1.0.safetensors sampler=dpmpp_2m scheduler=karras cfg=4.5 steps=20 seed=42
A masterpiece, highly detailed
...and the node loads that checkpoint with dpmpp_2m/karras at CFG 4.5, while the prompt you actually pass to CLIP Text Encode is just "A masterpiece, highly detailed". One slot, self-contained. Any token whose key isn't on the list is left alone in the text.
Slot selection works like the AUN text switches: mode is Select (fixed index), Increment (step through minimum–maximum each run), Random, or Range (from the range string, e.g. 1,2,5-8,12). slot_count controls how many of the 20 text slots show - hidden slots keep their values and stay selectable.
The outputs are the full Inputs Basic contract: MODEL, CLIP, VAE, latent, plus ckpt name, sampler, scheduler, cfg, steps, width, height, seed, batch size as typed values you can wire into a KSampler - and the switch side: text, label, index. The inputs beyond the text slots are the loader widgets: ckpt_name, clip_skip (-1 is a good default), sampler/scheduler/cfg/steps/seed, and the latent sizing group (width, height, aspect_ratio, batch_size, megapixels, multiple). There's also speed_lora/speed_lora_model/speed_lora_strength if you run a model with a SpeedLoRA.
Worth knowing: the model= token resolves case-insensitively against your installed checkpoints, and falls back to the ckpt_name widget if nothing matches. And this node has the AUN collapse-connections mode done right - its 13 param/loader outputs converge to a single point while text, label and index stay visible, so you keep prompt-switching at a glance and hide the plumbing.
Install: ComfyUI Manager (search "AUN"), or cd ComfyUI/custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, restart. Manual installs that complain about missing piexif/cv2 need pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt.
Troubleshooting:
- A
model=token doesn't change the checkpoint → it doesn't match any installed file name; double-check spelling, then fall back to the widget. - Tokens vanishing from your prompt output is correct - that's the feature; anything not in the known list stays.
- In dynamic modes (Increment/Random/Range) the node re-executes every run, so treat those as "roll a new preset" modes.
Inputs (43)
| Name | Type | Default | Description |
|---|---|---|---|
| minimum | INT | 11–20 | Lowest text slot (1-20) that Increment and Random modes may select. |
| maximum | INT | 101–20 | Highest text slot (1-20) that Increment and Random modes may select. |
| mode | COMBO | Select | How the active text slot is chosen. Select = use the Index widget; Increment = step through the range each run; Random = random slot within the range; Range = pick from the Range list. |
| index | INT | 11–20 | The active text slot in Select mode - its text, label, and index are the outputs. |
| slot_count | INT | 21–20 | How many text slots are visible on the node. Hidden slots keep their values and remain selectable. |
| range | STRING | 1,2,5-8,12 | In Range mode: comma-separated slots or ranges to pick from (e.g. 1, 2, 5-8, 12). |
| text1 | STRING | Slot 1 | The text content for slot 1. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text2 | STRING | Slot 2 | The text content for slot 2. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text3 | STRING | Slot 3 | The text content for slot 3. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text4 | STRING | Slot 4 | The text content for slot 4. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text5 | STRING | Slot 5 | The text content for slot 5. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text6 | STRING | Slot 6 | The text content for slot 6. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text7 | STRING | Slot 7 | The text content for slot 7. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text8 | STRING | Slot 8 | The text content for slot 8. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text9 | STRING | Slot 9 | The text content for slot 9. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text10 | STRING | Slot 10 | The text content for slot 10. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text11 | STRING | Slot 11 | The text content for slot 11. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text12 | STRING | Slot 12 | The text content for slot 12. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text13 | STRING | Slot 13 | The text content for slot 13. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text14 | STRING | Slot 14 | The text content for slot 14. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text15 | STRING | Slot 15 | The text content for slot 15. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text16 | STRING | Slot 16 | The text content for slot 16. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text17 | STRING | Slot 17 | The text content for slot 17. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text18 | STRING | Slot 18 | The text content for slot 18. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text19 | STRING | Slot 19 | The text content for slot 19. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| text20 | STRING | Slot 20 | The text content for slot 20. Supports key=value tokens (model, sampler, scheduler, cfg, steps, seed) which are extracted and removed, overriding the matching loader widget values. |
| ckpt_name | COMBO | The checkpoint model file to load. | |
| speed_lora | BOOLEAN | false | Enable or disable SpeedLoRA optimizations. |
| speed_lora_model | COMBO | None | The SpeedLoRA model to apply. Select 'None' to disable SpeedLoRA. |
| speed_lora_strength | FLOAT | 1.000–3 | Multiplier applied to the selected SpeedLoRA weights. |
| clip_skip | INT | -1-24–-1 | Number of last layers of CLIP to skip. -1 is a good default. |
| sampler | COMBO | The sampling algorithm to use. | |
| scheduler | COMBO | The noise schedule to use. | |
| cfg | FLOAT | 2.0-2–100 | Classifier-Free Guidance scale. Higher values increase prompt adherence. |
| steps | INT | 101–10000 | Number of sampling steps. |
| width | INT | 72064–8192 | Image width. Used when 'aspect_ratio' is 'custom'. |
| height | INT | 72064–8192 | Image height. Used when 'aspect_ratio' is 'custom'. |
| aspect_ratio | COMBO | Select a predefined aspect ratio or ratio to automatically set width and height. | |
| aspect_mode | COMBO | Original | Random swaps dimensions 50% of the time, Swap forces a swap, Original keeps the original order. |
| batch_size | INT | 11–64 | Number of latent images to generate in a batch. |
| seed | INT | 0-18446744073709550000–18446744073709550000 | The random seed for generation. |
| megapixels | FLOAT | 1.00.1–16 | Target total megapixels used when a ratio is selected. |
| multiple | INT | 88–128 | Nearest multiple to round computed resolution to. Used with ratio. |
Outputs (16)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| VAE | VAE | — |
| ckpt name | STRING | — |
| sampler | * | — |
| scheduler | * | — |
| cfg | FLOAT | — |
| steps | INT | — |
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |
| seed | INT | — |
| batch size | INT | — |
| text | STRING | — |
| label | STRING | — |
| index | INT | — |