LoRA Loader from Text
Parse <lora:...> tags from a prompt
- model
- clip
- model
- clip
- model_to_hifix
- clip_to_hifix
- plain_text
If you've ever copied a prompt off Civitai and hit a wall in ComfyUI, this node is the fix. Civitai and the A1111/Forge world write LoRAs inline, right in the prompt text, like <lora:mylora:0.8>. ComfyUI doesn't do that natively - you're supposed to add a separate LoRA loader node per LoRA and set strengths by hand. LoRA Loader from Text reads those <lora:...> tags straight out of your prompt string, applies them to your model and CLIP, and spits the clean prompt (tags stripped) back out for encoding. Paste a webui prompt, wire it up, done.
It's part of ComfyUI_Mira, mirabarukaso's utility pack, and it's a genuinely nice bit of glue - LoRAs are how the community layers styles, characters, and concepts onto a base checkpoint, and being able to keep them written in the familiar inline syntax saves a real amount of node-wiring for anyone who lives in that ecosystem.
How it works
It scans text for tags and supports the full webui format, from bare to fully specified:
<lora:name>
<lora:name:model_str>
<lora:name:model_str:clip_str>
<lora:name:model_str:clip_str:hires_model_str:hires_clip_str>
Each tag gets applied to the incoming model and clip. The clever part is the two-stage support: those last two numbers are separate strengths for a hires/second-pass model and clip, so the same prompt can carry different LoRA weights for the base pass and the upscale pass. Set both first-stage numbers to 0 to bypass a LoRA in the first pass, both second-stage numbers to 0 to skip it in the second.
The inputs and outputs that matter
- model / clip - your base MODEL and CLIP.
- text - the prompt, LoRA tags and all.
- model / clip (outputs) - the first-pass model and CLIP with LoRAs applied.
- model_to_hifix / clip_to_hifix (outputs) - the second-pass (hires) versions, for your upscale sampler.
- plain_text (output) - the prompt with all
<lora:...>tags removed, wired into your CLIP Text Encode.
Installing it
ComfyUI Manager: search ComfyUI_Mira, install, restart. Or clone:
cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git
then restart. If it errors on load, run pip install -r requirements.txt in the ComfyUI_Mira folder. It's under Mira/Lora.
Common issues
- The filename in the tag has to match your file.
<lora:name>must resolve to an actual file in yourmodels/lorasfolder. Civitai prompts often reference a LoRA you haven't downloaded, or under a different filename - mismatches are the number-one reason a LoRA silently doesn't apply. Escaped brackets in odd filenames (likeil\[IL]...) need to match exactly. - Encode the plain_text, not the raw prompt. Wire
plain_textinto your CLIP Text Encode, not the original string - otherwise the literal<lora:...>text gets encoded as words and pollutes your conditioning. - Use the right stage outputs. If you're doing hires fix, feed
model_to_hifix/clip_to_hifixinto the second sampler. Send both to the same sampler and the two-stage strengths do nothing useful. - Base-model match. A LoRA trained on SDXL won't apply to an SD1.5 model (or Flux, etc.). The node will try; the result will be garbage or an error. Keep LoRA and checkpoint families aligned.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| text | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| model_to_hifix | MODEL | — |
| clip_to_hifix | CLIP | — |
| plain_text | STRING | — |