Nodes/LoRA Optimizer/LoRA Inline Chain Options
ComfyUI Node

LoRA Inline Chain Options

Per-LoRA control for the Inline Chain optimizer

By ethanfel·Created 5 months ago·Updated 23 days ago· 135
LoRA Inline Chain Options
    • chain_options
    settings_visibility
    lora_count3
    enabled_1true
    strength_11.00
    model_strength_11.00
    clip_strength_11.00
    conflict_mode_1all
    key_filter_1all
    preserve_1false
    enabled_2true
    strength_21.00
    model_strength_21.00
    clip_strength_21.00
    conflict_mode_2all
    key_filter_2all
    preserve_2false
    enabled_3true
    strength_31.00
    model_strength_31.00
    clip_strength_31.00
    conflict_mode_3all
    key_filter_3all
    preserve_3false
    enabled_4true
    strength_41.00
    model_strength_41.00
    clip_strength_41.00
    conflict_mode_4all
    key_filter_4all
    preserve_4false
    enabled_5true
    strength_51.00
    model_strength_51.00
    clip_strength_51.00
    conflict_mode_5all
    key_filter_5all
    preserve_5false
    enabled_6true
    strength_61.00
    model_strength_61.00
    clip_strength_61.00
    conflict_mode_6all
    key_filter_6all
    preserve_6false
    enabled_7true
    strength_71.00
    model_strength_71.00
    clip_strength_71.00
    conflict_mode_7all
    key_filter_7all
    preserve_7false
    enabled_8true
    strength_81.00
    model_strength_81.00
    clip_strength_81.00
    conflict_mode_8all
    key_filter_8all
    preserve_8false
    enabled_9true
    strength_91.00
    model_strength_91.00
    clip_strength_91.00
    conflict_mode_9all
    key_filter_9all
    preserve_9false
    enabled_10true
    strength_101.00
    model_strength_101.00
    clip_strength_101.00
    conflict_mode_10all
    key_filter_10all
    preserve_10false

    This node exists for one purpose: giving you per-LoRA control over what LoRA Optimizer (Inline Chain) does with a chain of regular Load LoRA nodes it's capturing. On its own it does nothing - it's a side node that plugs into the Inline optimizer's chain_options input.

    What it is and why you'd use it

    The Inline Chain optimizer is a drop-in filter: it reads the LoRA patches sitting on a MODEL after a chain of stock Load LoRA nodes, merges them, and reapplies the result. Left alone, it merges every LoRA it finds with default options. That's fine until you need to say "leave LoRA #2 out entirely," or "LoRA #3 should dominate any weights it conflicts with," or "boost LoRA #1's strength by 20% relative to what the loader already set." That's what this node is for - it sits beside the Inline optimizer and exposes exactly the same per-LoRA controls LoRA Stack (Dynamic) has, but scoped to a loader chain instead of a Stack.

    Slot order matters and it isn't arbitrary: slot #1 is the first Load LoRA in the chain, closest to the checkpoint - not the first one you happen to configure here. The Inline optimizer's report opens with a fingerprint showing which slot mapped to which actual file, which is the way to confirm you've got the ordering right before trusting your settings.

    How it works

    Set lora_count to match (or exceed) how many LoRAs are actually in your Load LoRA chain, pick settings_visibility, and configure each slot. simple mode is one strength multiplier per LoRA; advanced splits it into model/clip multipliers plus the same conflict controls as everywhere else in this pack.

    The inputs and outputs that matter

    Per slot: enabled_N (off removes that LoRA from the model entirely - not merged, not applied at all), strength_N - and this one's worth reading carefully: it's a multiplier on whatever strength the loader already set, not an absolute override. 1.0 keeps the loader's value as-is; 0.5 halves it. In advanced mode, model_strength_N/clip_strength_N split that multiplier between the visual and text-encoder branches. conflict_mode_N, key_filter_N, and preserve_N work exactly as they do on LoRA Stack (Dynamic) - see that article for what each option does.

    Output: chain_options (LORA_CHAIN_OPTIONS) - connect it to the chain_options input on LoRA Optimizer (Inline Chain).

    How to install it

    ComfyUI Manager: search "LoRA Optimizer", install, restart. Manually:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/ethanfel/ComfyUI-LoRA-Optimizer.git
    

    Restart - it appears under loaders. No downloads; it's configuration only.

    Common issues & troubleshooting

    You built this node but nothing changed. It has no effect unless it's actually wired into the Inline optimizer's chain_options input - leaving it unconnected is a valid choice (the Inline node merges everything with defaults), but if you configured settings here expecting them to apply, check the connection first.

    Strength isn't doing what you expect. Because strength_N multiplies the loader's own strength rather than replacing it, a slot set to 1.0 here on top of a Load LoRA node already set to 0.5 gives you 0.5 overall, not 1.0. If a LoRA seems too weak or too strong after adding this node, check the loader's own strength first - this node's multiplier is relative to that, not a fresh value.

    Slot numbers don't match the LoRAs you expect. Since slot order follows chain order (closest to the checkpoint first), reordering your Load LoRA nodes on the canvas changes which slot controls which file. Check the Inline optimizer's report for the slot-to-filename fingerprint before assuming slot #1 is whichever LoRA you placed first visually.

    Non-LoRA patches on the model. If your chain includes something other than plain LoRA patches (an OFT/BOFT rotation, a hook, a third-party patch shape), those pass through the Inline optimizer untouched and aren't something this options node has any control over - it only governs the LoRA patches that get captured and merged.

    CategoryLoRA Optimizer

    Inputs (72)

    NameTypeDefaultDescription
    settings_visibilityCOMBOSimple: one strength multiplier per LoRA. Advanced: separate model/clip multipliers, conflict mode, key filter, and preserve per LoRA.
    lora_countINT31–10How many option slots to show. Slot #1 = first Load LoRA in the chain (closest to the checkpoint).
    enabled_1BOOLEANtrueOff: LoRA #1 is removed from the model entirely (not merged, not applied).
    strength_1FLOAT1.00-10–10Multiplier on the strength LoRA #1's loader set (1.0 = keep as loaded).
    model_strength_1FLOAT1.00-10–10Multiplier on LoRA #1's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_1FLOAT1.00-10–10Multiplier on LoRA #1's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_1COMBOallLoRA #1 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_1COMBOallLoRA #1 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_1BOOLEANfalseMark LoRA #1 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_2BOOLEANtrueOff: LoRA #2 is removed from the model entirely (not merged, not applied).
    strength_2FLOAT1.00-10–10Multiplier on the strength LoRA #2's loader set (1.0 = keep as loaded).
    model_strength_2FLOAT1.00-10–10Multiplier on LoRA #2's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_2FLOAT1.00-10–10Multiplier on LoRA #2's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_2COMBOallLoRA #2 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_2COMBOallLoRA #2 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_2BOOLEANfalseMark LoRA #2 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_3BOOLEANtrueOff: LoRA #3 is removed from the model entirely (not merged, not applied).
    strength_3FLOAT1.00-10–10Multiplier on the strength LoRA #3's loader set (1.0 = keep as loaded).
    model_strength_3FLOAT1.00-10–10Multiplier on LoRA #3's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_3FLOAT1.00-10–10Multiplier on LoRA #3's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_3COMBOallLoRA #3 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_3COMBOallLoRA #3 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_3BOOLEANfalseMark LoRA #3 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_4BOOLEANtrueOff: LoRA #4 is removed from the model entirely (not merged, not applied).
    strength_4FLOAT1.00-10–10Multiplier on the strength LoRA #4's loader set (1.0 = keep as loaded).
    model_strength_4FLOAT1.00-10–10Multiplier on LoRA #4's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_4FLOAT1.00-10–10Multiplier on LoRA #4's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_4COMBOallLoRA #4 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_4COMBOallLoRA #4 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_4BOOLEANfalseMark LoRA #4 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_5BOOLEANtrueOff: LoRA #5 is removed from the model entirely (not merged, not applied).
    strength_5FLOAT1.00-10–10Multiplier on the strength LoRA #5's loader set (1.0 = keep as loaded).
    model_strength_5FLOAT1.00-10–10Multiplier on LoRA #5's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_5FLOAT1.00-10–10Multiplier on LoRA #5's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_5COMBOallLoRA #5 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_5COMBOallLoRA #5 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_5BOOLEANfalseMark LoRA #5 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_6BOOLEANtrueOff: LoRA #6 is removed from the model entirely (not merged, not applied).
    strength_6FLOAT1.00-10–10Multiplier on the strength LoRA #6's loader set (1.0 = keep as loaded).
    model_strength_6FLOAT1.00-10–10Multiplier on LoRA #6's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_6FLOAT1.00-10–10Multiplier on LoRA #6's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_6COMBOallLoRA #6 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_6COMBOallLoRA #6 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_6BOOLEANfalseMark LoRA #6 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_7BOOLEANtrueOff: LoRA #7 is removed from the model entirely (not merged, not applied).
    strength_7FLOAT1.00-10–10Multiplier on the strength LoRA #7's loader set (1.0 = keep as loaded).
    model_strength_7FLOAT1.00-10–10Multiplier on LoRA #7's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_7FLOAT1.00-10–10Multiplier on LoRA #7's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_7COMBOallLoRA #7 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_7COMBOallLoRA #7 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_7BOOLEANfalseMark LoRA #7 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_8BOOLEANtrueOff: LoRA #8 is removed from the model entirely (not merged, not applied).
    strength_8FLOAT1.00-10–10Multiplier on the strength LoRA #8's loader set (1.0 = keep as loaded).
    model_strength_8FLOAT1.00-10–10Multiplier on LoRA #8's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_8FLOAT1.00-10–10Multiplier on LoRA #8's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_8COMBOallLoRA #8 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_8COMBOallLoRA #8 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_8BOOLEANfalseMark LoRA #8 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_9BOOLEANtrueOff: LoRA #9 is removed from the model entirely (not merged, not applied).
    strength_9FLOAT1.00-10–10Multiplier on the strength LoRA #9's loader set (1.0 = keep as loaded).
    model_strength_9FLOAT1.00-10–10Multiplier on LoRA #9's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_9FLOAT1.00-10–10Multiplier on LoRA #9's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_9COMBOallLoRA #9 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_9COMBOallLoRA #9 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_9BOOLEANfalseMark LoRA #9 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.
    enabled_10BOOLEANtrueOff: LoRA #10 is removed from the model entirely (not merged, not applied).
    strength_10FLOAT1.00-10–10Multiplier on the strength LoRA #10's loader set (1.0 = keep as loaded).
    model_strength_10FLOAT1.00-10–10Multiplier on LoRA #10's loader strength for image generation (visual style, composition). 1.0 = keep as loaded.
    clip_strength_10FLOAT1.00-10–10Multiplier on LoRA #10's loader strength for text understanding (prompt interpretation). 1.0 = keep as loaded.
    conflict_mode_10COMBOallLoRA #10 conflict filter. 'all': apply everywhere (default). 'low_conflict': only where this LoRA agrees with the majority. 'high_conflict': only where this LoRA disagrees.
    key_filter_10COMBOallLoRA #10 key filter. 'all': contribute all keys (default). 'shared_only': only keys present in 2+ LoRAs. 'unique_only': only keys present in exactly 1 LoRA. 'audio_only': only audio layers (LTX-2 / ACE-Step). 'no_audio': only non-audio (video) layers.
    preserve_10BOOLEANfalseMark LoRA #10 as a STYLE LoRA to protect it in conflict merges. When on, it is never trimmed by sparsification and is exempt from TIES sign-election (which deletes a style's minority-sign direction) — its full contribution is added on top of the conflict-resolved merge. Use when a style LoRA keeps disappearing when merged with a content LoRA.

    Outputs (1)

    NameTypeDescription
    chain_optionsLORA_CHAIN_OPTIONS