LoRA by Name (LoRA Control)
Let the workflow pick the character for you
- lora_stack
- lora_stack
- lora
If you have forty character LoRAs and you want a different one every run without touching the graph, this is the node. Name a pattern, tell it random or sequence, queue twenty prompts, walk away.
It's the least obvious of the four LoRA Control nodes and probably the most useful. The stack node is a nicer form of a form. This one changes what the workflow does between runs, which is what you want when you're exploring a folder of characters or hunting a style that only shows up at one seed.
How it works
pattern is matched against LoRA file names, case-insensitively, ignoring the folder - char- finds char-Alice.safetensors and CHAR-Bella.safetensors alike. It's a substring test, not a glob, until you type a wildcard character (*, ?, [...]), at which point it matches the whole name instead. So char-A* gets every char- LoRA starting with A, and *-ink gets anything ending in -ink; both the full filename and its extension-less stem are tested, so you don't need to remember whether the file ends in .safetensors in your pattern. Flip match_folder on and the folder path is matched as well, which is how you select a whole folder - characters/ - including the trailing slash as a deliberate anchor.
Then mode decides which one of the matches you get. random is a seeded choice: same seed, same LoRA, forever, so an old image's workflow reproduces its own image. sequence walks the matches in name order, one per run, wrapping at the end - the seed is the position in that list, so set it to 0 to start at the top of the alphabet. seed runs to 2^64-1 because ComfyUI seeds do.
A small script in the pack (js/lora_control.js) keeps the seed's "control after generate" in step with the mode: pick random and it flips to randomize, pick sequence and it flips to increment. It only fires when you change the mode or drop a fresh node in, so a saved workflow keeps whatever its control was saved with. That's deliberate - and it's also the answer to "why does my random picker pick the same LoRA every run", because a saved workflow with that control stuck on fixed will do exactly that.
One genuinely nice touch, straight from the source: in random mode the node looks at the stack coming in on lora_stack and refuses to pick a LoRA that's already in it, so two chained name pickers on char- never collide. In sequence mode it deliberately doesn't skip, because skipping would shift the run-to-run order you're stepping through.
Inputs and outputs
enabled- off means it passes the incoming stack through untouched and does nothing. The template ships this node off by default, so switching it on is one click.pattern,strength,mode,seed,match_folder- as above.strengthdefaults to 1.0, which for a lot of community LoRAs is already too hot; 0.7-0.85 is where most character LoRAs sit best.lora_stack(optional) - chain another stack node or picker in here; its LoRAs come first in the output.
It outputs lora_stack for the next node in the chain, and lora, a string naming the file it picked. Wire that string to a PreviewAny - the pack's own Z-Image template does exactly this - or into a filename prefix. Do it. With random mode on, "which character is this actually?" is a question you will ask, and the answer is only knowable from the graph that ran.
Install
# ComfyUI Manager: Custom Nodes Manager → search "LoRA Control"
comfy node install comfyui-lora-control
cd ComfyUI/custom_nodes && git clone https://github.com/nzkritik/comfyui-lora-control
Restart, then look under loaders › LoRA Control. No Python packages to install; it does need ComfyUI 0.3.48+ (V3 node API).
Common issues
"LoRA Control: no LoRA matches the pattern 'x'" stops the queue dead. That's on purpose - the author's view is that silently rendering without your character LoRA is worse than failing loudly. But it also fires on an empty pattern, so a node you switched on and haven't filled in blocks the whole queue.
Only files in models/loras exist as far as this node is concerned, and the full list is read fresh on each run, so a LoRA you just dropped in is visible immediately - no restart needed here, unlike the combo boxes on the stack node.
Cross-architecture picks. Your pattern doesn't know your checkpoint. A char- filter will happily hand you an Illustrious character LoRA on a Z-Image Turbo run; you'll get key-mismatch noise and a bad image rather than a clean error. Prefix your LoRAs per architecture and the pattern becomes a filter.
Stacking is the other trap, and it isn't this pack's fault. Z-Image Turbo is known for quality collapse when you run more than one LoRA at once, so a name picker plus a fixed style LoRA at full strength is exactly the combination that gets blamed on the wrong thing. Drop the second LoRA's strength first.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | — |
| pattern | STRING | Part of the file name, any case. Wildcards (* ? [..]) match the whole name instead: style-a* is every LoRA whose name starts with style-a. | |
| strength | FLOAT | 1.00-10–10 | — |
| mode | COMBO | random | random: a seeded random pick. sequence: each LoRA in name order, one per run. |
| seed | INT | 00–18446744073709550000 | Random: the same seed always picks the same LoRA. Sequence: the position in the sorted list, so set this to increment to take the next LoRA on every run. |
| match_folder | BOOLEAN | false | Also match the folder, so characters/ selects everything in that folder. |
| lora_stackopt | LORA_STACK | Chain another stack in; its LoRAs come first. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| lora_stack | LORA_STACK | — |
| lora | STRING | — |