ComfyUI Node

LoRA Loader Selector

Model and CLIP, one index

By latentastronaut·Created 8 months ago·Updated 7 months ago· 2
LoRA Loader Selector
  • model
  • clip
  • model
  • clip
  • lora_name
  • count
index0
strength_model1.00
strength_clip1.00
lora_0None
lora_1None
lora_2None
lora_3None
lora_4None
lora_5None
lora_6None
lora_7None
lora_8None
lora_9None
lora_10None
lora_11None
lora_12None
lora_13None
lora_14None
lora_15None

LoRA Loader Selector is the full-strength version of the pack's LoRA switcher: sixteen LoRA slots, one index input to pick which one loads, and - unlike the model-only sibling - it patches both the diffusion model and the CLIP text encoder. That CLIP side is the whole reason to pick this one. Style and character LoRAs on SD/SDXL often bake their identity into the text-encoder weights too, so if a LoRA looks like it's not taking effect with a model-only loader, this is the node you want. It also plays perfectly with the pack's For Loop Start, letting you sweep through LoRAs automatically.

How it works

Same machinery as the model-only variant, plus CLIP. Each run it collects the sixteen lora_0 through lora_15 dropdowns (populated from your models/loras folder), counts the non-"None" ones, clamps index into 0–15, and loads loras[index] through ComfyUI's comfy.sd.load_lora_for_models with separate strength_model and strength_clip weights. If the slot is "None" or both strengths are zero, model and CLIP pass through untouched. The loaded LoRA's weights are cached in memory, so re-running with the same file skips the disk read.

Inputs and outputs

  • model (required) - the MODEL to patch
  • clip (required) - the CLIP to patch
  • index - 0 to 15, which LoRA loads
  • strength_model, strength_clip - independent strengths, default 1.0 each. Dropping strength_clip to ~0.7 is a common starting point for style LoRAs.

Outputs: model and clip (both patched), plus lora_name (the loaded file, or "None") and count (how many non-None slots are configured - handy for clamping a loop so it never runs past your real LoRAs).

Install

ComfyUI Manager, search "Latent Astronaut Suite," or:

cd ComfyUI/custom_nodes
git clone https://github.com/latentastronaut/comfyui-latent-astronaut-suite

Restart. Uses ComfyUI's built-in LoRA loader, so no extra dependencies.

Where people get burned

The mirror-image trap of the model-only node: this one always touches CLIP, so if you use it on a model whose text encoder doesn't accept the LoRA's CLIP weights (common with some newer or video architectures), you can get errors or subtly degraded conditioning. If in doubt, check whether your LoRA is distributed as "model only" - those don't have a CLIP half and should go through the model-only loader. The Reset All button on the node clears all sixteen slots at once; otherwise, an old LoRA hiding in a low slot is the usual "why is it loading the wrong file" culprit.

Categoryloaders/latent-astronaut

Inputs (21)

NameTypeDefaultDescription
modelMODEL
clipCLIP
indexINT00–15Which LoRA to load (0-indexed)
strength_modelFLOAT1.00-100–100
strength_clipFLOAT1.00-100–100
lora_0optCOMBONone1 options: None
lora_1optCOMBONone1 options: None
lora_2optCOMBONone1 options: None
lora_3optCOMBONone1 options: None
lora_4optCOMBONone1 options: None
lora_5optCOMBONone1 options: None
lora_6optCOMBONone1 options: None
lora_7optCOMBONone1 options: None
lora_8optCOMBONone1 options: None
lora_9optCOMBONone1 options: None
lora_10optCOMBONone1 options: None
lora_11optCOMBONone1 options: None
lora_12optCOMBONone1 options: None
lora_13optCOMBONone1 options: None
lora_14optCOMBONone1 options: None
lora_15optCOMBONone1 options: None

Outputs (4)

NameTypeDescription
modelMODELModel with LoRA applied
clipCLIPCLIP with LoRA applied
lora_nameSTRINGName of loaded LoRA (or 'None')
countINTNumber of non-None LoRAs configured