Nodes/ArtyClaw Comfy Nodes/WAN LoRA Splitter
ComfyUI Node

WAN LoRA Splitter

High or Low

By artyclaw·Created 5 months ago·Updated 5 months ago· 0
WAN LoRA Splitter
    • clean_prompt
    • hi_loras
    • low_loras
    prompt
    strip_unknown_lorasfalse
    keep_spacingtrue
    joiner

    Wan 2.2's two-pass architecture is the thing that trips everyone up: it runs a high-noise model for motion and composition, then a low-noise model that refines detail - and the LoRA ecosystem has settled into training separate _hi and _lo variants for the two passes. Speed LoRAs go on the low-noise pass only; character LoRAs are often shipped as a hi/lo pair. WAN LoRA Splitter is the node that untangles this from your prompt: it pulls <lora:...> tags out of your prompt text, figures out which pass each belongs to, and hands you three strings - the clean prompt and separate hi_loras / low_loras lists to feed the two LoRA loaders.

    It's from artyclaw/artyclaw-comfy. The community consensus (per the KB's Wan guide) is that the best Wan 2.2 compromise is exactly this split - keep the high-noise pass unmodified, apply speed LoRAs to low-noise only. This node exists to make that workflow mechanical instead of manual.

    How it works

    A regex matches every <lora:...> / <lyco:...> tag, then routes each to hi or low using two conventions:

    • Explicit routing: <lora:hi:Name:1.0> or <lora:lo:Name:0.8> - the hi/lo/high/low marker right after the type.
    • Suffix detection: <lora:Name_hi:1.0> - a trailing _hi, -hi, or .hi on the last path segment marks it high.

    Each tag is reconstructed in the clean standard form <lora:name:weight> (routing prefix stripped so any normal loader can find the file) and appended to the matching list. The matched tags are removed from the prompt, spacing is collapsed (keep_spacing on by default), and strip_unknown_loras optionally deletes any LoRA tag that isn't hi/lo instead of leaving it. joiner controls how multiple tags are joined (default a space - wire the result into a LoRA loader's tag input).

    Inputs and outputs

    • prompt - your full prompt with LoRA tags inline.
    • strip_unknown_loras - drop non-hi/lo tags from the prompt entirely (default off).
    • keep_spacing - tidy up leftover spaces after removal (default on).
    • joiner - the separator between collected tags (default " ").

    Outputs: clean_prompt (tags removed, ready for the prompt encoder), hi_loras, and low_loras - feed the latter two into the LoRA inputs of your high-noise and low-noise model loaders.

    Install

    ComfyUI Manager → search ArtyClaw Comfy Nodes, or:

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

    Restart. Pure standard library (re).

    Where people get burned

    Suffix detection only looks at the last path segment, so <lora:path_hi/Model:1.0> routes by Model, not path_hi - if your folder names carry the marker, use the explicit <lora:hi:...> syntax instead. Second, tags with weights that aren't plain numbers (---, __wildcard__) survive the reconstruction intact but then downstream loaders may or may not accept them - it's a text splitter, not a validator. Third, if hi_loras/low_loras come out empty, double-check your tags actually match one of the two conventions; unrecognized tags just stay in the prompt when strip_unknown_loras is off. It's a niche node for a niche-but-very-real pain, and for Wan 2.2 users it's the difference between a manual copy-paste and a clean graph.

    Categorytext/utils

    Inputs (4)

    NameTypeDefaultDescription
    promptSTRING
    strip_unknown_lorasoptBOOLEANfalse
    keep_spacingoptBOOLEANtrue
    joineroptSTRING

    Outputs (3)

    NameTypeDescription
    clean_promptSTRING
    hi_lorasSTRING
    low_lorasSTRING