Comfyui의 ReActor를 사용해서 Face swap해보기
Window를 사용했음
기본적인 Comfyui 설치 및 사용법은 아래 블로그를 참고하자.
https://www.internetmap.kr/entry/Stable-Diffusion-via-ComfyUI
ComfyUI 설치 및 사용법 기초
이 글을 처음 쓸 때부터 약 6개월 정도 경과된 것 같습니다. 이제는 왠만하면 AUTOMATIC1111 보다 ComfyUI를 사용하는 게 편해졌을 정도로 익숙해졌습니다. ComfyUI가 약간 어렵기는 하지만, 상당한 장점
www.internetmap.kr
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
GitHub - Gourieff/comfyui-reactor-node: Fast and Simple Face Swap Extension Node for ComfyUI
Fast and Simple Face Swap Extension Node for ComfyUI - Gourieff/comfyui-reactor-node
github.com
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
'Study > Stable Diffusion' 카테고리의 다른 글
[ComfyUI] ReActor import failed 오류 해결 (0) | 2024.11.06 |
---|
Comfyui의 ReActor를 사용해서 Face swap해보기
Window를 사용했음
기본적인 Comfyui 설치 및 사용법은 아래 블로그를 참고하자.
https://www.internetmap.kr/entry/Stable-Diffusion-via-ComfyUI
ComfyUI 설치 및 사용법 기초
이 글을 처음 쓸 때부터 약 6개월 정도 경과된 것 같습니다. 이제는 왠만하면 AUTOMATIC1111 보다 ComfyUI를 사용하는 게 편해졌을 정도로 익숙해졌습니다. ComfyUI가 약간 어렵기는 하지만, 상당한 장점
www.internetmap.kr
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
GitHub - Gourieff/comfyui-reactor-node: Fast and Simple Face Swap Extension Node for ComfyUI
Fast and Simple Face Swap Extension Node for ComfyUI - Gourieff/comfyui-reactor-node
github.com
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
'Study > Stable Diffusion' 카테고리의 다른 글
[ComfyUI] ReActor import failed 오류 해결 (0) | 2024.11.06 |
---|