ComfyUI Node

LoRA Mixer

Roll a random handful of LoRAs into your prompt

By alexopus·Created 28 days ago·Updated 14 days ago· 1
LoRA Mixer
    • prompt
    ◄path►
    ◄include_subfolderstrue►
    ◄min_count1►
    ◄max_count3►
    ◄min_weight0.50►
    ◄max_weight1.00►
    ◄seed0►

    Here's the thing people get wrong on first read: the LoRA Mixer doesn't load a LoRA. No model or clip output, no weights touched. It writes text.

    <lora:styles/my_lora:0.73>, my_style, retro
    <lora:styles/other_lora:0.51>
    

    One line per LoRA, each with its own random weight and its own trigger words, mixed into a single string you wire into whatever node consumes your prompt. Useful when you have 200 style LoRAs and no idea which three play nicely together, or when you're building a roll-the-dice generation loop.

    What it actually does

    It filters ComfyUI's own LoRA list - the same one every loader dropdown reads - down to one folder. path is relative to the LoRA root (empty means the root itself, forward slashes are fine: styles/anime), and include_subfolders decides whether that's "exactly this folder" or "this folder and everything under it".

    Then it rolls: a random count between min_count and max_count, and it samples that many distinct files, so you'll never see the same LoRA twice in one output. Each gets a weight drawn between min_weight and max_weight, rounded to two decimals. The tag comes out as <lora:name:weight>, with the LoRA's keywords appended after a comma.

    Those keywords come from the .txt sidecar sitting next to the file - <name>.txt, same base name - which is the convention the rest of this pack uses for descriptions. A keywords: line wins, otherwise the whole text is treated as keywords, and multi-line keywords get joined with , to stay at one line per LoRA. Note what the mixer ignores: a weight: line in that description is thrown away. The sidebar's copy button honours it; the mixer rolls its own. If you want fixed weights, this isn't the node.

    Undirected LoRA selection isn't new - people hacked it with wildcards on Forge, substituting <lora:0.25>, <lora:0.5> lines into __lora1__ slots to hunt weight sweet spots. This is that trick with the folder listing automated.

    The inputs you'll actually touch

    Most of the inputs have defaults you can leave alone on a first run.

    • path - the folder. Get this wrong and the node raises LoRA Mixer: no LoRAs found in '<path>' and kills the run. That's deliberate; an empty output would look like "the LoRA did nothing" for half an hour.
    • min_count / max_count - defaults 1 and 3. Order doesn't matter, the node sorts them. It's also capped by the folder: ask for 8 out of 3 and you get 3.
    • min_weight / max_weight - defaults 0.5 and 1.0, going as low as -5 if you're doing negative LoRA work.
    • seed - the thing that makes it re-run. ComfyUI caches node outputs, so without a changing input you'd get the same draw forever. Leave the control-after-generate dropdown on randomize for a fresh pick each queue, or pin it to reproduce a mix.

    The single output is prompt, a STRING. Feed it to a prompt or wildcard node that understands the <lora:...> tag - that's A1111/Forge syntax, not something ComfyUI invented, and the README points at Impact Pack's wildcard processor as the usual consumer. Whatever it lands in has to parse the tag; a node that only concatenates strings passes the text along and nothing gets applied.

    Install

    No requirements.txt, no model downloads, no pip surprises - the backend uses aiohttp and ComfyUI's own folder_paths, both already there.

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexopus/ComfyUI-LoRA-Sidebar
    

    Restart ComfyUI, or search "LoRA Sidebar" in ComfyUI Manager. Same author as ComfyUI-Image-Saver, so there's some track record behind it.

    Be honest about what you're installing, though. The pack is mostly a browsing UI - a grid of your LoRAs with previews and descriptions read from sibling .png/.txt files, folder navigation, Civitai lookup. The Mixer is one node bolted onto it.

    Where people get burned

    Random weights on character LoRAs. The 0.5–1.0 default is SDXL-era advice. It's fine for a folder of styles, lighting and detail LoRAs - the honest use case. It's a bad idea for characters, where picking three at random means one face bleeding into another, and where plenty of newer architectures want weight 1.0 or above because dropping it costs likeness. Read the model page, not the default.

    Missing sidecars. No .txt next to the LoRA means no trigger words, and a style LoRA that needs my_style, retro to do anything will do nothing. The mixer can't invent them - but the same pack's sidebar will fetch trained words and a description from Civitai, which you can paste into the .txt once per LoRA and never think about again.

    Saved workflows after 0.6.0. That release replaced the old single count input with min_count and max_count, which shifted widget values on every mixer node already saved. If the numbers on an old workflow look shuffled by one, they did. This pack ships fast, so expect the occasional reshuffle.

    Last thing, straight from the README: the sidebar's rename and description endpoints stay reachable even when editing is switched off in settings. That setting hides the buttons, it doesn't lock the door.

    Categoryloaders

    Inputs (7)

    NameTypeDefaultDescription
    pathSTRINGFolder within the LoRA directory, empty for its root
    include_subfoldersBOOLEANtrue—
    min_countINT11–100Fewest distinct LoRAs to pick
    max_countINT31–100Most distinct LoRAs to pick
    min_weightFLOAT0.50-5–5—
    max_weightFLOAT1.00-5–5—
    seedINT00–18446744073709550000—

    Outputs (1)

    NameTypeDescription
    promptSTRING—