📷LoRALoader
Adding an SDXL LoRA on top of PhotoMaker, the fiddly way
- pipe
- MODEL
PhotoMaker gets you identity, but identity alone won't give you a cinematic grade or a Pixar look - that's what a style LoRA is for. LoRALoader is ZHO's addition in the V2.5 rewrite: it loads an SDXL LoRA on top of the PhotoMaker adapter so you can stack a style or character LoRA onto your reference-person generation.
The chain looks like: base loader → adapter loader → LoRALoader → generation node. You pick a LoRA from your ComfyUI/models/loras folder, set a weight, and it merges. This is a genuinely useful node and also the most likely one in the pack to hit you with an error, so the troubleshooting section at the bottom matters.
Mechanically it's a diffusers-style LoRA load, not the patch-injection ComfyUI does with its own LoraLoader. From the source: it unfuses and unloads whatever LoRA was loaded before, loads your new file with a fresh adapter name, then calls set_adapters(["photomaker", <your_lora>], adapter_weights=[1.0, lora_weight]) and fuses. In practice: one LoRA at a time (loading a second replaces the first), the PhotoMaker adapter itself always stays at weight 1.0, and your LoRA weight (0–1, default 0.5) applies on top. Works with normal SDXL .safetensors LoRAs sitting in your loras folder - grain/texture LoRAs like the Boring Reality family are the classic pairing, and the author ships a Disney-Character workflow that slaps a Pixar LoRA on top of a reference face.
Inputs:
- lora_name - dropdown of LoRAs in your loras folder. Nothing to type.
- lora_weight - 0 to 1, default 0.5. For style LoRAs 0.5–0.8 is usually the sweet spot; pushing toward 1.0 starts to fight the identity.
- pipe - the MODEL out of the adapter loader.
Output is a MODEL that goes straight into NEW_PhotoMaker_Generation.
The classic failure, and it's real: PEFT backend is required for set_adapters(). The set_adapters/fuse_lora calls need the peft library, and it's in the pack's requirements.txt, but if you installed with the wrong Python environment - or never ran the pip step - you'll hit exactly that ValueError when this node executes. The fix is one line:
pip install peft
…into whatever environment ComfyUI is running in, then restart. The other gotcha is more subtle: load_lora_weights expects a diffusers-format file, and while most CivitAI SDXL LoRAs are, a few odd ones aren't - if a LoRA fails to load, try a different one before assuming the node is broken. And remember the pack itself is a frozen diffusers wrapper from early 2024; if you're not already committed to this workflow, the native PhotoMaker nodes in ComfyUI core plus a normal LoraLoader do the same job with less ceremony.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_name | COMBO | 0 options: | |
| lora_weight | FLOAT | 0.500–1 | — |
| pipe | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |