Nodes/petty-paint-comfyui-node/Petty Paint LoRAStack
ComfyUI Node

Petty Paint LoRAStack

Turn JSON lora configs into a real LORA_STACK

By mephisto83·Created 2 years ago·Updated 2 years ago· 3
Petty Paint LoRAStack
  • setup
  • lora_stack
  • LORA_STACK
  • show_help

If you've used a LoRA stack node before - Comfyroll's CR LoRA Stack is the famous one - you know the shape: a bundle of (name, model_strength, clip_strength) tuples that one Apply LoRA Stack node consumes. PettyPaintLoRAStack builds exactly that, but it builds it from JSON. You feed it a list of lora configs - each with a name, a model weight, a clip weight - and it hands you a LORA_STACK ready to apply, plus a help string pointing at the Comfyroll wiki.

The pack is the ComfyUI-side integration for Petty Paint, Andrew Porter's web canvas that reimagines doodles through Stable Diffusion. The app keeps lora choices in its JSON project state, and this is how that state becomes something the graph can actually apply.

How it works

setup is the JSON payload - the pack's pattern is a list of dicts like [{"name": "my_lora.safetensors", "model_weight": 0.7, "clip_weight": 0.7}]. For each entry, the node checks the name actually exists in your loras folder; only entries that are installed make it into the stack, anything else is skipped and logged. There's also an optional lora_stack input, so you can chain: give it an existing stack and it appends the new entries on top (skipping "None" placeholders). The output is a proper LORA_STACK - wire it into the pack's Apply LoRA Stack node or any compatible stack consumer.

show_help, the second output, is just a STRING with the Comfyroll LoRA stack documentation link. It's a convenience, not configuration.

The inputs and outputs

  • setup - any; the JSON list of lora configs.
  • lora_stack - optional LORA_STACK to append onto.
  • Outputs: LORA_STACK, and show_help (STRING).

Why this pattern is worth it

Stacking Loras in a static graph means adding nodes every time you want a new LoRA. In a state-driven workflow - where the JSON comes from the app or a config file - the stack is data, and adding a LoRA is an edit to the JSON, not a graph surgery. That's the payoff: your ComfyUI graph stays fixed while your lora lineup changes. If you're not running a state-driven pipeline, a plain CR LoRA Stack does the same job without the JSON indirection - but if the pack's JSON is already in your graph, this is the natural fit.

Installing it

Same pack, same install - ComfyUI Manager, search "petty-paint-comfyui-node":

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

Restart ComfyUI. Declared dependency is Flask==2.1.2; the Loras themselves come from your ComfyUI/models/loras folder as usual.

Common issues

Silently skipped Loras are the big gotcha: if the name in setup doesn't match a file in your loras folder exactly - typo, wrong extension, wrong folder - the entry is dropped with only a console print. So check the log if a LoRA "isn't working." Also, the stack only includes entries that have both weights present; a config missing model_weight or clip_weight is skipped too.

CategoryPettyPaint

Inputs (2)

NameTypeDefaultDescription
setup*
lora_stackoptLORA_STACK

Outputs (2)

NameTypeDescription
LORA_STACKLORA_STACK
show_helpSTRING