Skip to content
FramesField
FIX 33 · COMFYUI & LOCAL GPU
raw .md ↗ Verified Dec 1, 2026

Fix ComfyUI LoRA Keys Silently Ignored or Overbaked

Direct Fix: Inspect every .safetensors key prefix before loading, use LoraLoaderModelOnly on FLUX/Wan 2.2/LTX-2 graphs, route Wan 2.2 High-Noise vs Low-Noise LoRAs to their matching expert branch, cap stacked LoRA weights under 1.25 total, and drop CFG to 1.0 when using step-distillation LoRAs.
Exact Error / Visual Signature
lora key not loaded: diffusion_model.blocks.0.self_attn.q.weight | lora key not loaded: lora_te1_text_model... | Visual symptom: zero style change OR fried neon/plastic overbake
OBSERVED SYMPTOM

Your ComfyUI render finishes with HTTP 200 yet completely ignores your character, camera, or style LoRA (printing dozens of "lora key not loaded" warnings in the console)—or conversely turns horribly over-saturated, plastic, and fried with jagged high-frequency artifacts.

TECHNICAL ROOT CAUSE

Two opposite misconfigurations: (1) loading a LoRA whose tensor key naming or base architecture does not match the active UNet/DiT (for example SDXL LoRA on FLUX, Diffusers transformer.* keys on an outdated loader, or routing a Wan 2.2 High-Noise LoRA into the Low-Noise expert); (2) leaving default strength_model=1.0 across stacked LoRAs or pairing speed/distillation LoRAs with non-distilled CFG (>2.0) and excessive steps.

Copy-Paste Verified Fix

Zero-Dependency Safetensors LoRA Key & Architecture Inspector inspect-lora-keys.sh
# Inspect any .safetensors LoRA header in 5ms (no pip packages required) to detect base architecture & key prefixes
python3 - "$1" <<'PY'
import json, struct, sys
from collections import Counter

path = sys.argv[1] if len(sys.argv) > 1 else "ComfyUI/models/loras/my_lora.safetensors"
with open(path, "rb") as f:
    header_len = struct.unpack("<Q", f.read(8))[0]
    header = json.loads(f.read(header_len).decode("utf-8"))

meta = header.pop("__metadata__", {})
keys = list(header.keys())
prefixes = Counter(".".join(k.split(".")[:2]) for k in keys)

# Detect likely base model family from tensor naming conventions
arch = "Unknown / Custom"
joined = " ".join(keys[:40])
if "double_blocks" in joined or "single_blocks" in joined:
    arch = "FLUX DiT (use LoraLoaderModelOnly; keep strength 0.6–0.85, FluxGuidance 2.2–3.0)"
elif "blocks.0.self_attn" in joined or "diffusion_model.blocks" in joined:
    arch = "Wan 2.1 / Wan 2.2 / LTX DiT (use LoraLoaderModelOnly; match High vs Low expert!)"
elif "lora_unet_down_blocks" in joined:
    arch = "SD 1.5 / SDXL UNet (INCOMPATIBLE with FLUX / Wan 2.2 / LTX-2!)"

has_clip = any("lora_te" in k or "text_encoder" in k for k in keys)
print(f"File:          {path}")
print(f"Total tensors: {len(keys)}")
print(f"Detected arch: {arch}")
print(f"Has CLIP keys: {has_clip}  -> {'Use LoraLoader' if has_clip else 'Use LoraLoaderModelOnly'}")
print(f"Base metadata: {meta.get('ss_base_model_version') or meta.get('modelspec.architecture') or 'not embedded'}")
print("Top prefixes:")
for pref, count in prefixes.most_common(6):
    print(f"  {count:4d}x  {pref}")
PY

Before vs. After (Broken Pattern vs. Verified Fix)

Broken · Broken Graph (Legacy LoraLoader + Unchecked Keys + Stacked 1.0 + High CFG)
"12": { "class_type": "LoraLoader",
  "inputs": { "model": ["1",0], "clip": ["2",0],
    "lora_name": "wan22_lightx2v_fast.safetensors",
    "strength_model": 1.0, "strength_clip": 1.0 } }
// Paired with stacked style LoRA @ 0.9 + cfg: 5.5 + 25 steps -> FRIED OUTPUT
Verified · Verified Graph (LoraLoaderModelOnly + Expert Routing + Controlled Strength)
"12": { "class_type": "LoraLoaderModelOnly",
  "inputs": { "model": ["1_high_expert", 0],
    "lora_name": "wan22_high_noise_camera.safetensors",
    "strength_model": 0.70 } }
// Low-Noise expert gets texture/style LoRA @ 0.55; Speed LoRA drops cfg -> 1.0, steps -> 6

Why this works: Using LoraLoaderModelOnly avoids dead text-encoder key mismatches on modern DiTs, matching High-Noise and Low-Noise experts preserves Wan 2.2 MoE specialization, and capping strength prevents saturation overbake.

Under the Hood

Why This Failure Happens in Real Pipelines

ComfyUI deliberately treats unmatched LoRA keys as non-fatal console warnings rather than hard crashes. When you wire a LoRA trained on SDXL (lora_unet_down_blocks_*), local open-weight FLUX.1-dev (lora_unet_double_blocks_*), or Wan 2.1 into an incompatible checkpoint—or pass a diffusion-only DiT LoRA through the legacy LoraLoader node with a mismatched text encoder—ComfyUI logs "lora key not loaded" for every rejected tensor and silently renders the raw base model. On dual-expert Mixture-of-Experts video models like Alibaba Wan 2.2 A14B, an even subtler trap occurs: a LoRA trained specifically for the High-Noise expert (composition and camera motion) degrades or mismatches if wired blindly into the Low-Noise expert (surface detail), and vice versa.

The opposite extreme—overbaked, crispy, oversaturated renders with burned edges and melted faces—happens when effective LoRA weight or classifier-free guidance exceeds what the base transformer tolerates. Stacking three LoRAs at strength_model=0.8 yields a combined perturbation of 2.4, pushing attention activations outside trained variance. Similarly, speed/distillation LoRAs (such as LightX2V or Turbo step-distill adapters for Wan 2.2 and FLUX) bake guidance directly into the adapter weights; leaving CFGGuider at cfg=5.0 or running 25 steps instead of cfg=1.0 and 4–8 steps instantly fries contrast and turns skin into brittle neon plastic.

Reliable LoRA pipelines always inspect the .safetensors JSON metadata header before wiring a single node, switch to LoraLoaderModelOnly for modern DiT models (FLUX, Wan 2.2, LTX-2, Qwen-Image) whose LoRAs carry zero text-encoder tensors, cap single-LoRA weights at 0.55–0.85 (and stacked sums under 1.25), and route Wan 2.2 High-Noise and Low-Noise LoRAs strictly to their matching expert loader branches.

Step-by-Step Resolution & Verification

  1. 01

    Inspect the LoRA .safetensors header before loading it in ComfyUI

    Run the 1-second Python header script above on the downloaded .safetensors file. Confirm the tensor prefixes match your base checkpoint architecture (FLUX double_blocks vs Wan/LTX diffusion_model.blocks vs legacy SDXL lora_unet_down_blocks) and check whether text-encoder keys exist.

  2. 02

    Switch to LoraLoaderModelOnly and align Wan 2.2 MoE expert branches

    Replace LoraLoader with LoraLoaderModelOnly whenever Has CLIP keys is False. On Wan 2.2 dual-expert graphs, attach motion/camera LoRAs to the High-Noise expert branch (0.60–0.85) and surface/character style LoRAs primarily to the Low-Noise expert branch (0.50–0.75) with lighter weight (0.25–0.45) on High-Noise.

  3. 03

    Bracket strength in 0.2 increments and lower CFG for distilled speed LoRAs

    Run a quick 3-seed test at 0.50, 0.70, and 0.90 rather than starting at 1.0. Whenever a step-distillation LoRA (LightX2V, CausVid, Turbo) is active, drop CFG to 1.0 and steps to 4–8 immediately to eliminate fried contrast and plastic edges.

Verification Check · Confirm Zero "lora key not loaded" Warnings in ComfyUI Startup/Render Logs
python3 inspect_lora.py ComfyUI/models/loras/target_lora.safetensors && grep -i "lora key not loaded" comfyui.log | tail -n 5 || echo "PASS: zero dropped LoRA keys"
Expected healthy output:
Detected arch: Wan 2.1 / Wan 2.2 / LTX DiT (use LoraLoaderModelOnly; match High vs Low expert!)
Has CLIP keys: False  -> Use LoraLoaderModelOnly
PASS: zero dropped LoRA keys

How to Prevent This Error From Recurring

GUARDRAIL 01

Organize ComfyUI/models/loras/ into architecture subfolders

Sort weights cleanly into loras/flux/, loras/wan22-high/, loras/wan22-low/, and loras/ltx2/ so teammates and headless scripts never load an SDXL or wrong-expert adapter by mistake.

GUARDRAIL 02

Keep total combined weight of stacked LoRAs at or below 1.25

When combining a character LoRA (0.70) with a lighting/film LoRA (0.45), dial both down proportionally rather than leaving either pinned at 1.0.

GUARDRAIL 03

Update ComfyUI core before pulling newly released community LoRAs

New trainer formats (ai-toolkit, kohya-ss, musubi-tuner, Diffusers) regularly add key-remapping shims inside ComfyUI core; a two-month-old ComfyUI commit frequently drops newly trained LoRA keys silently.

Troubleshooting FAQs

Does a single "lora key not loaded" warning always mean the whole LoRA failed?
Not always. If only 1–4 auxiliary keys (such as an unused projection layer or alpha metadata key) are skipped out of 400+ tensors, the LoRA still applies normally. If dozens or hundreds of block keys print as not loaded, the adapter is mismatched to your checkpoint and is doing nothing.
Can I load a standard BF16 LoRA onto an FP8 or GGUF Q4_K_M quantized checkpoint?
Yes in current ComfyUI releases. Standard LoraLoaderModelOnly patches FP8 checkpoints natively, and ComfyUI-GGUF supports LoRA patching directly on Q4_K_M / Q8_0 GGUF weights—just ensure your ComfyUI and GGUF custom node commits are up to date.
Why does my FLUX character LoRA look over-sharpened with waxy skin at strength 0.8?
FLUX LoRAs amplify local contrast on top of FluxGuidance. Lower FluxGuidance from 3.5 down to 2.2–2.6 and keep strength_model between 0.60 and 0.75 to recover natural skin pores and balanced contrast.
Why did adding a Wan 2.1 LoRA to Wan 2.2 produce jittery motion or double outlines?
Wan 2.2 splits denoising into distinct High-Noise and Low-Noise Mixture-of-Experts models. Applying a legacy single-stage Wan 2.1 LoRA at full 1.0 strength across both Wan 2.2 experts often destabilizes the handoff step—test at 0.4–0.6 on the Low-Noise expert first or use native Wan 2.2 dual-stage adapters.
Use this page in AI tools or notes
raw .md