Lora Extract
...> in any string, get the LoRA applied and the text cleaned
- model
- clip
- model
- clip
- string
Lora Extract is the unglamorous utility that makes the rest of this pack's prompt nodes tick, and it's the rare one that works standalone. Feed it a MODEL, a CLIP, and any string containing <lora:file.safetensors:strength> syntax, and it strips the LoRA tags out of the string, applies the LoRAs to the model and clip, and hands back the cleaned text. Three wires in, three wires out, nothing else.
Why would you want that? Because in the mudknight pipe world, LoRA syntax travels inside prompt strings. The prompt nodes do this extraction automatically, but if you're building your own graph - say you have a text node that composes a prompt with embedded <lora:...> tags, and you want to apply those LoRAs while keeping the text clean for display or for metadata - this is the primitive. It's also a good way to understand what the fancier nodes are doing under the hood: the same extract_loras + parse_lora_syntax + apply_loras pipeline, exposed as a plain node.
Inputs and outputs
- model and clip - in and out. If no LoRA tags are found, they pass through untouched.
- string - a force-input string, so it expects a wire, not typing. The tags use the same syntax the pack uses everywhere:
<lora:name:strength>applies one strength to both model and clip;<lora:name:model:clip>lets you split them, e.g.<lora:detail_tweaker:0.6:0.2>. Multiple tags can be comma- or space-separated.
Outputs are model, clip, and string (the tag-free text). Wire the cleaned string into a text encoder and the patched model/clip into your sampler.
How it works
A regex pulls out every <lora:...> block, the remaining text is whitespace-collapsed, and each named LoRA is located by filename across your loras folder - subdirectories included - then loaded with safe_load=True and applied with separate model and CLIP strengths. Missing LoRAs don't crash: it prints Warning: LoRA '<name>' not found. and moves on, so a typo means the LoRA silently doesn't happen. That's the one failure mode worth knowing, because it's invisible in the output image.
Installing
It ships in the mudknight utils pack. ComfyUI Manager → search comfyui-mudknight-utils, or:
cd ComfyUI/custom_nodes
git clone https://github.com/mudknight/comfyui-mudknight-utils
Restart ComfyUI. No model files to fetch; your LoRAs are the models.
Notes
- The node does not need the Impact Pack or ppm - it's pure ComfyUI core calls, so it works even if you've only half-installed the pack.
- Strength is a float; values above 1 and negatives are accepted by the regex, so
-1is technically possible. Use with intent. - It's the same extraction logic the
Prompt (full-pipe)andSimple Prompt (full-pipe)nodes run internally, so don't double-apply: if your text already went through one of those, the tags are gone and this node will find nothing to do.
A tiny node, honestly - but if you've ever fought with a text-generation node that injects <lora:...> tags mid-workflow, you'll appreciate having the extraction step be explicit instead of implicit.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| string | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| string | STRING | — |