ComfyUI Node

Format LoRA Stack

Turn Your LoRA Stack Into A1111-Style Text Without Typing It

By mobilehacker·Created about a year ago·Updated about a year ago· 4
Format LoRA Stack
  • lora_stack
  • STRING

You stack three LoRAs in rgthree's Power Lora Loader, and now you want to upload to CivitAI with proper metadata - or paste your setup into a text field - and the only honest way is hand-typing <lora:name:0.69> for each one. Format LoRA Stack is the node that stops that. Feed it the LORA_STACK wire and it hands you the A1111-style string, all LoRAs at once, exactly the format CivitAI and most model pages actually speak.

One input, one output, zero side effects. The name isn't lying: this is a pure text formatter. It doesn't load or apply LoRAs, doesn't call any API, doesn't need a key, and downloads no models. It sits downstream of whatever stacker you already use and just re-serializes what's already loaded.

How it works

Under the hood it walks the stack - a list of (name, strength, clip_strength) triples that every stacker emits - and for each one pulls the filename off the path, strips the .safetensors extension, and builds <lora:name:strength>, concatenating them into one string. Empty stack, empty string, no crash. That last bit matters more than it sounds: it means you can leave the node in a workflow that sometimes runs with no LoRAs and it degrades gracefully instead of throwing.

Where people trip: it formats the second value in each triple, which in the usual (name, model strength, clip strength) layout is the model strength. If you tuned clip strength separately, that number won't show up. And the filename splitting is Windows-minded - it splits on backslashes. A LoRA sitting in a subfolder with a forward-slash path keeps the subfolder name in the tag (<lora:subdir/name:0.8>), and a .pt LoRA keeps its extension. Cosmetic in most cases, annoying if you feed the string into something that does exact matching.

The input and output

  • lora_stack (LORA_STACK, required) - the stack wire. Plug it into any node that emits this type: rgthree's Power Lora Loader is the usual suspect, Efficiency Nodes' LoRA Stack works too. If the input is empty you get "" back.
  • STRING (output) - the joined <lora:name:strength> text. Wire it into a Show Text / text display node to eyeball it, or into any node that wants a string, like metadata builders for CivitAI uploads.

That CivitAI angle is the real reason to install this. The A1111-style tag is the lingua franca for LoRA metadata - ComfyUI's graph gives you power but no equivalent of "put image here, set strength" (or in this case, no built-in "give me the tags as text"). This node is the bridge.

Install

The README's one-line instruction is to copy the .py files into custom_nodes/format-lora-stack, which works, but the modern route is better - it's on the Comfy Registry:

  • ComfyUI Manager: search for "format-lora-stack" (or "Format LoRA Stack") and hit Install, then restart.
  • Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/mobilehacker/ComfyUI_format-lora-stack

Then restart ComfyUI. There are no dependencies beyond ComfyUI itself - the source imports only comfy.model_management, and it doesn't even use it. No model files to fetch, nothing heavy.

Realistic expectations

This is a genuinely tiny utility from a one-line README - few installs, nobody's making tutorials about it, and you won't find it in workflow dumps. But for its single job it's exactly right, and it's one of those nodes you forget exists until the day you're hand-typing your fifth <lora: tag for a metadata field. If that's your workflow, grab it. If you never share metadata or never use stacker nodes, you can skip it without missing anything.

Categorycustom

Inputs (1)

NameTypeDefaultDescription
lora_stackLORA_STACK

Outputs (1)

NameTypeDescription
STRINGSTRING