NH Simple Face Paste
Drop a face onto a new body with mask-guided blending
- dest_image
- dest_mask
- source_image
- source_mask
- IMAGE
The "paste a face onto a body" workflow has a thousand moving parts in the fancy versions - detection, alignment, color matching, inpainting. NH Simple Face Paste is the version with none of those, and it's honest about it: you give it a source face, a destination image, masks for both, and it pastes. That's the whole deal, and for a surprising number of jobs it's enough.
The five inputs are source_image + source_mask (the face you're moving) and dest_image + dest_mask (the target and where the face should land), plus feathering (default 20, 0–200). It outputs a single blended IMAGE. There's no face detector anywhere in this node - the masks are the detection. You get the masks from any segmentation node you like (NH's own Portrait Segment works great here) and feed them in; the node just does the geometry.
How it actually blends
The mechanism, straight from the source, is straightforward computer vision. It finds the bounding box of each mask, crops the source face to its box, resizes it to the destination box's size, then blends it in with an alpha mask built from the source mask. The feathering slider controls a Gaussian blur on that alpha mask - higher feathering = softer, more forgiving edges; lower = crisper but more likely to show the seam. Finally it composites over the destination region and returns the result. If either mask comes up empty, it returns the destination image unchanged rather than erroring - a quiet no-op that's worth knowing about.
Because it works purely off masks and bounding boxes, it also works on anything, not just faces - logos onto shirts, textures into regions, any masked object onto any masked target. The "Face" in the name is a suggestion, not a contract.
The honest limitations
This is "simple" by design, and the missing pieces are the ones that make pro face-swaps convincing: there's no alignment or pose matching (it stretches the source to fit the dest box, so a side-profile source into a front-facing target will look wrong), and no color grading (a blue-lit source face pasted into a warm scene keeps its blue cast). Where people get burned is expecting it to fix those. Use it for same-pose, same-lighting pastes - or as the compositing step inside a bigger workflow where the alignment was already handled upstream.
Install
It's part of NH-Nodes:
- ComfyUI Manager → search NH-Nodes → install → restart ComfyUI. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/NH-Nodes.git
cd NH-Nodes
pip install -r requirements.txt
Then restart ComfyUI.
It needs OpenCV, which the pack's requirements.txt installs as opencv-python - that's already covered by installing the pack.
Common issues
If nothing seems to change, check your masks: an empty mask makes the node pass the destination through untouched. If the pasted region looks stretched, it's because the source and destination boxes have different aspect ratios - the node resizes to fit, distortion included; matching your source crop's aspect to the target helps. And if the seam is visible, feathering is your fix - but remember it blurs the mask, so high values can also blur the face edge into a soft halo. Start at 20, adjust by eye, and let a follow-up inpaint pass clean up the border.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| dest_image | IMAGE | — | |
| dest_mask | MASK | — | |
| source_image | IMAGE | — | |
| source_mask | MASK | — | |
| feathering | INT | 200–200 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |