Nodes/ComfyUI-DonutNodes/Donut LoRA Loader · Dynamic
ComfyUI Node

Donut LoRA Loader · Dynamic

The One-Stop Dynamic LoRA Loader — Block Weights, a Krea2 Safety Rail, and a Fast Path

By DonutsDelivery·Created about a year ago·Updated 2 days ago· 22
Donut LoRA Loader · Dynamic
  • model
  • clip
  • lora_stack
  • model
  • clip
  • lora_stack
  • show_help
model_typeAuto
slots_json[]
global_block_vector
civitai_lookupOn
safe_stackOff
fusion_awareOff
max_fusion_boost2.00
safe_limit1.00
execution_modeComfy patches

Most of the time "load a LoRA" means drag in Load LoRA, pick a file, and set one strength. That's fine for a single style LoRA at a uniform weight. But if you've ever wanted two or three LoRAs where each one is strong in some blocks and absent in others - a style LoRA restricted to the early layers, a character LoRA carrying most of the identity, a negative LoRA quietly removing artifacts - the default loader can't express it. Donut LoRA Loader · Dynamic is the pack's all-in-one answer: it builds a multi-row stack from a JSON array, applies it to the model and CLIP in one node, and adds a few safety features that only matter once you're stacking heavily on newer DiT models.

It's the apply-half of the sibling DonutDynamicLoRAStack. Where that node only emits a LORA_STACK, this one takes a MODEL and CLIP in and gives you patched MODEL and CLIP out, plus the resolved stack and a show_help string. You wire it exactly like the built-in loader: Checkpoint → Donut LoRA Loader → Sampler.

The inputs that matter

  • model and clip - the checkpoint halves you're patching.
  • slots_json - the JSON array of rows (rendered as a table editor): each row has lora_name, model_weight, clip_weight, a block_preset or the expanded block_vector it fills in, plus inherit_block_vector. model_type (Auto/SDXL/SD15/FLUX/ZIT/ZIT-NE/KREA2) filters the presets by architecture.
  • civitai_lookup - hash-aware CivitAI resolution for renamed/moved files (needs the API key in settings).
  • safe_stack, safe_limit, fusion_aware, max_fusion_boost - Krea2-only safety rails. Leave them alone unless you're on Krea 2.
  • execution_mode - Comfy patches (default) or Experimental bypass.

How block-weighted application works

Each row's block_vector is a comma-separated list of per-block multipliers, and the pack knows each architecture's block layout - SDXL's 12 blocks, Z-Image Turbo's 30 transformer layers, Krea 2's 28 DiT blocks - so a preset or a hand-typed vector lands on the right layers. Stacking is where the real LoRA lore lives: interactions between stacked adapters are unpredictable, and the community rule is to add one at a time on a fixed seed. Where people get burned with multi-LoRA stacks is overlap - two adapters both amplifying the same blocks until the output blows up or NaNs. That's the entire job of the Krea2 safety group: safe_stack: On RMS-limits overlapping LoRA strength per block so several stacked LoRAs can't collectively exceed one full-strength LoRA's worth of energy (safe_limit, default 1.0, is that ceiling). fusion_aware goes further and budgets projector LoRAs against the 12 resolved channels from the pack's Donut Krea2 Fusion Control node - connect Checkpoint → Krea2 Fusion Control → Donut LoRA Loader → Sampler for that to mean anything. If you're not on Krea 2, these widgets do nothing and can stay at their defaults; don't let the wall of toggles scare you off.

execution_mode is the "Experimental bypass" from the README: instead of repeatedly rebuilding patched quantized weights, it computes base(x) + LoRA(x) as separate paths - plain linear LoRA and direct-factor LoKr adapters compose into one forward hook per layer, retaining each LoRA's own strength and block vector. That's a real win for warm inference time on quantized Krea2 under Dynamic VRAM. The honest caveat: if any adapter on a target is unsupported (DoRA, reshaped/decomposed adapters, convolutional targets), the node silently falls back to ComfyUI's normal patch path rather than failing - so you're not losing correctness, you're just not getting the speedup. Existing workflows keep defaulting to Comfy patches, so nothing changes unless you opt in.

Wiring and troubleshooting

Outputs: model, clip (both patched), the resolved lora_stack if you want to reuse it, and show_help. The stack also hashes each file and reports CivitAI metadata in the UI. The most common failure is blunt and helpful: an enabled LoRA that can't be resolved raises FileNotFoundError naming the file, so a typo in lora_name or a moved file surfaces immediately instead of silently no-op'ing. Install via ComfyUI Manager ("DonutNodes") or git clone into custom_nodes plus pip install -r requirements.txt with ComfyUI's Python. It's a one-author personal pack with barely any community chatter (this node included), so when the JSON rows, the presets, or the safety toggles confuse you, the node tooltips and the README are the docs.

Categorydonut/LoRA

Inputs (12)

NameTypeDefaultDescription
modelMODEL
clipCLIP
model_typeCOMBOAutoFilter block presets by model architecture. Auto shows all presets.
slots_jsonSTRING[]
global_block_vectorSTRINGUsed only by rows with Inherit global enabled.
civitai_lookupCOMBOOnFetch LoRA info from CivitAI (requires API key in settings)
safe_stackCOMBOOffKrea2 only. RMS-limits overlapping LoRA strength per block so stacked LoRAs cannot collectively exceed one full-strength LoRA worth of block energy. Off preserves legacy behaviour.
fusion_awareCOMBOOffRequires the model output from Donut Krea2 Fusion Control. Budgets projector LoRA columns against the resolved 12-channel projector gains. Use headroom can boost quiet columns; dynamic tensor_rms profiles are attenuation-only.
max_fusion_boostFLOAT2.001–10Maximum per-column LoRA boost in Use headroom mode.
safe_limitFLOAT1.000–10Maximum combined RMS energy for overlapping Krea2 LoRAs. 1.0 equals one full-strength LoRA; lower values are stricter. Set Safe Stack to Off to disable limiting completely.
execution_modeCOMBOComfy patchesExperimental bypass computes base(x) + LoRA(x) without rebuilding quantized model weights. Multiple plain linear LoRA and direct-factor LoKr adapters can be stacked; unsupported targets stay ordered on Comfy's regular path.
lora_stackoptLORA_STACK

Outputs (4)

NameTypeDescription
modelMODEL
clipCLIP
lora_stackLORA_STACK
show_helpSTRING