728x90
Comfyui의 ReActor를 사용해서 Face swap해보기
Window를 사용했음
기본적인 Comfyui 설치 및 사용법은 아래 블로그를 참고하자.
https://www.internetmap.kr/entry/Stable-Diffusion-via-ComfyUI
1. Comfyui를 설치한 후 Comfyui 폴더의 custom_nodes 폴더 안에서 cmd 창 실행
cmd 창을 실행 시킨 다음 아래 깃허브에서 clone하자.
git clone https://github.com/Gourieff/comfyui-reactor-node.git
https://github.com/Gourieff/comfyui-reactor-node
2. comfyui-reactor-node 폴더 clone 완료
comfyui-reactor-node 폴더 내에 install.bat 실행
3. insightface 패키지 설치
insightface를 설치하지 않았다면 아래와 같은 오류가 발생함.
그럼 다시 comfyui-reactor-node github로 들어가서 Python 버전에 맞는 패키지를 설치
그럼 insightface-0.7.3-cp311-cp311-win_amd64.whl 파일이 받아짐.
ComfyUI_windows_portable 폴더 내 python_embeded 폴더로 이동해서 커맨드 실행.
그 다음 아래 명령어를 통해 insightface 패키지 설치
python.exe -m pip install "{insightface-0.7.3-cp311-cp311-win_amd64.whl 경로}"
4. Facerestore models 다운
다시 comfyui-reactor-node github으로 가서 faceresotorers models 다운
다운 받은 pth 파일을 ComfyUI > models > facerestore_models 폴더 안에 저장
5. Face swap 해보기
1. ComfyUI 실행 후 ReActor 노드 불러오기
2. Load image 노드 불러오기
2개 불러오기(얼굴용 & 배경용)
- 배경 → input_image
- 적용할 얼굴 → source_image에 연결
Reference
728x90
반응형