HyperLoRA Config
Set-and-forget settings for the face LoRA factory
- HYPER_LORA_CONFIG
HyperLoRAConfig looks intimidating - thirteen knobs, several with names like resampler.dim_head - and it's almost entirely set-and-forget. Its one job is to produce the HYPER_LORA_CONFIG object that HyperLoRALoader uses to decide what to load. The defaults are tuned to match the released ByteDance models, and for the stock v1 weights you basically only care about the three dropdowns at the top and one boolean at the bottom.
What it's for
HyperLoRA's hyper-network isn't a fixed-size blob; the resampler shape, the number of ID tokens, the LoRA rank, and the encoder combination are all architecture decisions. Rather than hardcode them, the pack exposes them here. You wire config into HyperLoRALoader, and the loader instantiates everything accordingly. That's the whole graph relationship.
The knobs that actually matter
image_processorandimage_encoder- dropdowns populated frommodels/hyper_lora/clip_processor/andmodels/hyper_lora/clip_vit/. Pick the CLIP ViT-L/14 processor and model you downloaded. "Not found!" means you haven't set up the model folders.face_analyzer- dropdown frommodels/insightface/models/. Pickantelopev2. This only matters ifencoder_typesincludesarcface.encoder_types-clip,arcface, orclip + arcface. The default (clip + arcface) is what the released models expect and gives the best likeness. Drop toclipand you lose the ArcFace embedding path (and don't need the InsightFace models); it'll be weaker on identity.has_base_lora- the boolean that switches on the base-LoRA machinery (base_resampler). Defaultfalse. The shipped v1 weights already distilled the base LoRA into the ID LoRA, so unless you have a model that actually ships a separate base resampler, leave it off. Turning it on makes the loader demand abase_resampler.safetensorsit may not have.
Everything else - resampler.dim, heads, depth, ff_mult, id_embed_dim, num_id_tokens, hyper_dim, lora_rank - is architecture plumbing. The defaults (num_id_tokens 4, lora_rank 4, etc.) match the released checkpoints. If you change them, you're building a hyper-network shape the weights weren't trained for, and you'll either get a load-time shape error or silent garbage.
Installing and wiring it
Standard pack install: ComfyUI Manager → "ComfyUI-HyperLoRA", or git clone https://github.com/bytedance/ComfyUI-HyperLoRA into custom_nodes + pip install -r requirements.txt (diffusers, insightface, onnxruntime, opencv-python, transformers) + restart. Then make sure the model folders exist:
mkdir -p models/hyper_lora/clip_processor/clip_vit_large_14_processor
mkdir -p models/hyper_lora/clip_vit/clip_vit_large_14
mkdir -p models/insightface/models
Drop the CLIP processor config in the first, CLIP ViT config.json + model.safetensors (from openai/clip-vit-large-patch14) in the second, and unzip antelopev2 from the InsightFace model zoo into the third. The HyperLoRA model folder lives under models/hyper_lora/hyper_lora/ and is picked by the loader, not this node.
Should you use it at all?
Honest take: if you're a beginner, skip it and grab HyperLoRAUniLoader instead. The Uni loader folds this node and the loader together with the correct defaults hardcoded - one node, three dropdowns, done. Use HyperLoRAConfig when you want to see what you're doing, tune has_base_lora for a variant model, or swap encoders. If the example workflow won't build, though, this is often the node people report as "still missing" - that's the Manager install failing to register the pack, not a config error, and a restart fixes it.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image_processor | COMBO | 1 options: Not found! | |
| image_encoder | COMBO | 1 options: Not found! | |
| resampler.dim | INT | 102464–2048 | — |
| resampler.dim_head | INT | 6432–512 | — |
| resampler.heads | INT | 124–32 | — |
| resampler.depth | INT | 44–16 | — |
| resampler.ff_mult | INT | 42–8 | — |
| encoder_types | COMBO | 3 options: clip, arcface, clip + arcface | |
| face_analyzer | COMBO | 1 options: Not found! | |
| id_embed_dim | INT | 512128–1024 | — |
| num_id_tokens | INT | 44–128 | — |
| hyper_dim | INT | 12832–1024 | — |
| lora_rank | INT | 42–32 | — |
| has_base_lora | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| HYPER_LORA_CONFIG | HYPER_LORA_CONFIG | — |