Nodes/ArtyClaw Comfy Nodes/LoRA Tag Duplicator (< > to < > + [ ])
ComfyUI Node

LoRA Tag Duplicator (< > to < > + [ ])

Round for the Crowd, Exact for You

By artyclaw·Created 5 months ago·Updated 5 months ago· 0
LoRA Tag Duplicator (< > to < > + [ ])
    • text_out
    text_in

    If you've ever posted a workflow to CivitAI with a pile of <lora:Name:0.85> tags and then had to hand-tidy every weight to one decimal for the share, this node is aimed straight at you. LoRA Tag Duplicator takes each <lora:...> or <lyco:...> tag and outputs two versions: the weight rounded to one decimal inside angle brackets (the clean, CivitAI-friendly form) plus the original exact-weight version in square brackets. The source comment says it best: "Rounded in < > for CivitAI, Original in [ ] for you."

    It's from artyclaw/artyclaw-comfy, and it's one of those personal-workflow nodes that only makes sense once you've had the exact problem. The author wants their real weights preserved and a publishable copy at the same time.

    How it works

    A regex grabs every <lora:...> and <lyco:...> tag (case-insensitive). For each tag it splits the content on :, takes the last segment as the weight, rounds it to one decimal, and rebuilds the angle-bracket version. The original tag, unrounded, is kept in square brackets. So:

    <lora:MyStyle:0.85>  →  <lora:MyStyle:0.9> [lora:MyStyle:0.85]
    

    If the last segment isn't a parseable number, it's left alone in both versions - no crash, just a pass-through. Anything that isn't a LoRA tag in your text is untouched. Note the round-trip detail: the [lora:...] form isn't a standard ComfyUI tag syntax by itself - it's a marker for you, the author's convention for "my exact original."

    Inputs and output

    One input, text_in - the prompt containing the tags (multiline, forceInput). One output, text_out, with every tag duplicated and rounded. Run the output through a text-display node to eyeball the result, or paste the < > version into your share post while keeping the [ ] half as your own record.

    Install

    ComfyUI Manager → search ArtyClaw Comfy Nodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/artyclaw/artyclaw-comfy
    

    Restart. Standard library (re) only.

    Where people get burned

    Don't feed the output back into an encoder expecting clean syntax - the duplicated [lora:...] tokens are not a loading format, and if you blindly use the result as your generation prompt you'll get literal bracket text in your prompt or a parse warning, depending on the loader. The right flow is: run it, extract the < > half for sharing and keep the exact form for generating. Also, the rounding is always to one decimal - there's no option for two or none, so 0.85 becomes 0.9 whether you like it or not. And multi-dot tags like Name.v2:0.75 round the final segment fine, but the rounding targets whatever's after the last colon, so a tag with a versioned name and no explicit weight (<lora:Name.v2>) has no last-colon number to round and passes through unchanged. For its narrow purpose - producing a share-ready copy that doesn't lose your real weights - it does the job.

    CategoryCustom/String

    Inputs (1)

    NameTypeDefaultDescription
    text_inSTRINGPrompt containing <lora:...> tags

    Outputs (1)

    NameTypeDescription
    text_outSTRING