Nodes/ComfyUI_StableHair_ll/ApplyHairTransfer
ComfyUI Node

ApplyHairTransfer

Borrow a haircut, keep the face

By lldacing·Created 2 years ago·Updated about a year ago· 80
ApplyHairTransfer
  • model
  • images
  • bald_image
  • image
seed0
steps20
cfg1.5
control_strength1.00
adapter_strength1.00

This is the node that actually does the "transfer" in Stable-Hair. Give it a bald head plus a photo of someone whose hair you like, and it returns the bald person wearing that haircut. The remover (ApplyHairRemover) only shaves - this is where the new hair arrives. It's the closest thing in the SD1.5 ecosystem to a dedicated hair transplant, and it works with zero training on your part.

Why you'd reach for it

Hair swaps are the "everything else" of character editing: too fiddly for a plain prompt, too specific for IP-Adapter, and a mask-based inpaint turns the hair into a blob. This node was trained on the actual problem - take a reference hairstyle, apply it to a target head - so it gets the structure of a haircut (the part, the flow, the fringe) instead of just a color wash. If your use case is wig try-on, "what would I look like with her hair," or composite character work, this is the purpose-built tool.

It's SD1.5-only, and in 2026 the community's default answer for most reference edits is an instruction-editing model instead. Fair. But those redraw hair from text; this one copies hair from pixels, and that distinction matters when you need the actual haircut, not a description of one.

How it works

The loader (LoadStableHairTransferModel) assembles three learned components on top of your SD1.5 base:

  • A reference encoder (hair_encoder_model.bin) - a reference-UNet that reads the hairstyle image and produces the appearance features.
  • A hair adapter (hair_adapter_model.bin) - injected straight into the generation UNet's attention layers, swapping in custom attention processors that carry the reference features through sampling. This is the same family of trick as IP-Adapter / reference-only conditioning, just tuned for hair.
  • A ControlNet (hair_controlnet_model.bin) - holds the target's face and head geometry using the bald image.

Again, both prompts are empty. The bald head is the spatial condition, the reference photo is the appearance condition, and the two levers on the node control exactly that split.

Inputs and output

  • images (IMAGE) - the reference: a photo of the hairstyle you want to copy.
  • bald_image (IMAGE) - the target's shaved head. Usually the output of ApplyHairRemover, cropped to the same size as the reference.
  • control_strength (default 1.0) - how hard the bald-head geometry is enforced. If the face starts drifting into the reference person's face, raise this.
  • adapter_strength (default 1.0) - how strongly the reference hair is applied. Hair not matching the reference? Raise it. Face getting weird? Lower it.
  • steps (default 20), cfg (default 1.5), and seed for reproducibility.

Output is a single image (IMAGE): the target person wearing the reference hair. In the full workflow you'd composite it back onto the original photo with a mask and a paste node - the bundled example workflow skips that step and just shows the head.

Installation

Same pack, same drill. ComfyUI Manager → search ComfyUI_StableHair_ll, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/ComfyUI_StableHair_ll

Restart, then you need an SD1.5 checkpoint in models/checkpoints and the four .bin files from HuggingFace lldacing/StableHair in ComfyUI/models/diffusers/StableHair/. This node uses three of them: hair_encoder_model.bin, hair_adapter_model.bin, and hair_controlnet_model.bin.

Common issues

  • The face becomes the reference person - control_strength too low, or the two crops aren't the same size. The README insists both cropped images match dimensions and be multiples of 8; break that and geometry leaks.
  • Hair doesn't look like the reference - adapter_strength is the dial for this. Crank it and re-run; this is the setting people actually tune.
  • Not a front-facing photo - the model was trained on front-facing portraits. A 3/4 profile is a gamble.
  • ModuleNotFoundError for diffusers/sympy - the pack ships no requirements.txt (pyproject only lists numpy), so it depends on those already being in your ComfyUI environment.
  • Slow first run - the loader builds a full diffusers pipeline and loads three weight files; the first run genuinely takes a while.

If the results look off, blame the SD1.5 foundation before the node. A haircut that a 2022-era model never saw won't transfer well, and this is a small, barely-documented pack - when in doubt, the README and the workflow image in the repo are all you've got.

Categoryhair/transfer

Inputs (8)

NameTypeDefaultDescription
modelHAIR_MODEL
imagesIMAGE
bald_imageIMAGE
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT1.50–100
control_strengthFLOAT1.000–5
adapter_strengthFLOAT1.000–5

Outputs (1)

NameTypeDescription
imageIMAGE