ComfyUI Node

Lora to String

Your Power Lora Loader, as a plain text string

By Goshe-nite·Created about a year ago·Updated about a year ago· 11
Lora to String
  • lora_loader
  • STRING

rgthree's Power Lora Loader is the best way to stack LoRAs in ComfyUI - per-entry toggles, trigger-word lookup, the works. But it's a model node: it hands your graph a MODEL and a CLIP, not text. Which is a problem the moment you want the LoRA list somewhere that expects words, like a save node that records what you used. Lora to String is the bridge: feed it a Power Lora Loader and it emits the enabled LoRAs as a plain string in the standard <lora:name:strength> format.

Ignore the README's shorthand of <lora:strength> - what the code actually writes is the full three-part tag, <lora:name:strength>, one after another. That's the format A1111 and Civitai both speak, so the string drops straight into anything that understands generation info.

How it works

Same graph-introspection trick as the rest of this pack: it parses the embedded workflow, follows the wire back from its lora_loader input, and reads the loader's widget values out of the execution record. It's specifically looking for widgets whose keys start with lora_, and it honors the toggle - only entries with on enabled make it into the string, in slot order. Disabled LoRAs are silently skipped, so the output always reflects what the loader is actually applying, not what you forgot to turn off.

It also checks its homework: if the node behind the wire isn't a Power Lora Loader (rgthree), it refuses to run with Please check if Power Lora Loader (rgthree) is set as input. That's the pack being honest about what it's built for.

The inputs and output

There's exactly one input and one output:

  • lora_loader (*) - connect your Power Lora Loader here. Nothing else will do.
  • STRING - the concatenated <lora:name:strength><lora:name2:strength2>... string.

Where does the string go? Into ComfyUI-Image-Saver's LoRA metadata field, into a Show Text node so you can eyeball what you're running, or into any text slot that wants a LoRA list. If you're building prompts programmatically this is also the building block the pack's Lora Prompt Concatenation node wraps, so think of this as the raw-material version.

Install and gotchas

The pack is GPS' Supplements for ComfyUI by Goshe-nite - tiny, no pip dependencies, no models to download. ComfyUI Manager (search "GPS' Supplements for ComfyUI") or the usual clone:

cd ComfyUI/custom_nodes
git clone https://github.com/Goshe-nite/comfyui-gps-supplements

restart, and you'll find the nodes under GPSupps. If you're not running rgthree-comfy, this node (and its siblings) has nothing to talk to - install that pack first.

Two failure modes worth knowing: Unable to get node info when the loader can't be traced (bypassed or missing embedded workflow), and the flat refusal above if you plug the wrong node in. Also note the string reflects strengths as set in the loader, so if a LoRA looks wrong in your metadata, check the strength slider - that's almost always the actual bug, not this node.

CategoryGPSupps

Inputs (1)

NameTypeDefaultDescription
lora_loader*

Outputs (1)

NameTypeDescription
STRINGSTRING