Hunyuan Video LoRA Loader - Load Loras from JSON
Stack every Hunyuan LoRA in one JSON blob
- model
- model
The standard way to stack three LoRAs in ComfyUI is to chain three LoraLoader nodes, wire the model output of one into the next, and pray you remember which strength is which. HunyuanLoraFromJson is the version of that where you paste a JSON array into one node and let it do the chaining for you. It's the flagship of the PixelFunAI pack - and the one with the most impressions - for a simple reason: if you're running Hunyuan Video LoRAs in bulk, it turns a pile of spaghetti into a config file you can actually edit.
Hunyuan Video is Tencent's 13B video model from December 2024 - cinematic by default, uncensored, eager to take a LoRA, and greedy enough that most people run it quantized. The LoRA ecosystem around it is real, and you almost never run one LoRA alone. Style plus character plus a concept stack is the norm. This node exists to make that stack readable.
How it works
You feed it two things: a model, and a JSON string that's an array of LoRA configs. Each entry needs at least a filename and a strength; optionally you can set use_block_cache and use_single_blocks per LoRA. The node walks the array in order and applies each one onto the accumulated model via ComfyUI's own load_lora_for_models - same machinery a normal LoraLoader uses, just looped. Order matters: the second LoRA stacks on top of the first.
Here's the example straight from the pack's README:
[
{
"filename": "kerbal30.safetensors",
"strength": 0.75,
"use_block_cache": true,
"use_single_blocks": false
},
{
"filename": "other_lora.safetensors",
"strength": 0.5,
"use_block_cache": false,
"use_single_blocks": true
}
]
use_block_cache means "pull this LoRA's saved block settings from the pack's cache if they exist" - that's the same cache the sibling Edit Blocks node writes to. Leave it true and you get the same behavior for every file.
The inputs and output
Only two inputs matter here, and only one of them is interesting:
- model - the base model you're patching (MODEL in).
- json_data - the multiline STRING where you paste the JSON. This is the whole point.
- Output: model - the patched model, wired into whatever comes next (sampler, another loader, KSampler chain).
There's no LoRA dropdown, no strength slider on the node itself - it's all in the JSON. That's the feature and the tax. If you're the kind of person who keeps workflows in git, this is great: the whole LoRA stack is text.
Installing it
Same story as every node in this pack, and it's a light one:
cd ComfyUI/custom_nodes
git clone https://github.com/PixelFunAI/ComfyUI_PixelFun
Then restart ComfyUI. Or use ComfyUI Manager and search for "Hunyuan LoRA Loader Nodes". There's no requirements.txt - the only non-standard import is yaml, which ComfyUI already ships - and no model downloads. The node doesn't bring any weights; it just loads the LoRAs you already have.
Where people get burned
Three things, all grounded in the code.
- A typo in the filename silently does nothing. The node looks up files in
ComfyUI/models/loras, and if it can't find one it logs an error to the console and passes the model through untouched. No red node, no popup. If nothing seems to change, check the console first. - Bad JSON is also silent. A
JSONDecodeErrorgets logged and you get your model back unpatched. Watch the terminal while you iterate. - Strengths stack, and Hunyuan LoRAs at 1.0 are already strong. Two at 0.75 on top of each other can go mushy fast. Start lower than you think.
One honest caveat: this is a small, single-file pack from a niche author. Searching Reddit for "PixelFun" turns up nothing - there's no community around it to lean on when something's off. But the code is short, readable, and does exactly what the README says, so you're not gambling much.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| json_data | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |