Nodes/Conditional Nodes by Mikudes/Load LoRA From String
ComfyUI Node

Load LoRA From String

Conditional LoRAs, with 'no LoRA' as a real branch

By levox00·Created 2 months ago·Updated 2 months ago· 0
Load LoRA From String
  • model
  • clip
  • model
  • clip
lora_name
strength_model1.00
strength_clip1.00

Load LoRA From String is, in practice, the most useful node in this pack. It applies a LoRA to a MODEL and CLIP - like the core LoraLoader - but takes the LoRA's filename from a string on a wire. And it has a superpower the core loader lacks: give it an empty string and it passes your model and clip through untouched. "No LoRA" becomes a first-class branch in your workflow, not an error state.

The pass-through trick

Let me back up, because that pass-through is the whole reason you'd reach for this. The core LoraLoader demands a dropdown selection; it has no concept of "no LoRA." This node does: if lora_name is empty (or a blocked value from an If True 3/4), it returns the exact MODEL and CLIP you fed in, unchanged. Same thing if both strength sliders are 0. So you can wire an If True where the false branch produces an empty string and get "apply DetailTweaker when the preset says so, otherwise plain" - with zero graph surgery between runs.

How it works

Mechanism is standard LoRA plumbing. The node looks up lora_name in models/loras (exact filename, extension included), loads it, and applies it with the two strength values using ComfyUI's own LoRA machinery. Missing file → FileNotFoundError and a hard stop, which again fails loudly rather than silently.

Inputs and outputs

  • model, clip - the base pair you're patching.
  • lora_name (STRING, wired) - exact filename from models/loras, e.g. DetailTweaker.safetensors. Empty = pass-through.
  • strength_model, strength_clip (FLOAT, default 1.0, range -10..10, step 0.01) - how hard the LoRA applies to each. Negative inverts; 0 disables.

Outputs are the patched model and clip, the same sockets you'd expect from any LoRA loader.

Setting the strength

The -10..10 strength range is generous by design, but treat it with respect: most LoRAs want 0.5–1.2, and the difference between 1.0 and 1.5 is often the difference between "nicely stylized" and "everything has the LoRA's face." Where this node really earns its keep is stacked conditional loads: a preset string decides which LoRA loads and at what strength, all without you touching a widget mid-session. It pairs beautifully with the pack's If True nodes and Merge First for "try LoRA A, else LoRA B, else none."

Installing it

Install is the pack standard - ComfyUI Manager → "Conditional Nodes by Mikudes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/levox00/Conditional-Nodes-Comfy-Ui

Restart ComfyUI. No extra dependencies; it reads your existing models/loras folder. It shows up under the conditional category.

Categoryconditional

Inputs (5)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameSTRING
strength_modelFLOAT1.00-10–10
strength_clipFLOAT1.00-10–10

Outputs (2)

NameTypeDescription
modelMODEL
clipCLIP