ComfyUI Face Swap Workflow

세부 정보

파일 다운로드

모델 설명

(커스텀 노드/의존성 설치에 문제가 있으면 댓글을 남겨주세요. 최선을 다해 도와드리겠습니다!)

이 간단한 워크플로우는 두 가지 주요 단계로 구성됩니다. 첫 번째로, 소스 이미지의 얼굴을 입력 이미지(일반적으로 흐릿한 이미지)로 교체하고, 두 번째로 얼굴을 복원하여 선명하게 만듭니다. 신뢰도 값을 원하는 대로 조정할 수 있습니다. 기본값은 1.000으로 설정되어 있습니다.

제 작업이 도움이 되었다면, 지원을 표시하기 위해 커피 한 잔을 사주시면 감사하겠습니다. 감사합니다! https://www.buymeacoffee.com/meap

필수 조건 (커스텀 노드):

ComfyUI Manager를 사용해 다음 커스텀 노드 중 하나를 설치하거나, Git을 사용해 직접 클론할 수 있습니다:

  1. ReActor Node for ComfyUI: https://github.com/Gourieff/comfyui-reactor-node

  2. Facerestore CF (Code Former): https://github.com/mav-rik/facerestore_cf


설치 가이드 (각각의 GitHub 페이지에서 제공됨):

ReActor:

  1. ComfyUI\custom_nodes 디렉터리로 이동하세요.

  2. 콘솔을 열고 다음 명령을 실행하세요:

git clone https://github.com/Gourieff/comfyui-reactor-node

  1. install.bat를 실행하세요.

  2. ComfyUI를 실행하고 메뉴의 "image/postprocessing" 아래 또는 검색 기능을 통해 ReActor 노드를 찾으세요.

Facerestore CF:

  • 이 노드를 ComfyUI/custom_nodes 폴더에 Git으로 클론하세요:

  • cd ComfyUI/custom_nodes

  • git clone https://github.com/mav-rik/facerestore_cf.git

  • ComfyUI의 휴대용 Windows 버전을 사용 중이라면 embedded_install.bat를 실행하세요. 휴대용 버전이 아닌 Windows 사용자는 install.bat를 실행할 수 있습니다. Linux 및 macOS 사용자는 install.sh를 실행하세요. 설치가 실패할 경우, "cv2 not found" 오류를 해결하기 위해 수동으로 opencv-python을 설치해야 합니다.

얼굴 복원 모델

이 모델들은 얼굴 복원을 수행합니다. automatic1111을 사용 중이라면 이미 이 모델을 가지고 있을 수 있지만, 그렇지 않다면 아래 다운로드 링크를 사용하세요. 모델을 models/facerestore_models/ 폴더에 넣으세요.

https://github.com/TencentARC/GFPGAN/releases/ https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/GFPGANv1.4.pth

https://github.com/sczhou/CodeFormer/releases/ https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth

얼굴 검출 모델

얼굴 복원 모델은 잘라낸 얼굴 이미み만 작동합니다. 얼굴 검출 모델은 각 얼굴을 잘라내어 얼굴 복원 모델에 전달하는 데 사용됩니다. 처음 사용할 때 자동으로 다운로드되어 models/facedetection 폴더에 저장됩니다. 직접 다운로드하고 싶다면 아래 링크를 사용하세요.

https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_mobilenet0.25_Final.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5l-face.pth https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5n-face.pth

이 파일도 facedetection 폴더에 다운로드됩니다. 복원된 얼굴을 원본 이미지에 다시 삽입하는 데 사용됩니다. https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth

이 모델로 만든 이미지

이미지를 찾을 수 없습니다.