ComfyUI Node

SDXL LORA Prompter

> tags

By turnbros·Created 11 months ago·Updated 10 months ago· 0
SDXL LORA Prompter
  • opt_model
  • opt_clip
  • CONDITIONING
  • MODEL
  • CLIP
  • TEXT_G
  • TEXT_L
prompt_g
prompt_l
opt_clip_width1024
opt_clip_height1024
insert_lora
insert_embedding
target_width-1
target_height-1
crop_width-1
crop_height-1

SDXL LORA Prompter is this pack's take on the classic SDXL conditioning node - the author's own docstring says it's built "similar to RgthreeSDXLPowerPromptPositive." You give it the two SDXL prompt halves, prompt_g and prompt_l, and it produces a CONDITIONING for the sampler, with the useful twist that it parses <lora:name:strength> tags straight out of your prompt text, strips them out, and actually loads those LoRAs onto your model. The prompt you type and the prompt that conditions can therefore be different things - the tags get consumed, not passed along.

For SDXL users this collapses two steps into one. Normally you'd write a prompt with <lora:foo:0.7> tags, then separately wire LoraLoader nodes for each one, then encode. This node reads the tags, loads the LoRAs (with per-tag strengths, including skipping any tagged at strength 0), and returns the cleaned prompt as text so you can see exactly what the encoder saw. The fuzzy filename matching is a nice touch - it'll find your LORA by full path, by name without extension, or by basename.

Inputs that matter

  • prompt_g / prompt_l (required) - the two SDXL prompt halves (the "G" and "L" text encoders, which is what makes SDXL prompting different from SD 1.5).
  • opt_model / opt_clip (optional) - feed in your loaded checkpoint's MODEL and CLIP. If you connect both, LoRA loading actually happens; if you don't, the node still cleans tags from the text outputs but warns that LoRAs weren't processed.
  • insert_lora - a dropdown of your installed LoRAs plus CHOOSE and DISABLE LORAS. Pick a LORA to inject it, or pick DISABLE LORAS to strip every tag without loading anything.
  • opt_clip_width / opt_clip_height - the SDXL clip-size settings, default 1024×1024.
  • target_width / target_height / crop_width / crop_height - the SDXL resolution/crop block; defaults of -1 mean "use the clip size."
  • insert_embedding - dropdown of your installed embeddings, same idea.

Outputs

Five outputs: CONDITIONING (wire into the sampler), MODEL and CLIP (the LoRA-patched versions - wire these forward or the loaded LoRAs never reach the sampler!), TEXT_G and TEXT_L (the tag-stripped prompt text). The MODEL/CLIP passthrough is the step beginners drop: if you don't wire the node's MODEL output into the sampler, your LoRAs load and then vanish.

Installing it

ComfyBros installs like any custom node pack. ComfyUI Manager - search "ComfyBros" - or:

cd ComfyUI/custom_nodes
git clone https://github.com/turnbros/ComfyBros

Then restart ComfyUI. The README's requirements.txt doesn't exist; deps are in pyproject.toml. It lives under ComfyBros/Prompting. No models to download - it uses whatever's in your ComfyUI loras and embeddings folders, plus the SDXL clip encoder from ComfyUI's own comfy_extras.

Gotchas

The MODEL/CLIP passthrough is the classic footgun - wire them through or the LoRAs are loaded and discarded. Second, if you don't connect opt_model/opt_clip, tag-loading is skipped entirely (with a warning in the console), so "my LORA did nothing" usually means the model inputs weren't connected. Third, if the SDXL encoder import fails or the model isn't SDXL, the node falls back to plain CLIPTextEncode on the two prompts joined - usable, but not true dual-encoder conditioning. And typing a LORA name that isn't in your folder logs "not found" and simply ignores it, so check the console when a tag seems to do nothing.

CategoryComfyBros/Prompting

Inputs (12)

NameTypeDefaultDescription
prompt_gSTRING
prompt_lSTRING
opt_modeloptMODEL
opt_clipoptCLIP
opt_clip_widthoptINT10240–16384
opt_clip_heightoptINT10240–16384
insert_loraoptCOMBO2 options: CHOOSE, DISABLE LORAS
insert_embeddingoptCOMBO1 options: CHOOSE
target_widthoptINT-1-1–16384
target_heightoptINT-1-1–16384
crop_widthoptINT-1-1–16384
crop_heightoptINT-1-1–16384

Outputs (5)

NameTypeDescription
CONDITIONINGCONDITIONING
MODELMODEL
CLIPCLIP
TEXT_GSTRING
TEXT_LSTRING