Nodes/ComfyUI-HyperLoRA/HyperLoRA Generate Base LoRA
ComfyUI Node

HyperLoRA Generate Base LoRA

Generate the scene-and-clothing LoRA

By bytedance·Created about a year ago·Updated about a year ago· 498
HyperLoRA Generate Base LoRA
  • hyper_lora
  • base_cond
  • LORA

HyperLoRAGenerateIDLoRA gets the glory, but the pack has a second generator, and this is it. HyperLoRAGenerateBaseLoRA takes the BASE_COND from HyperLoRABaseCond - the reference image with the face blurred out - and runs it through a separate hyper-network branch to produce a LoRA that captures background, clothing, and scene rather than identity. Feed both LoRAs into your model and you get the face and the environment from your reference, without the face leaking into the scene LoRA or vice versa.

How it works

Same machinery as the ID generator, a different path. The BASE_COND (CLIP-processed pixels of the face-blurred image) goes through the CLIP image encoder, then a dedicated base resampler, then the same hyper-module bank that predicts LoRA down/up matrices - this time run in mode='base'. The output is a standard LoRA state dict targeting SDXL attention layers, just like the ID one. The design intent from the paper is explicit: separating the two prevents "irrelevant features" - hair, clothes, background - from leaking into the ID-LoRA and polluting identity.

The catch

The released v1 weights mostly make this node moot. The README says the 0.25× base LoRA was distilled into the ID LoRA in the v1 release, shrinking the model and cutting GPU memory. So the shipped sdxl_hyper_id_lora_v1_fidelity and sdxl_hyper_id_lora_v1_edit don't need a separately generated base LoRA - the information is already in the ID LoRA. And the plumbing backs that up: this node's execution needs hyper_lora.base_resampler to be loaded, which only happens when the loader config has has_base_lora true and a base_resampler.safetensors actually exists in the model folder. On the stock setup, both are absent.

So the honest positioning: it's the base half of a two-generator architecture, present for completeness and for anyone running a variant or custom HyperLoRA that ships the base branch. If your model folder has a base_resampler.safetensors, this is how you use it; if it doesn't, don't fight it - the ID LoRA already carries the distilled base.

Inputs and output

  • hyper_lora - the loaded bundle.
  • base_cond - from HyperLoRABaseCond, which does the face-blurring.

Output: one LORA wire, feeding HyperLoRAApplyLoRA (stack it with the ID LoRA) or HyperLoRASaveLoRA (keep both files).

Installing

Standard: ComfyUI Manager → "ComfyUI-HyperLoRA", or git clone https://github.com/bytedance/ComfyUI-HyperLoRA into custom_nodes, pip install -r requirements.txt, restart. Needs the CLIP processor/ViT under models/hyper_lora/ and, for this node specifically, a model that includes the base resampler file. The InsightFace pack (antelopev2 under models/insightface/models/) is required upstream in HyperLoRABaseCond for the landmarks it needs.

Gotchas

Because the base resampler is only loaded when has_base_lora is true, the most common error is a missing-file assertion at load time - "Base resampler file not found!" - which tells you your config and your model don't match. That's expected behavior, not a bug. And remember what the base LoRA is for: it's the environment, so feed HyperLoRABaseCond images where the background, clothing, and framing are things you actually want to reproduce. If you're after pure identity, this node is a detour.

CategoryHyperLoRA

Inputs (2)

NameTypeDefaultDescription
hyper_loraHYPER_LORA
base_condBASE_COND

Outputs (1)

NameTypeDescription
LORALORA