Nodes Browser
ComfyDeploy: How ComfyUI-Portrait-Maker works in ComfyUI?
What is ComfyUI-Portrait-Maker?
Nodes:RetainFace, FaceFusion, RatioMerge2Image, MaskMerge2Image, ReplaceBoxImg, ExpandMaskBox, FaceSkin, SkinRetouching, PortraitEnhancement, ...
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-Portrait-Maker
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
Portrait-Maker
This project is an adaptation of EasyPhoto, which breaks down the process of EasyPhoto and will add a series of operations on human portraits in the future.
English | 简体中文
Community
If you have any questions or suggestions, you can reach us through:
- Email: tototianhao@gmail.com
- telegram: https://t.me/+JoFE2vqHU4phZjg1
- QQ Group: 10419777
- WeChat Group: <img src="./images/wechat.jpg" width="300">
V1.2.0 Update
- Add PM_SuperColorTransfer node to simplify the color transfer process
- Add PM_SuperMakeUpTransfer node to simplify the process of makeup transfer
- Add v1.2.0 workflow
V1.1.0 Update
- faceskin adds blur option
- Add PM_FaceShapMatch node. same as easyphot faceshap match
- Add PM_MakeUpTransfer node. same as easyphoto makeup transfer.
- Add a super-resolution model to the PM_PortraitEnhancement node. This super-resolution model can not highlight faces.
- Add v1.1.0 workflow
- RetinaFace supports face selection
V1.0.0 Update
- Added log for model downloads.
- Renamed nodes to resolve conflicts with other plugins.
- Added "roop" model to the Facefusion PM node.
- Updated the workflow.
- Speed up the second model loading
Currently Resolving
- Contacting modelscope to address Windows dependency issues.
Installation
Note: When you start the plugin for the first time, it will download all the models required by EasyPhoto. You can see the download progress in the terminal. Please do not interrupt the download (no hash verification for startup speed). If the download is interrupted, you need to manually delete the files downloaded halfway last time and download them again.
install step
-
First, install ComfyUI.
-
After ComfyUI runs successfully, go to the
custom_nodes
directoryComfyUI/custom_nodes/
cd custom_nodes
- Clone this project into the custom_nodes directory.
git clone https://github.com/THtianhao/ComfyUI-Portrait-Maker.git
- Restart ComfyUI.
ComfyUI Workflow
Easyphoto workflow location: ./workflow/easyphoto.json
Click "Load" in the right panel of ComfyUI and select the ./workflow/easyphoto_workflow.json file from the project.
Node Introduction
-
RetainFace PM: Perform matting using models from Model Scope. Link
- image: Input image
- multi_user_facecrop_ratio: Multiplicative factor for extracting the head region.
- face_index : Choose which face
-
FaceFusion PM: Merge faces from two images.
-
RatioMerge2Image PM: Merge two images according to a specified ratio.
- image1: First input image
- image2: Second input image
- fusion_rate: Fusion ratio, ranging from 0 to 1, where higher values favor image1.
-
MaskMerge2Image PM: Merge images using a mask.
- image1: First input image
- image2: Second input image
- mask: The mask to be applied for replacement.
-
ReplaceBoxImg PM: Replace the image inside a specified box area.
- origin_image: The original image
- box_area: The area to be replaced
- replace_image: The image to replace (ensure the resolution matches box_area)
-
ExpandMaskFaceWidth PM: Proportionally expand the width of the mask.
- mask: Input mask
- box: Corresponding box of the mask
- expand_width: The width expansion ratio, based on the box's width.
-
BoxCropImage PM: Crop an image using a box.
-
ColorTransfer PM: Perform color transfer on images.
-
FaceSkin PM: Extract the mask of the facial region from an image.
-
MaskDilateErode PM: Dilate and erode masks.
-
Skin Retouching PM: Apply skin retouching using the following model.
-
Portrait Enhancement PM: Process images using the following model.
-
ImageResizeTarget PM: Resize images to a target width and height.
-
ImageScaleShort PM: Reduce the smaller dimension of an image proportionally.
- image: Input image
- size: Desired length for resizing (maintains the aspect ratio)
- crop_face: Ensure the resulting width and height are multiples of 32.
-
GetImageInfo PM: Extract the width and height of an image.
-
Face Shape Match PM: Apply a certain level of fusion between the diffused image and the original image to reduce differences around the face.
-
Makeup Transfer PM: Use a GAN network model to perform makeup transfer.
-
SuperMakeUpTransfer PM:(Multi-node integration) makeup by merging two pictures
-
SuperColorTransfer PM:(Multi-node integration) transfer the colors of two pictures
Contribution
If you find any issues or have suggestions for improvement, feel free to contribute. Follow these steps:
- Create a new feature branch:
git checkout -b feature/your-feature-name
- Make changes and commit:
git commit -m "Add new feature"
- Push to your remote branch:
git push origin feature/your-feature-name
- Create a Pull Request (PR).
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Feel free to join us and contribute to the development of the EasyPhoto ConfyUI Plugin!