Nodes/Yumil MPM/Yumil Lora Stripper
ComfyUI Node

Yumil Lora Stripper

Pull the LoRA tags out of your prompt without mangling the rest

By maigonia·Created 6 months ago·Updated about a month ago· 0
Yumil Lora Stripper
    • text
    • loras
    text

    LoRA tags are great until they aren't. <lora:add_detail:0.8> embedded in a prompt is a compact way to say "also load this," but it's useless text to a CLIP encoder - it should never reach your model's text conditioning. Yumil Lora Stripper is the two-second fix: it scans text for <lora:name:weight> tags, strips them out, and hands you the clean prompt and the tags separately.

    It's the "text only" sibling of Yumil Prompt Lora Loader. The Loader parses tags and actually applies them to a model; this node just cleans and separates. You'd reach for it when your prompt source (Yumil MPM, a saved prompt file, anything) bakes LoRA tags inline but you don't want them in the conditioning, or when you want to see exactly which LoRAs a prompt references before deciding what to load. Wire the text output into your CLIP Text Encode and the loras output into a text-display or a note node to audit what's being referenced.

    How it works

    One regex, a cleanup pass, done. It matches <lora:name:weight> tags, returns:

    • text - the input with all LoRA tags removed.
    • loras - the extracted tags, concatenated together.

    Then it tidies the leftovers: doubled commas collapse, leading/trailing commas and whitespace get trimmed, and multiple spaces collapse to one. So girl, <lora:add_detail:0.8>, 1girl becomes girl, 1girl - no artifacts, no weird spacing you then have to chase.

    Two honest limitations to know before you trust it blindly:

    • The regex requires the weight. It matches <lora:name:weight> (name and weight, separated by a colon). A bare <lora:add_detail> with no :0.8 weight will not match and stays in your text. The Loader's regex is looser about weights, so the two nodes don't parse identically - if the Stripper seems to miss tags, check that they carry an explicit weight.
    • loras is concatenated, not formatted. You get lora:add_detail:0.8lora:detail_tweaker:0.5 - tags jammed together with no separator. That's fine for eyeballing or for a display node, but if you need the tags as a clean list, you'll be joining/splitting them yourself. It's a quirk of this being a utility node, not a data-processing one.

    Installing and using it

    Part of the pack, install the usual way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/maigonia/comfyui-yumil-mpm.git
    cd comfyui-yumil-mpm
    pip install -r requirements.txt
    

    or ComfyUI Manager → search comfyui-yumil-mpm → restart. It's pure string handling - no models, no extra deps beyond the pack's requests line.

    The single text input is forceInput (a STRING socket, so it's meant to be wired from upstream rather than typed), and both outputs are plain strings. Where it earns its keep is in the middle of a chain: MPM category → this stripper → CLIP Text Encode, with the loras output running off to tell you what was in there. If you're also loading those LoRAs, remember you want the Loader, not this node - but for a quick clean-and-inspect, the Stripper is exactly as much as you need.

    CategoryYumil/Prompt

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGText containing <lora:name:weight> tags

    Outputs (2)

    NameTypeDescription
    textSTRING
    lorasSTRING