HyperLoRA Generate ID LoRA
Your face LoRA in seconds, no training run required
- hyper_lora
- id_cond
- LORA
This is the node that does the party trick. You feed it a preprocessed face condition, and a few seconds later you get an actual, real LoRA - the kind of .safetensors you'd normally spend a training run producing. No kohya, no 2000 steps, no dataset curation. That's the whole pitch of the bytedance/ComfyUI-HyperLoRA pack, and this node is where it happens.
What it is and why you'd reach for it
Normal face identity tools split into two camps. Adapters like IP-Adapter or InstantID inject identity at inference time, zero-shot, but they're conditional - you have to keep the adapter in the graph and re-inject the reference every generation. Trained LoRAs are reusable and editable, but they cost a training run per face. HyperLoRA sits in the gap: a hyper-network, trained once, that generates the LoRA weights for a new face on the fly. It's zero-shot like an adapter, but the output is a genuine LoRA you can save, merge, or keep using.
This specific node is the generation step. It takes the ID_COND produced upstream and turns it into LORA - so in the example T2I workflow it sits between HyperLoRAIDCond and HyperLoRAApplyLoRA.
How it works
The ID_COND carries two things: CLIP image tokens from the face crop, and an ArcFace (InsightFace) embedding of the same face. Here they get pushed through a Perceiver-style resampler - learned query tokens that cross-attend over the identity signals - and then each output token chunk feeds one HyperLoRAModule, a tiny hyper-network that predicts actual lora_down and lora_up matrices for the corresponding SDXL attention layer. The output is a standard LoRA state dict (down/up weights plus alpha), nothing exotic. That's why the result is a real LoRA rather than a special condition.
Two details worth knowing. First, this is SDXL-only - the hyper modules target SDXL attention blocks, so don't point it at a Flux or SD 1.5 checkpoint. Second, the identity signal only comes through if your loader config included the encoders to produce it, so keep encoder_types on clip + arcface unless you know what you're doing.
Inputs and outputs that matter
hyper_lora- the loaded model bundle fromHyperLoRALoader(or theUniLoader).id_cond- the face condition fromHyperLoRAIDCond. If you'd rather skip the intermediate nodes entirely,HyperLoRAUniGenerateIDLoRAwraps FaceAttr + IDCond + this node into one.
Output is a single LORA wire. It feeds either HyperLoRAApplyLoRA (apply it to your SDXL checkpoint) or HyperLoRASaveLoRA (write it to disk for reuse). Both, if you're smart about it.
Installing the pack
ComfyUI Manager, search "ComfyUI-HyperLoRA", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/bytedance/ComfyUI-HyperLoRA
cd ComfyUI-HyperLoRA
pip install -r requirements.txt
It pulls in diffusers, insightface, onnxruntime, opencv-python, and transformers - all heavy-ish, and insightface is the historically fiddly one. The model files go under models/hyper_lora/ (CLIP processor, CLIP ViT, and the HyperLoRA model from HF bytedance-research/HyperLoRA) plus the antelopev2 InsightFace pack under models/insightface/models/. The README lays out the exact folder tree; get it right or the dropdowns show "Not found!". The bundled example workflows also need ComfyUI_ADV_CLIP_emb (for stop_at_clip_layer -2) and ComfyUI-Impact-Pack (FaceDetailer).
Gotchas
- "No face detected" upstream means the ID cond is empty and this node will just error or produce garbage. Fix the source images, not this node.
- Checkpoint compatibility is real. The README confirms RealVisXL v4.0 (best results), LEOSAM's HelloWorld XL 3.0, and CyberRealistic XL v1.1 work; ArienMixXL v4.0 doesn't. The weight of the resulting LoRA should sit around 0.75–0.85 in
ApplyLoRA, nudged up for long prompts. - The text prompt still needs the trigger words
fcsks fxhks fhyks,at the start - the generated LoRA only fires when the tokens appear.
If your results look off, the most likely culprit is input photo quality: this trains the face, so feed it clear, frontal, well-lit head-and-shoulders shots. The generated LoRA also makes a great init for real finetuning - the README notes ~50 steps gets you an even better ID LoRA.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| hyper_lora | HYPER_LORA | — | |
| id_cond | ID_COND | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LORA | LORA | — |