Set Variable Rack
Feed Unprompted 26 values without one giant prompt box
- input_a
- input_b
- input_c
- input_d
- input_e
- input_f
- input_g
- input_h
- input_i
- input_j
- input_k
- input_l
- input_m
- input_n
- input_o
- input_p
- input_q
- input_r
- input_s
- input_t
- input_u
- input_v
- input_w
- input_x
- input_y
- input_z
- STRING
Here's the problem this node exists to solve: the main Unprompted node is brilliant at templating, but all your dynamic values have to live in one text box. Want the filename from a node, a randomly chosen style tag, a mask, all flowing into the same template? You'd be juggling [set var]...[/set] shortcodes inside string_field and praying it stays readable. Set Variable Rack (class UnpromptedSetRack) is the visual answer - a companion to the Unprompted node that hands values over as actual graph wires instead of typed syntax.
It's a simple idea done simply. The node has 26 inputs, input_a through input_z, and 26 text fields, var_a through var_z. Wire anything into input_x and type a name into var_x, and when the node runs, that value gets stored in the shared Unprompted engine as a variable. Downstream, inside an Unprompted node's string_field, you pull it back with the language's variable syntax - {name} (which is shorthand for [get name]). The two nodes talk to each other through the same engine instance, so ordering in the graph is all that matters; the rack just has to execute before the Unprompted node reads it.
The inputs that matter
- The 26
input_a–input_zports are wildcard*types - they'll accept a string, an image, a number, whatever you drop in. That any-type looseness is the whole point; it's the same trick other packs use to let one node swallow anything. - The
var_a–var_zfields are the names of those variables. Don't put content in here; put the token you want to reference in your prompt.
That second bullet is the trap, and it's worth spelling out: the defaults are literally var_a, var_b, and so on. If you wire a string into input_a and never touch the name field, you've just created a variable called var_a - which is probably not what you meant. Rename it to character or pose and then use {character} in your template. Took me one confusing workflow to learn this, so consider the warning free.
What comes out
A single STRING output that is always empty. That's not a bug - the rack's real output is the side effect of populating variables. Don't wire it into a CLIP encoder; the actual prompt processing happens in the Unprompted node. Treat this node as a waystation, not a producer.
The catches
Because the rack writes into the same persistent engine the main node uses, variables live on between queues. If a later workflow doesn't overwrite a name, a stale value can quietly leak into your next prompt. The fix is the same one the pack recommends anyway: enable goodbye_routines on the final Unprompted node in your workflow, which clears the shared variables after the run. Also note this node only stores an input when it's actually connected - an unplugged port is ignored, so you don't need to populate all 26.
Installing it
Same pack as the Unprompted node, so you get it either way: ComfyUI Manager (search ComfyUI-Unprompted), or git clone https://github.com/ThereforeGames/ComfyUI-Unprompted into ComfyUI/custom_nodes, then restart. First launch triggers an auto-install of the engine's pinned dependencies (unprompted, opencv-python, nltk, pattern), which is heavy and one-time - the first boot after install takes a minute or two.
Added in pack v0.3.0, the rack is newer than the node it serves and still lightly traveled. For a beginner it's a nice-to-have; for anyone building a big dynamic-prompt workflow with several moving parts, it's the difference between a readable graph and a wall of shortcode soup. If that's you, it's worth the install.
Inputs (52)
| Name | Type | Default | Description |
|---|---|---|---|
| input_aopt | * | — | |
| input_bopt | * | — | |
| input_copt | * | — | |
| input_dopt | * | — | |
| input_eopt | * | — | |
| input_fopt | * | — | |
| input_gopt | * | — | |
| input_hopt | * | — | |
| input_iopt | * | — | |
| input_jopt | * | — | |
| input_kopt | * | — | |
| input_lopt | * | — | |
| input_mopt | * | — | |
| input_nopt | * | — | |
| input_oopt | * | — | |
| input_popt | * | — | |
| input_qopt | * | — | |
| input_ropt | * | — | |
| input_sopt | * | — | |
| input_topt | * | — | |
| input_uopt | * | — | |
| input_vopt | * | — | |
| input_wopt | * | — | |
| input_xopt | * | — | |
| input_yopt | * | — | |
| input_zopt | * | — | |
| var_aopt | STRING | var_a | — |
| var_bopt | STRING | var_b | — |
| var_copt | STRING | var_c | — |
| var_dopt | STRING | var_d | — |
| var_eopt | STRING | var_e | — |
| var_fopt | STRING | var_f | — |
| var_gopt | STRING | var_g | — |
| var_hopt | STRING | var_h | — |
| var_iopt | STRING | var_i | — |
| var_jopt | STRING | var_j | — |
| var_kopt | STRING | var_k | — |
| var_lopt | STRING | var_l | — |
| var_mopt | STRING | var_m | — |
| var_nopt | STRING | var_n | — |
| var_oopt | STRING | var_o | — |
| var_popt | STRING | var_p | — |
| var_qopt | STRING | var_q | — |
| var_ropt | STRING | var_r | — |
| var_sopt | STRING | var_s | — |
| var_topt | STRING | var_t | — |
| var_uopt | STRING | var_u | — |
| var_vopt | STRING | var_v | — |
| var_wopt | STRING | var_w | — |
| var_xopt | STRING | var_x | — |
| var_yopt | STRING | var_y | — |
| var_zopt | STRING | var_z | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |