Kw_JsonLoraLoader
Stack every LoRA from a JSON config in one node
- Local_model
- Local_clip
- MODEL
- CLIP
- Positive
- Negative
This is the consumption half of the comfyui-Lora-auto-downloader pair. The sibling node Kw_Json_Lora_CivitAIDownloader fetches models from a JSON manifest; this one takes that same JSON and actually applies the LoRAs. Feed it a config string and it loads every LoRA in the lora array onto your model, hands back the patched MODEL/CLIP, and passes the positive and negative prompt strings out as plain text outputs.
Why would you bother, when LoraLoader + two CLIPTextEncode nodes already work? Because this collapses the whole "model manifest + prompt recipe" into one string that lives inside the workflow. A character, its styling LoRAs, their strengths, and the exact prompt that goes with them all travel together. That's the self-documenting workflow dream, and when you wire it to the downloader, a shared workflow can pull its own models and prompt itself from a single JSON block.
How it works
The node parses the JSON, then does three things:
- Pulls
positiveandnegativeout of the config and puts them on the string outputs. - Decides where the base model comes from.
Load_Local_Checkpointdefaults to true, which means use theLocal_model/Local_clipyou've wired in (typically from aCheckpointLoaderSimple). Flip it false and it loads the checkpoint named in the JSON'scheckpoint[0]entry instead, finding the file by fuzzy-matching{name}_{modelVersionId}. - For each entry in the
loraarray, it finds{name}_{modelVersionId}in your loras folder and applies it through ComfyUI's coreLoraLoaderwith the entry'sstrength(default 1). Zero or negative strength entries are skipped.
The filename convention is the whole contract between this node and the downloader. The downloader saves A-Mecha_Musume_A__97207.safetensors, and this node reconstructs exactly that base string and goes looking for it.
The inputs that matter
- lora_config - the JSON. This one's a trap for beginners: it's
forceInput, so you cannot type into it. It has to come from a connection - the downloader's "Json Lora" output, or a plain text/string node with the same JSON pasted in. - Load_Local_Checkpoint - keep it true and bring your own model; set it false to let the JSON's checkpoint load instead.
- Local_model / Local_clip - your base model's MODEL and CLIP, usually from
CheckpointLoaderSimple.
Outputs: MODEL and CLIP feed your KSampler and CLIPTextEncode nodes just like any loader's. Positive and Negative carry the prompt strings from the JSON - wire them into your text encoders (or use the downloader's own Positive/Nagative outputs; they're the same strings).
Install
Same story as the rest of the pack - ComfyUI Manager, search "comfyui-Lora-auto-downloader", or:
cd ComfyUI/custom_nodes
git clone https://github.com/kycg/comfyui-Lora-auto-downloader
Restart after. No heavy deps; it rides on ComfyUI's built-in LoraLoader.
Where people get burned
- The
forceInputthing gets everyone once. If the node looks like you can't edit it, that's by design - wire a string into it. - Missing LoRA files don't raise an error. The fuzzy matcher tries hard, then prints to the console and moves on with that LoRA simply not applied. That silent-failure behavior is a known community gripe about ComfyUI tooling in general, and this node inherits it. If your output doesn't look right, check the console for "not found, skipping".
Load_Local_Checkpointis true but you didn't wireLocal_model/Local_clip→ it throws a ValueError. You must supply both.- Strength comes straight from the JSON. Community lore says 1.0 is often too hot - 0.5–0.8 is the usual landing zone for stacking LoRAs - but that's on whoever wrote the config, not the node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_config | STRING | — | |
| Load_Local_Checkpointopt | BOOLEAN | true | — |
| Local_modelopt | MODEL | — | |
| Local_clipopt | CLIP | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| Positive | STRING | — |
| Negative | STRING | — |