ComfyUI  >  Nodes  >  Character Face Swap >  Uncrop Face

ComfyUI Node: Uncrop Face

Class Name

Uncrop Face

Category
CFaceSwap
Author
ArtBot2023 (Account age: 302 days)
Extension
Character Face Swap
Latest Updated
5/22/2024
Github Stars
0.1K

How to Install Character Face Swap

Install this extension via the ComfyUI Manager by searching for  Character Face Swap
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Character Face Swap in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Uncrop Face Description

Seamlessly integrate cropped faces back into original images for natural blending and visual coherence.

Uncrop Face:

The Uncrop Face node is designed to seamlessly integrate a cropped face back into its original image context. This node is particularly useful in scenarios where you have performed face-specific operations, such as enhancements or modifications, and need to place the processed face back into the original image without noticeable boundaries. The primary goal of this node is to ensure that the re-integrated face blends naturally with the surrounding areas, maintaining the overall visual coherence of the image. By leveraging advanced techniques to scale and align the face and mask, the Uncrop Face node helps you achieve a smooth and realistic final result.

Uncrop Face Input Parameters:

image

This parameter represents the original image from which the face was cropped. It is crucial as it provides the context into which the processed face will be re-integrated. The image should be a tensor representing the pixel data of the original image.

bbox

The bbox parameter specifies the bounding box coordinates of the cropped face within the original image. This bounding box helps in accurately positioning the face back into its original location. The bbox should be provided as a tuple containing the coordinates (x0, y0, x1, y1).

face

This parameter is the processed face image that you want to uncrop and place back into the original image. It should be a tensor representing the pixel data of the face after any modifications or enhancements have been applied.

mask

The mask parameter is a tensor that defines the area of the face to be blended with the original image. It helps in creating a smooth transition between the face and the surrounding areas, ensuring that the re-integrated face does not have harsh edges or noticeable boundaries.

Uncrop Face Output Parameters:

image

The output parameter is the final image with the face re-integrated into its original context. This tensor represents the pixel data of the image after the uncropping process, where the processed face has been seamlessly blended back into the original image.

Uncrop Face Usage Tips:

  • Ensure that the bounding box (bbox) accurately represents the coordinates of the cropped face within the original image to achieve precise alignment.
  • Use a well-defined mask to create smooth transitions between the face and the surrounding areas, avoiding harsh edges.
  • Verify that the face tensor is correctly processed and aligned before using the Uncrop Face node to ensure the best visual results.

Uncrop Face Common Errors and Solutions:

"Invalid bounding box coordinates"

  • Explanation: The provided bounding box coordinates do not correctly correspond to the location of the cropped face within the original image.
  • Solution: Double-check the bbox values to ensure they accurately represent the face's position in the original image.

"Mismatched tensor dimensions"

  • Explanation: The dimensions of the face tensor do not match the expected size based on the bounding box coordinates.
  • Solution: Ensure that the face tensor is correctly scaled and aligned to fit within the specified bounding box.

"Mask tensor not provided"

  • Explanation: The mask parameter is missing or not correctly defined, leading to improper blending of the face with the original image.
  • Solution: Provide a valid mask tensor that defines the area of the face to be blended, ensuring smooth transitions.

Uncrop Face Related Nodes

Go back to the extension to check out more related nodes.
Character Face Swap
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.