Nodes/ComfyUI illumorae/LoRA Strength Multiplier on Text
ComfyUI Node

LoRA Strength Multiplier on Text

Scale every LoRA in your prompt in one move

By CorvaeOboro·Created 8 months ago·Updated 6 days ago· 1
LoRA Strength Multiplier on Text
    • modified_text
    text
    multiplier1.0000
    individual_cap_enabledfalse
    individual_cap1.0000
    total_cap_enabledfalse
    total_cap1.0000
    debug_printsfalse

    The "I'll fix it in post" moment for LoRA strength is this: you've got a prompt file with eight LoRA tags at various strengths, and you want to try all of them at 70% - or you want to cap the stack so three LoRAs don't each run at 1.2 and blow out the image. Doing that by hand means editing eight numbers. LoRA Strength Multiplier on Text does it with one multiplier and two optional caps, operating on the <lora:...> tags inside your prompt text and leaving everything else untouched.

    It's the deterministic sibling of the pack's LoRA Randomize Strength on Text: where that node rolls the dice, this one applies a uniform rule. Both assume your LoRA tags live in text and get consumed by a text-based loader - which the pack's own Wan LoRA-by-text loaders do.

    How it works

    It finds every LoRA tag in your text and multiplies each strength by multiplier (default 1.0, range 0–100). Two important details in how it parses:

    • It handles both tag shapes: <lora:name:unet> and the two-strength form <lora:name:unet:clip> - multiplying both the UNet and CLIP strengths independently. So it works with SDXL-style split-strength LoRA tags, not just single-number ones.
    • It accepts negative strengths (some workflows use negative LoRA weights) and applies the math to them too.

    Then the guards:

    • individual_cap_enabled / individual_cap - clamps each strength to a maximum. It's an upper bound only: negative values pass through unchanged. Set individual cap to 1.0 to guarantee no single LoRA goes runaway.
    • total_cap_enabled / total_cap - if the sum of all strengths exceeds the cap, it scales every strength down proportionally so the total hits the cap. This is the "my LoRA stack is fighting itself" safety valve. A total cap of 1.0 with several LoRAs means each gets a slice of the budget rather than each running full tilt.

    Surrounding prompt text is preserved verbatim; only matched tags are rewritten. Optional debug_prints shows the before/after math.

    Output is modified_text - the rewritten string, ready for a text-based LoRA loader or further prompt assembly.

    Installing it

    Part of CorvaeOboro's ComfyUI_illumorae (CC0, pure code). ComfyUI Manager → search illumorae, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CorvaeOboro/ComfyUI_illumorae
    

    Common issues

    • Nothing changed - no LoRA tags in your text, or you left multiplier at 1.0 (multiplying by 1 is identity). Set it below 1 to scale down, above 1 to scale up.
    • Caps don't seem to do anything - caps are off by default. Flip individual_cap_enabled or total_cap_enabled on; the values alone do nothing.
    • A cap of 0.0 zeros everything out - that's by design (it's documented): individual cap clamps each value to 0, total cap scales by 0/total. If you hit this accidentally, it's working as specified - set the cap above 0.
    • "The strengths are right but the image still overdoes it" - remember this edits a string; if your loader reads LoRA strengths elsewhere (dropdowns/widgets), the rewritten text won't be what loads. Pair it with a text-tag-consuming loader.
    Categoryillumorae

    Inputs (7)

    NameTypeDefaultDescription
    textSTRING
    multiplierFLOAT1.00000–100
    individual_cap_enabledBOOLEANfalse
    individual_capFLOAT1.00000–100
    total_cap_enabledBOOLEANfalse
    total_capFLOAT1.00000–100
    debug_printsoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    modified_textSTRING