Text Index Switch 5 Diffusers
The diffusers prompt switch with a file picker built into the editor
- text
- label
- index
- diffusion_name
- clip_name
- vae_name
- clip_type
- sampler
- scheduler
- cfg
- steps
- seed
If you're running a standalone diffusion UNet - the "diffusers-style" setup where the UNet, CLIP and VAE are separate files instead of one bundled checkpoint - you've already met the annoyance: every prompt change wants its own model combo, and typing exact filenames into key=value text by hand is how mistakes happen. AUNTextIndexSwitch5Diffusers is the Text Index Switch 5 tailored for exactly that world. Same up-to-20-slot switching, same Select/Increment/Random/Range modes, but the tokens it recognizes are the diffusers ones: diffusion_name, clip_name, vae_name, clip_type, plus sampler, scheduler, cfg, steps, seed.
So a slot can read:
diffusion_name=sd_xl_base_1.0.safetensors clip_name=clip_l.safetensors clip_type=stable_diffusion sampler=euler scheduler=normal cfg=7 steps=28
A neon-lit street at night
and you get "A neon-lit street at night" as the clean text output, while each of those tokens comes out on its own typed socket - diffusion_name, clip_name, vae_name and clip_type as STRINGs, cfg as FLOAT, steps and seed as INTs. Tokens on the list are stripped from the text output; anything else is left untouched. Absent tokens fall back to defaults (cfg 2.0, steps 10, seed 0, empty strings for the names).
The genuinely nice addition here is the editor popup. Double-click a text slot and you get dropdown selectors for the diffusion model, CLIP, VAE, and CLIP type - populated from your installed file lists - so you insert diffusion_name=... by picking from a list instead of hand-typing filenames that are easy to fat-finger. That single feature is why this node exists rather than just "use TextIndexSwitch5 and add tokens".
Inputs are the standard switch set (minimum, maximum, mode, index, slot_count, range, text1–text20); outputs are text, label, index, and the nine extracted values. The label comes from the connected node title, a custom label, or the first line of text.
One honest caveat: these outputs are strings (file names, clip type), not loaded models. The node picks the recipe; something else has to load it. In practice that means wiring the string outputs into loader nodes that accept names - the AUN Inputs Diffusers family (AUNInputsDiffusers, AUNInputsDiffusersBasic) or diffusers-style loaders where you convert the widget to an input. Don't expect a MODEL socket to appear here.
Install: ComfyUI Manager (search "AUN"), or cd ComfyUI/custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, restart. Missing piexif/cv2 after a manual install? pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt.
Troubleshooting:
- The dropdowns in the editor look empty → the node reads your installed file lists at load; if files were added since, restart or reload the workflow.
- A
clip_typetoken that doesn't match your setup does nothing downstream → it's just a string; make sure the loader you feed it to interprets it. - Tokens vanishing from
textis correct behavior - that's the whole trick; unknown keys stay.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| minimum | INT | 11–20 | The minimum index for selection (inclusive). |
| maximum | INT | 101–20 | The maximum index for selection (inclusive). |
| mode | COMBO | Select | Select mode: Select for fixed index, Increment for cycling through range, Random for random index within range, Range for selecting from a list of indices. |
| index | INT | 11–20 | Current or target index, constrained by slot_count). |
| slot_count | INT | 21–20 | Number of visible text slots. |
| range | STRING | 1,2,5-8,12 | A comma-separated list of indices or ranges to select from in Range mode (e.g. 1, 2, 5-8, 12). |
| text1 | STRING | Slot 1 | — |
| text2 | STRING | Slot 2 | — |
| text3 | STRING | Slot 3 | — |
| text4 | STRING | Slot 4 | — |
| text5 | STRING | Slot 5 | — |
| text6 | STRING | Slot 6 | — |
| text7 | STRING | Slot 7 | — |
| text8 | STRING | Slot 8 | — |
| text9 | STRING | Slot 9 | — |
| text10 | STRING | Slot 10 | — |
| text11 | STRING | Slot 11 | — |
| text12 | STRING | Slot 12 | — |
| text13 | STRING | Slot 13 | — |
| text14 | STRING | Slot 14 | — |
| text15 | STRING | Slot 15 | — |
| text16 | STRING | Slot 16 | — |
| text17 | STRING | Slot 17 | — |
| text18 | STRING | Slot 18 | — |
| text19 | STRING | Slot 19 | — |
| text20 | STRING | Slot 20 | — |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| label | STRING | — |
| index | INT | — |
| diffusion_name | STRING | — |
| clip_name | STRING | — |
| vae_name | STRING | — |
| clip_type | STRING | — |
| sampler | STRING | — |
| scheduler | STRING | — |
| cfg | FLOAT | — |
| steps | INT | — |
| seed | INT | — |