Nodes/petty-paint-comfyui-node/Petty Paint Apply LoRA Stack
ComfyUI Node

Petty Paint Apply LoRA Stack

Apply a whole LoRA stack through one node — with a receipt

By mephisto83·Created 2 years ago·Updated 2 years ago· 3
Petty Paint Apply LoRA Stack
  • model
  • clip
  • lora_stack
  • MODEL
  • CLIP
  • show_help

Normal ComfyUI means one LoraLoader per LoRA, and if you're stacking three or four of them the graph turns into a daisy chain of duplicate nodes. PettyPaintApplyLoRAStack collapses that into a single node that takes a LORA_STACK - a list of (lora_name, model_strength, clip_strength) tuples - and applies them all in order to your model and CLIP. If you're already using the pack's PettyPaintLoRAStack node (or anything else that emits a LORA_STACK, like the pack's PettyPaintComponent hub), this is the node that consumes it.

The design is lifted straight from the Efficiency Nodes lineage, which is a compliment: it's a well-trodden pattern in the ecosystem. One in, one out, no per-LoRA plumbing.

How it works

It walks the stack in order and, for each entry, resolves the LoRA file in ComfyUI's loras folder, loads its weights, and applies it with load_lora_for_models - the same code path the core LoraLoader uses, so the math is identical, just batched. Order matters: LoRAs apply sequentially, so the first one in the stack becomes the base that the second modifies, and so on. If the stack is empty, it returns your model and CLIP untouched - safe to leave wired even when nothing's loaded.

The third output, show_help, is the pack's little gift: a plain-text string that lists every LoRA it applied with its strengths, like a log you can wire into a text display or save alongside your output. Handy when you're tuning stacks and want a record of what actually got into the render.

The inputs and outputs

  • model - the MODEL to patch.
  • clip - the CLIP to patch (LoRAs can change both; the stack carries separate strengths for each).
  • lora_stack - the stack itself, from PettyPaintLoRAStack or another LORA_STACK producer.
  • Outputs: patched MODEL, patched CLIP, and show_help (STRING).

Installing it

It's in the petty-paint pack:

cd ComfyUI/custom_nodes
git clone https://github.com/mephisto83/petty-paint-comfyui-node

Restart ComfyUI, or install via ComfyUI Manager searching "petty-paint-comfyui-node". Declared dependency is Flask==2.1.2, unused here.

Common issues

The stack only works if the LoRA filenames it references actually exist in ComfyUI/models/loras - a missing file throws at runtime, and the error names the file, so check the pack's show_help output or your ComfyUI console to see which one. Also watch cumulative strength: stacking five LoRAs at 1.0 each usually oversaturates; the community habit is to drop per-LoRA strengths when they stack, and this node's log output makes it easy to see what you actually ran. And remember order isn't commutative - swapping the order in the stack changes the result.

CategoryPettyPaint

Inputs (3)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_stackLORA_STACK

Outputs (3)

NameTypeDescription
MODELMODEL
CLIPCLIP
show_helpSTRING