GITS Face Replacement (Simple)
The GITS Node You'll Actually Reach For
- images
- static_logo
- static_logo_mask
- ring_logo
- ring_logo_mask
- final_images
- removed_background_images
Most "face" tooling in ComfyUI is generative - you're steering a model toward producing a face that looks like someone. This pack does the opposite. It's the Reactor school: find the face, delete it, paste a graphic exactly where it was. Nothing gets diffused.
GITS Face Replacement (Simple) is that whole pipeline in one node. Feed it images, get images back with a tracked overlay on the faces. No KSampler, no second pass.
What's under the hood
It's a thin wrapper - literally. The source imports GITSTrackAndGuide and delegates to it with fixed defaults, so the guts are the same: MediaPipe FaceLandmarker finds the face, an optional Big-LaMa pass removes it, the artwork gets composited on the tracked transform. The wrapper's gift is that you never see the fourteen other sockets.
Worth knowing: artwork is optional on every node in this pack. Leave static_logo, static_logo_mask, ring_logo and ring_logo_mask unconnected and tracking plus LaMa removal still run - you just get the face removed and nothing drawn over it. Which makes this a fine "remove the face" node on its own, not how it's sold but definitely how people will use it.
The inputs that matter
A couple of dozen widgets here, and you can ignore most of them. Set these five:
face_removal-lamaordisabled. Onlama, a face-sized crop goes through Big-LaMa and the hole gets filled. Ondisabledyou get tracking and artwork only - the honest choice for a first test, since it skips the model dependency.effect_preset-classic,subtle,aggressive_track,live_balanced,cinematic_glitch, orcustomto take your widget values literally. Start onclassic.face_mode-locked_faceholds the first identity it picked,largest_facealways chases the biggest,all_faceshandles up tomax_faces,single_faceis the legacy one-tracker path. For one subject, you wantlocked_face.mask_input_mode-comfy_load_image(default) oralpha_mask. It exists because ComfyUI's core Load Image hands you an inverted mask relative to the alpha you'd expect. Loading your logo with core Load Image? Leave it. Coming from anything else? Tryalpha_mask.removal_area- how much bigger than the detected face the removal mask is. Default 1.15. See a face-shaped ghost at the edges? Nudge it up.
profile_boost and partial_face_boost are the two fields the author bothered to write tooltips for, and both are honest about their narrow remit: extra mask expansion on side shots, and on faces cropped by the frame edge. Frontal faces barely change. If a profile shot leaves half a cheek showing, that's the knob, not removal_area.
Two outputs: final_images (artwork composited) and removed_background_images (the LaMa fill, no artwork). That second one is genuinely useful - it's the plate you'd send into diffusion if you want to re-render the scene with the identity gone.
Install
Standard custom-node clone, or search GITS in ComfyUI Manager.
cd ComfyUI/custom_nodes
git clone https://github.com/Niutonian/ComfyUI-GITS-Tracked-Identity.git
cd ComfyUI-GITS-Tracked-Identity
python -m pip install -r requirements.txt
python scripts/download_face_landmarker.py # writes into ComfyUI/models/gits_tracking/
That script has a --skip-lama flag for just the two face-detection models. Requirements are mediapipe>=0.10.14,<0.11, numpy>=1.24,<2 and Pillow>=10.0 - note the numpy pin, which is what breaks installs on an environment already sitting on numpy 2. OpenCV and PyTorch come from ComfyUI. Python 3.10 or 3.11, because of that mediapipe ceiling.
And the part people miss: LaMa removal needs ComfyUI-RMBG installed and loaded. The pack resolves RMBG's AILab_LamaRemover node at runtime and repoints it at your local models/gits_tracking/big-lama.pt. No RMBG, no LaMa - the error message says exactly that, so you won't be guessing. Already have Big-LaMa in RMBG's folder? Copy it across.
Tuning it, and where it bites
For a single image, classic with LaMa on is the whole answer - temporal settings are meaningless at batch size 1. For video, turn temporal_lama on, set lama_every_n_frames to 2–3, and keep temporal_blend around its 0.35 default; that cross-fades a fresh LaMa result with the optical-flow-warped previous one, which is what stops the fill from strobing.
Things that will actually happen to you:
- "Model not found." You skipped the models folder. Three files, exact names,
ComfyUI/models/gits_tracking/, restart. - "MediaPipe import error." Wrong interpreter - on Windows embedded,
python_embeded\python.exe, not thepythonon your PATH. - The logo is inverted. You're on
alpha_maskwhen you wantcomfy_load_image, or the reverse. It's a two-value switch precisely because it's an even split. - A color cast over the whole frame. Fixed in current builds. If you still see tone shift, check whether it's global (old bug, gone) or confined to the face hole (just LaMa's guess).
- Identities swapping in a two-person shot.
locked_face, and dropmax_facesto roughly the number of people on screen. There are no detector toggles here - the control you have is telling it how many identities to worry about.
One caveat that isn't a bug: LaMa is a still-image inpainter. The temporal layer smooths it, but a head turning through 90 degrees over a long shot will show that, and extreme profiles and tiny faces stay hard. The README says so, and it's telling the truth.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | FLOAT | 24.001–240 | — |
| effect_preset | COMBO | classic | 6 options: custom, classic, subtle, aggressive_track, live_balanced, cinematic_glitch |
| logo_scale | FLOAT | 1.100.25–3 | — |
| vertical_position | FLOAT | -0.04-1–1 | — |
| ring_speed | FLOAT | 35-720–720 | — |
| face_removal | COMBO | lama | 2 options: lama, disabled |
| removal_area | FLOAT | 1.150.5–2.5 | — |
| lama_strength | INT | 2300–255 | — |
| edge_smoothness | INT | 80–20 | — |
| mask_input_mode | COMBO | comfy_load_image | 2 options: comfy_load_image, alpha_mask |
| face_mode | COMBO | locked_face | 4 options: locked_face, largest_face, all_faces, single_face |
| max_faces | INT | 41–12 | — |
| temporal_lama | BOOLEAN | true | — |
| lama_resolution | COMBO | 384 | 3 options: 256, 384, 512 |
| lama_every_n_frames | INT | 21–30 | — |
| temporal_flow | BOOLEAN | true | — |
| temporal_blend | FLOAT | 0.350–0.95 | — |
| glitch_intensity | FLOAT | 0.000–1 | — |
| signal_flicker | FLOAT | 0.100–1 | — |
| edge_aware_mask | FLOAT | 0.350–1 | — |
| yaw_foreshorten | FLOAT | 0.400–1 | — |
| profile_boost | FLOAT | 0.550–1 | Extra LaMa mask expansion on side shots only. Raise if profiles leave half a face. |
| partial_face_boost | FLOAT | 0.550–1 | Extra mask expansion when only part of the face is visible (edge crop). Full faces almost unchanged. |
| static_logoopt | IMAGE | — | |
| static_logo_maskopt | MASK | — | |
| ring_logoopt | IMAGE | — | |
| ring_logo_maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| final_images | IMAGE | — |
| removed_background_images | IMAGE | — |