Sign In

LoRA Extractor — ComfyUI Node for UW Wildcard Workflows (Prompt LoRA Extractor)

Download

1 variant available

Archive Other

krea2-prompt-lora-extractor-v1.0.0.zip

4.37 KB

Verified:

Type
Other
Stats

18

Reviews
Published

Jul 30, 2026

Base Model

Krea 2

Hash
AutoV2
E540874772
default creator card background decoration
Followers - 19

19

Likes - 60

60

rooftop-v3-02.png

# Prompt LoRA Extractor

A small ComfyUI utility node that solves one problem: you want LoRA tags in the same string as your prompt, but CLIP should not see those tags, and LoRA Manager needs them on a separate input.

Put <lora:name:strength> (or <lora:name:model:clip>) anywhere in your prompt text. This node:

1. Removes those tags from the text → cleaned_text (safe for CLIP / encoding)

2. Collects them into lora_syntax (ready for LoRA Text Loader from Lora Manager)

3. Reports how many unique LoRAs it found → lora_count

No wildcards required. No specific checkpoint family required. Feed it any STRING prompt.

## Why this exists

Many loaders and workflows still expect LoRA application through a dedicated LoRA node — not as literal characters in the CLIP prompt. If you leave <lora:…> in the encode path, you often get useless tokens in the text encoder and no LoRA applied.

This node sits between “prompt string” and “encode + LoRA apply”: one string in, clean text + LoRA syntax out.

## What it accepts

Supported tags only:

- <lora:MyLoRA:0.8>

- <lora:MyLoRA:0.8:0.5> (model strength + clip strength)

Behavior:

- Closed, well-formed tags are stripped and collected

- Duplicate LoRA names: first wins

- Malformed / unclosed tags are left in the text as plain characters

- Extra spaces from stripping are cleaned up

## Outputs

| Output | Use for |

|--------|---------|

| cleaned_text | CLIP encode, Show Text, aspect/size helpers, anything that needs the words |

| lora_syntax | LoRA Text Loader (LoraManager) lora_syntax input |

| lora_count | Optional debug / branching |

## Minimal wiring

```text

[any STRING prompt source]

Prompt LoRA Extractor

├─ cleaned_text → CLIP TextEncode (positive)

└─ lora_syntax → LoRA Text Loader (LoraManager)

MODEL / CLIP → your sampler

```

Typical prompt source: a plain text box, a wildcard expander, an LLM node, or pasted caption text — anything that outputs STRING.

## Install

1. Download the zip and extract so you have a folder named ComfyUI-PromptLoraExtractor

2. Place that folder in ComfyUI/custom_nodes/

3. Restart ComfyUI

4. Add node: Prompt LoRA Extractor (category utils/prompt)

The zip also includes README.md, AGENT-INSTALL.md (for AI-assisted installs), and offline unit tests run_tests.py).

## Requires

- ComfyUI

- To actually apply the extracted LoRAs: comfyui-lora-manager (or any stack that consumes LoRA Text Loader–style lora_syntax)

That is the only functional dependency for the intended use. The extractor itself has no Impact Pack / wildcard / model-family dependency.

## AI-assisted install

If you use an AI coding agent, point it at AGENT-INSTALL.md inside the zip and ask it to install the package into your ComfyUI custom_nodes folder and restart.

---

### Optional — other tools from the same author

Not required for this node. Linked only if you already use (or want) the rest of the stack:

- Modular NSFW wildcards: https://civitai.red/models/2789815/uw-modular-nsfw-wildcards-photoreal-agent-ready-optional-integration-w-aspect-node

- Wildcard Clause Expander (runtime subject/wardrobe override): https://civitai.red/models/2807882/custom-character-uw-expansion-pack-nsfw-modular-natural-language-wildcards

- PromptAspectSizeResolver [W:H] → latent size): https://civitai.com/models/2789943/uw-custom-node-prompt-aspect-size-resolver-wildcard-wh-latent-wh-comfyui

- Example one-click Turbo/Raw workflows that already wire this node: https://civitai.red/models/2808026/krea2-minimal-hq-one-click-nsfw-wildcard-workflow-one-router-tag-full-photoreal-scene-every-queue