DoRA Power LoRA Loader
The Flux2 DoRA loader that actually applies the whole file
- model
- clip
- dora_state
- state_control
- MODEL
- CLIP
- auto_strength_report_json
- analysis_report
- lora_stack
Ever load a OneTrainer-trained DoRA LoRA on Flux.2 and watch the console fill with lora key not loaded spam while half the file silently goes unused? That's the exact pain this node was built to kill. The DoRA Power LoRA Loader is a stacked, Power LoRA Loader-style node that loads regular LoRAs and DoRA LoRAs together, and it carries the compatibility fixes plain loaders are missing for Flux / Flux.2, OneTrainer, and Diffusers/PEFT exports. If your DoRA loads but "does nothing," or throws shape errors on Flux2 targets, this is the loader to try.
Why this node exists
DoRA (weight-decomposed low-rank adaptation) splits a LoRA update into a magnitude and a direction component, which trains more like a full fine-tune at LoRA size - better face accuracy and less style bleeding at the same rank. It also never quite hit critical mass in the community, and one reason is that ComfyUI's plain loading path has always handled DoRA exports poorly. The author's own release post spells out the trigger: Flux.2 Klein 9B DoRAs trained in OneTrainer with "Decompose Weights (DoRA)," "Use Norm Epsilon," and "Apply on output axis" enabled partially fail in loaders like rgthree's Power LoRA Loader, with the modulation and dora_scale keys never landing. This loader is the answer to that specific class of problem.
How it works
Under the hood it's two things bolted together. First, the loader itself: a stack of LoRA rows (each with a file dropdown, a weight, and an enable toggle) read from ComfyUI's normal loras folder, applied to both model and CLIP in one pass. Second - the part that matters - a pile of loading fixes. At import it monkey-patches ComfyUI internals so DoRA math runs in fp32, normalizes against the updated weight V = W + delta, slices dora_scale correctly for packed qkv targets, and forces fp32 intermediates so tiny products don't flush to zero. It also normalizes Diffusers/PEFT lora_magnitude_vector keys into Comfy-style dora_scale, extends key mapping with suffix matching (.linear ↔ .lin), broadcasts OneTrainer's global modulation LoRAs onto the per-block targets, fuses Z-Image Turbo / Lumina2 split QKV LoRAs, and even bypasses convert_lora when that would zero out a valid file's direction matrices. Since the patches apply process-wide, other loaders in the same session quietly get better DoRA behavior too.
The inputs that matter
The two required inputs are model and clip - take them straight from your model loader. Outputs: MODEL and CLIP (wire them into your sampler and CLIP Text Encode as usual), plus auto_strength_report_json, analysis_report, and lora_stack (a typed payload the pack's State Manager can consume). Of the globals, you'll actually touch these:
- Runtime bypass LoRA - default off. Applies supported LoRA/LoKr adapters in the forward pass instead of materializing patched weights, which "greatly reduces persistent VRAM on very large HIGH_VRAM models." DoRA and unsupported forms are refused rather than approximated, so if a file gets rejected, this toggle is why.
- Auto-strength enabled - default off. Redistributes relative strength across a stack by baking ratios into the tensors before loading. Ratio floor = ceiling = 1.0 is a true no-op. Adds real loader-time compute, so keep it off unless you're fighting an unbalanced multi-LoRA stack.
- DoRA slice-fix, DoRA adaLN swap-fix, ZiT/Lumina2 compat - all default on. Leave them on; they're the compatibility layer.
Install
Via ComfyUI Manager (search ComfyUI-DoRA-Dynamic-LoRA-Loader) or:
cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-DoRA-Dynamic-LoRA-Loader
Then restart ComfyUI. There are no model downloads and no pip requirements - it's pure Python on top of the torch and ComfyUI bits you already have.
Where people get burned
lora key not loaded: ...lora_magnitude_vectormeans a Diffusers/PEFT DoRA export. Current versions normalize those keys todora_scale, but if you still see it, enable Verbose + Log Unloaded Keys to inspect.mat1 and mat2 shapes cannot be multipliedon Flux2 targets points to a direction-matrix layout mismatch in the export. Check theOneTrainer output-axis DoRA mat-fixlines in verbose logs.- LoRA loads but has zero effect - if the loader warns that all direction matrices are zero, that's a training/export problem, not a loader problem.
- NaN/Inf warnings - make sure
dora_adaln_swap_fixis enabled.
It's a niche tool for a real pain: if your DoRA works in a plain loader, you don't need it. If it doesn't, this is the one you reach for.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| dora_stateopt | DORA_STATE | — | |
| state_controlopt | STATE_MANAGER_CONTROL | — | |
| state_slotopt | STRING | default | — |
| broadcast_modulationsopt | BOOLEAN | true | — |
| broadcast_include_dora_scaleopt | BOOLEAN | false | — |
| dora_decompose_debugopt | BOOLEAN | false | — |
| dora_decompose_debug_nopt | INT | 300–500 | — |
| dora_decompose_debug_stack_depthopt | INT | 102–64 | — |
| dora_slice_fixopt | BOOLEAN | true | — |
| dora_adaln_swap_fixopt | BOOLEAN | true | — |
| zimage_lumina2_compatopt | BOOLEAN | true | — |
| auto_strength_enabledopt | BOOLEAN | false | — |
| auto_strength_deviceopt | COMBO | gpu | 3 options: auto, cpu, gpu |
| auto_strength_ratio_flooropt | FLOAT | 0.300–16 | — |
| auto_strength_ratio_ceilingopt | FLOAT | 1.500–16 | — |
| runtime_bypass_loraopt | BOOLEAN | false | Apply supported LoRA/LoKr adapters in the forward pass instead of materializing patched model weights. Greatly reduces persistent VRAM on very large HIGH_VRAM models. DoRA and unsupported adapter/offset forms are refused rather than approximated. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| auto_strength_report_json | STRING | — |
| analysis_report | STRING | — |
| lora_stack | DORA_LORA_STACK | — |