FaceTag Paste Back
Paste the inpainted crop back, seams and all
- paste_data
- image
- mask
- background
- image
FaceTag Crop (YOLO) finds the face and crops it out of every frame; this node is what puts the fixed face back. You hand it the inpainted crop plus the paste_data token from the crop node, and you get the full-resolution source frames back with the face composited in - no seams, no color shift, and critically, no frame-to-frame jitter.
How the paste works
The jitter thing is the detail worth knowing, because it's the thing that makes naive crop-and-paste video workflows look wrong even when every individual frame looks fine. The paste_data produced by FaceTagCrop stores each crop's placement as a fractional origin - the crop was sampled at sub-pixel positions, and this node warps the patch back to that exact fractional coordinate with warpAffine. It's the precise inverse of the crop's sampling, so there's no round-to-integer drift between frames. That's why a 200-frame sequence doesn't shimmer.
Mechanically it's straightforward. It resizes your inpainted patch back to the crop's original source size (Lanczos by default; cubic, linear, and area are available), optionally applies a mask region, then blends. Three blend modes: normal (plain alpha composite), seamless (Poisson blending via cv2.seamlessClone), and seamless_mixed (the mixed-clone variant that keeps texture and gradients from the patch). Poisson is picky near borders, so if it throws, the node silently falls back to a normal composite rather than killing your run.
The inputs that matter
The inputs you'll actually set: paste_data (from FaceTagCrop's fourth output - this is a custom FACETAG_PASTE type, so no other crop node will plug in), image (the inpainted crop), blend_mode, feather (soft mask edge in source pixels; default 12 is a fine starting point), and opacity. The color-correction inputs are the hidden gem: color_match set to mean_std or histogram nudges the patch's colors toward the exact pixels it covers, and color_match_strength controls how far it goes. Inpainters love to shift hue or exposure on the crop, and this quietly fixes it at composite time instead of forcing you to chase it in the sampler.
The optional inputs are for edge cases: mask is a region aligned to the crop (omit it to paste the whole crop), invert_mask flips that region, and background supplies a longer or extended timeline to paste onto - if your inpainted sequence has more frames than the original capture, the last background frame is held for the extras. That's how you extend a clip past its last detected face without the composite collapsing.
Outputs
Output is a single image: the full frames at source resolution, ready to feed a video encoder or VAE.
Install
Same pack, same steps - ComfyUI Manager, search "facetaggg", or:
cd ComfyUI/custom_nodes
git clone https://github.com/adbrasi/facetaggg.git
# restart ComfyUI
It needs no YOLO model of its own; the pack's shared requirements.txt (ultralytics, opencv-python) covers everything, and opencv is what does the warping and Poisson blending.
Gotchas
If nothing connects, you forgot the paste_data wire - it only accepts the token from FaceTagCrop, and a mismatched crop node will refuse to connect. Seamless blending is noticeably slower over hundreds of frames; try normal with a decent feather first and escalate to Poisson only for stubborn seams. And if the pasted region's colors look off, that's the color_match input doing nothing because it's set to none - switch to mean_std at full strength and the mismatch usually disappears. Together with FaceTag Crop this is a genuinely complete video face-fix loop: detect, crop, inpaint, paste back, no manual masking anywhere.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| paste_data | FACETAG_PASTE | — | |
| image | IMAGE | The (inpainted) crop to paste back | |
| blend_mode | COMBO | seamless uses Poisson blending (cv2.seamlessClone) | |
| feather | INT | 120–512 | Soft mask edge, in source pixels |
| mask_expand | INT | 0-256–256 | Grow (+) or shrink (-) the paste region before feathering |
| opacity | FLOAT | 1.000–1 | — |
| color_match | COMBO | Match the pasted colors to what they cover | |
| color_match_strength | FLOAT | 1.000–1 | — |
| interpolation | COMBO | 4 options: lanczos, cubic, linear, area | |
| maskopt | MASK | Region to paste (aligned to the crop). If omitted, the whole crop is pasted. | |
| invert_maskopt | BOOLEAN | false | — |
| backgroundopt | IMAGE | Optional base frames to paste onto (same resolution as the source). Use this to supply a longer/extended timeline; if omitted, the original frames are used and the last one is held for any extra inpainted frames. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |