ComfyUI Node

Z-Image LoRA Stack

The little builder node that keeps your graph tidy

By DanrisiUA·Created 8 months ago·Updated 8 months ago· 18
Z-Image LoRA Stack
  • lora_stack
  • lora_stack
lora_name
strength1.00

Z-Image LoRA Stack is the smallest node in this pack and the easiest to overlook. It does exactly one job: it takes a single LoRA and a strength and appends them to a growing lora_stack. Chain two or three together and you've built the list that Z-Image LoRA Stack Apply will normalize and apply later.

The wiring

Nearly trivial. lora_name is a dropdown populated from your ComfyUI/models/loras folder - the same list the stock LoRA loader shows - and strength is a float that can go negative, same as the rest of the pack. An optional lora_stack input accepts whatever the previous node in the chain produced. Output is one lora_stack, which you feed into the next Stack node or straight into Stack Apply.

The mechanic worth knowing

This node loads the actual LoRA weights at build time, via load_torch_file. So the tensors physically ride the stack edge through your graph, rather than being re-read from disk at apply time. That makes apply fast and re-runs deterministic, but it also means a stack holding four full LoRA files is four LoRAs' worth of weights sitting in memory for the whole graph. Keep stacks reasonable and you'll never notice.

Why bother

The main Merger node has five built-in slots, so when does the stack help? Two cases. First, past two or three LoRAs the all-in-one node gets cramped, and a stack keeps your LoRA list physically separate from the model wiring - nice for a workflow you're going to reuse or template. Second, you can change blend modes at the single apply point without touching the list at all. It's the same idea as rgthree's LoRA stack, minus the rest of a QoL pack.

One thing not to do

Don't mix stacks between packs. LORA_STACK is a type name several packs share, but this one carries loaded tensors rather than filenames, so a stack built elsewhere won't plug into Z-Image LoRA Stack Apply (and vice versa). Build with this pack, apply with this pack.

Install

Same story as the pack - nothing to pip-install, nothing to download:

cd ComfyUI/custom_nodes
git clone https://github.com/DanrisiUA/ComfyUI-ZImage-LoRA-Merger

restart, and it's in loaders/lora alongside its four siblings. Or use ComfyUI Manager and search "Z-Image LoRA Merger". If you only ever need two LoRAs and never touch blend modes, skip this node entirely - but when your graph starts turning to spaghetti, this is the tidier path.

Categoryloaders/lora

Inputs (3)

NameTypeDefaultDescription
lora_nameCOMBOLoRA file
strengthFLOAT1.00-10–10
lora_stackoptLORA_STACKPrevious LoRA stack

Outputs (1)

NameTypeDescription
lora_stackLORA_STACK