ComfyUI-FaceSwap

ComfyUI-FaceSwap
★ 39

人脸替换roopComfyUI节点图像编辑
在 ComfyUI 中进行人脸替换的简易自定义节点(基于 roop),支持选择源脸与目标索引并可链式替换多个人脸。
💡 将一张图片中的人脸替换到另一张图片中,或在场景中替换多张人脸。
🍴 4 Forks💻 Python🔄 2024-05-22
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/c73fe210bae7
📦 requirements.txt
insightface==0.7.3
onnx==1.14.0
onnxruntime==1.15.0
opencv-python==4.7.0.72
cython
img.png
📄 README

ComfyUI-FaceSwap

Very basic custom node to enable face swapping in ComfyUI. Only runs on CPU at the moment. GPU support will come later. Mostly a direct port from the excellent a1111 plugin: https://github.com/s0md3v/sd-webui-roop.

At the moment Insightface have only released the 128×128 model so the results can be a bit janky at large res. Hopefully they release their bigger res models soon. Use at your own discretion, i am not responsible for what you create with this.

Installation

cd /custom_nodes/

git clone https://github.com/imb101/ComfyUI-FaceSwap

re-start comfyui and it should install all the bits to work

Usage

Add a FaceSwapNode, give it an image of a face(s) and an image to swap the face into. Pick which source face you want to use and then which faces to replace(index starts from 0 and is comma seperated). You can chain the nodes to replace multiple faces in a scene. Sample workflows are in the repo.