Nodes/ComfyUI-Info-Prompt-Toolkit/Prompt To Lora Stack
ComfyUI Node

Prompt To Lora Stack

...> Tags Out of Your Prompt and Into a Real Stack

By kinorax·Created 5 months ago·Updated about a month ago· 2
Prompt To Lora Stack
    • prompt
    • lora_stack
    prompt

    The A1111-style prompt has a convention the ComfyUI world half-adopted: embed LoRA references right in the prompt text as <lora:name:strength>. It's readable, portable, and shows up in infotext everywhere. The problem is ComfyUI doesn't natively execute those tags - a CLIP Text Encode fed <lora:style:0.8> just encodes it as literal text. IPT-PromptToLoraStack is the translation layer: it scans a prompt, extracts every <lora:...> tag, removes them from the text, and hands you the clean prompt plus a proper lora_stack that the pack's loaders actually apply.

    It's the bridge between "prompt-as-metadata" and "LoRA-as-stack," and it makes imported recipes genuinely runnable. Feed it the positive prompt from an Image Reader or an Infotext To Image Info, and the LoRA references that were sitting inert in the text become real, applied LoRAs.

    How it works

    It parses the prompt for <lora:filename:strength> tags, builds a lora_stack entry per tag, and returns the prompt text with those tags stripped out. The stack is then normalized against ComfyUI's current model options - so a LoRA name in the metadata that doesn't match a file on disk gets flagged rather than silently applied. Outputs are prompt (tags removed) and lora_stack (the structured list). The stack wires straight into Use Loaded Model or the pack's Lora Stack Lorader; the cleaned prompt wires into your CLIP text encode as usual.

    Inputs and outputs

    • prompt (required, STRING, multiline) - text that may contain <lora:...> tags.
    • prompt (output) - the same text with LoRA tags removed, safe to encode.
    • lora_stack (output, IPT-LoraStack) - the extracted LoRAs with strengths.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
    cd comfyui-info-prompt-toolkit
    pip install -r requirements.txt
    

    Restart, or ComfyUI Manager → "ComfyUI-Info-Prompt-Toolkit". ComfyUI 0.17.0+. No models.

    Common issues

    The classic mistake is feeding this into a plain LoraLoader chain that doesn't understand stacks - the stack is this pack's format, so consume it with the pack's loaders. Also, if the referenced LoRA file isn't in your models/loras folder, the extraction still works but the stack won't resolve at load time; keep an eye on which tags actually mapped. And while it strips lora tags, it leaves other prompt syntax ((word:1.2), weights) untouched - that's the flatten node's job if you're heading toward captions. For anything touching infotext or imported prompts, this node is the missing adapter that makes the metadata real.

    CategoryInfo-Prompt-Toolkit/ImageInfo

    Inputs (1)

    NameTypeDefaultDescription
    promptSTRINGPrompt text that may include <lora:...:...> tags

    Outputs (2)

    NameTypeDescription
    promptSTRING
    lora_stackIPT-LoraStack