Nodes/D2 Nodes ComfyUI/D2 Load Lora
ComfyUI Node

D2 Load Lora

Load LoRAs by typing their names instead of reaching for a dropdown

By da2el-ai·Created 2 years ago·Updated 30 days ago· 66
D2 Load Lora
  • model
  • clip
  • MODEL
  • CLIP
  • prompt
  • formatted_prompt
prompt
mode
insert_lora

The standard LoraLoader takes one LoRA and one strength. D2 Load Lora takes a text block, so you can list several LoRAs with their strengths in plain text and have them all applied at once - and because the spec is just text, you can drive it from a string node, a preset, or an XY plot sweep instead of hand-picking files. If you test a lot of LoRAs, this is the loader that turns "swap a LoRA" into "change a word in a text field."

It has two modes, and the difference matters:

  • simple - one LoRA per line, lora_name:model_weight:clip_weight. Leave a weight off and it defaults to 1; give just one weight and both model and clip get it. Multiple LoRAs on one line separate with commas, and lines starting with // or # are comments.
  • a1111 - the Stable Diffusion webui style, written inline in a prompt: <lora:lora_name:1>. The node scans the text, applies each <lora:...> it finds, and hands you the remaining prompt with the tags stripped out as formatted_prompt.

That A1111 mode is the same syntax the D2 KSampler understands in its own positive prompt field - so this node is really the explicit, inspectable version of the same feature.

The inputs

  • model / clip - the base model to apply to (wire from a checkpoint loader).
  • prompt - the multiline text block holding your LoRA specs (plus any prompt, in a1111 mode).
  • mode - simple or a1111.
  • insert_lora - a dropdown listing your loras; handy for inserting a filename into the text without typos.

Outputs

MODEL / CLIP with everything applied, the raw prompt passed through, and formatted_prompt (the a1111 mode's cleaned-up text, which you'd feed to a text encoder).

Installing it

ComfyUI Manager → search "D2-nodes-ComfyUI" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI

Restart. No downloads from the pack itself - your LoRA files must already live in models/loras. Deps are piexif and charset-normalizer. Since v32.0.0 the pack needs a recent ComfyUI (V3 schema).

The gotchas

Weight semantics are easy to misread: foo:0.8 sets both model and clip strength to 0.8, not just model - if you want clip weaker, write foo:0.8:0.5. And a LoRA with a strength you didn't intend (defaults silently to 1) is the most common "why is this overdone" culprit. Also, in a1111 mode the node applies every <lora:...> in the text - so if you paste a prompt that still contains a tag you meant to keep as text, it'll be applied. Clean, tested text in, predictable strengths out - that's the whole game with this node.

CategoryD2

Inputs (5)

NameTypeDefaultDescription
modelMODEL
clipCLIP
promptSTRING
modeCOMBO2 options: a1111, simple
insert_loraCOMBO1 options: CHOOSE

Outputs (4)

NameTypeDescription
MODELMODEL
CLIPCLIP
promptSTRING
formatted_promptSTRING