Face_Anon_Simple_Align
The node that decides who gets anonymized — and whether faces get aligned first
- clip_vision
- image
- cond_image
- condition
- face_align
Face_Anon_Simple_Align is the pack's conditioning and face-detection hub. It does two jobs: it turns your input image into the CLIP embeddings the sampler needs, and - if you flip the align switch - it loads a face landmark detector so each face in the picture gets treated individually. It's also the node that unlocks the pack's second trick, face swapping, via an optional second image input.
What it's doing under the hood
Job one is CLIP encoding. It takes your image, encodes it with a CLIP vision model, and packs the resulting image embeddings into a condition packet. That packet is what the sampler uses to know what the "person to anonymize" looks like. Job two is face alignment: with align on, it instantiates a face_alignment detector (SFD face detector plus the 2DFAN4 landmark model, a 91.8MB download that happens on first use). With alignment loaded, the sampler can find, anonymize and paste back each face separately instead of regenerating the whole picture. The node also calls unload_all_models() before that detector spins up, which is a small mercy on low-VRAM rigs.
Inputs and outputs that matter
- clip_vision (CLIP_VISION): needs a CLIP vision model loaded via CLIPVisionLoader. The README names
clip_vision_g.safetensors- the SD 1.5 default that ships with ComfyUI. The bundled example workflow usesclip_vision_H.safetensorsinstead. Either works; both are already in yourmodels/clip_visionfolder. - image (IMAGE): the photo to anonymize.
- width / height (INT, default 512): working resolution. This is an SD 1.5 pipeline, so 512-ish is home turf; the example workflow runs 1024x768.
- align (BOOLEAN, default False): the big switch. Off = single-face / whole-image pass. On = per-face detection. Read the modes below.
- cond_image (optional IMAGE): plugging a second image here flips the node into face-swap mode - the output uses cond_image as the base identity rather than the source.
Outputs: condition (CONDITIONING) into the sampler's condition input, and face_align (FACEANON_ALIGN) into the sampler's optional face_align input. Wire face_align even when align is off - it carries the "no alignment" signal and keeps the sampler happy.
The three modes, straight from the README
- Single face: image only, align off, tune
anonymization_degreein the sampler. - Multiple unaligned faces: image only, align on - each face gets handled, background untouched.
- Face swap: image + cond_image, align off. The result uses cond_image as the base.
Install and first-run notes
Align is where the 91.8MB face_alignment checkpoint (2DFAN4) gets downloaded, so the first run with align on stalls briefly while it pulls. And if the pack was installed without pip install -r requirements.txt, the face_alignment import blows up at exactly this moment - that's the one Python dependency the whole face pipeline needs.
Where people get burned
Feeding a big image with align off works, but the node silently resizes to your width/height, so detail-heavy faces at 512 can come out soft. And multi-face groups are only as good as the detector: profiles, heavy occlusion or tiny background faces get missed, and a missed face simply doesn't get anonymized. Check the output before you post it - this is a stylization tool, not a guarantee.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_vision | CLIP_VISION | — | |
| image | IMAGE | — | |
| width | INT | 512128–4096 | — |
| height | INT | 512128–4096 | — |
| align | BOOLEAN | false | — |
| cond_imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| condition | CONDITIONING | — |
| face_align | FACEANON_ALIGN | — |