Identity Ref Obfuscator
Hiding a face from the celebrity classifier without losing the face
- identity_image
- identity_obfuscated
Google's January 2026 policy update made Nano Banana aggressive about recognizing public figures - if your identity reference is a celebrity, the swap nodes in this pack often come back REFUSED before the model ever gets to work. IdentityRefObfuscator is the pack's dodge: it slightly distorts your reference so it falls below the celebrity-recognition classifier's confidence threshold, while staying recognizable enough for the image-edit model to actually match the identity.
Let's be clear about what this is and isn't. It's for legitimate work - your own face, a consented subject, a character study - hitting a classifier that's over-eager. It's not a tool for fooling people, and it's also not magic: it works on references, not on the final result, and its effectiveness depends entirely on how hard the model's recognition system has locked onto that particular face.
How it works
The node applies three distortions, each aimed at a different weakness of face-recognition embeddings:
- Blur - strips the high-frequency detail (skin texture, fine edges) that recognition models lean on.
- A mild perspective warp - roughly 8% corner displacement at full strength, which throws off geometric feature alignment.
- A LAB color shift - moves skin-tone statistics so color-based hash matching drops out.
Chained together, they push a recognized face just under the classifier's threshold. Gemini's edit pathway still reads the face as "this person" because it's working from overall identity, not from a biometric template.
Inputs that matter
identity_image- the reference to obfuscate. Feed the same image you'd otherwise wire intoidentity_1on a swap node.strength(default 0.5) - the one knob you'll actually touch. The tooltip's guidance is good: 0.3–0.5 typically defeats the classifier without destroying identity; above 0.7 you start losing recognizable features.seed- 0 means a random distortion every run; a non-zero value gives you a deterministic, reproducible output. Set it when you find a strength that works so you can compare runs fairly.apply_blur,apply_warp,apply_color- toggles for each distortion, if you want to isolate which one is doing the work.
Output
One identity_obfuscated IMAGE, ready to chain straight into a swap node's identity input. That's the intended workflow: ref → obfuscator → swap node → result.
Install
It's part of the NanoBanana FaceSwap pack, so install once and all nine nodes appear:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-NanoBanana-FaceSwap
cd ComfyUI-NanoBanana-FaceSwap
pip install -r requirements.txt
Restart ComfyUI (or find it via ComfyUI Manager under "NanoBanana FaceSwap"). This node itself is pure local image processing - blur, warp, and color transforms with numpy/Pillow - so no API key needed.
Troubleshooting
- Still refused after obfuscation - the workflow examples suggest bumping to 0.7–0.85. Past ~0.85, identity degrades to the point where Gemini can't match it anymore, so if that fails, the pack's Unbiased pathway or a VPN in a permissive region (US works) is the next rung on the ladder.
- Result doesn't look like the person - you've overshot the strength. Drop back toward 0.3–0.4 and check with a non-zero seed for reproducibility.
- Refused with the obfuscator not in the path - remember the classifier fires on the reference. If you're swapping a celebrity face and got this far, the obfuscator is the missing piece.
One honest caveat: this is cat-and-mouse with a moving target. A model update that tightens recognition can quietly make your carefully tuned strength stop working. If it does, re-tune - it's a two-minute job.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| identity_image | IMAGE | — | |
| strength | FLOAT | 0.500–1 | Overall distortion strength. 0.3-0.5 typically defeats the celebrity classifier without destroying identity. >0.7 may lose recognizable features. |
| seed | INT | 00–2147483647 | 0 = random each run; non-zero produces deterministic output. |
| apply_blur | BOOLEAN | true | — |
| apply_warp | BOOLEAN | true | — |
| apply_color | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| identity_obfuscated | IMAGE | — |