Gourieff / comfyui-reactor-node

Fast and Simple Face Swap Extension Node for ComfyUI
GNU General Public License v3.0
1.63k stars 163 forks source link

Face Restore (GFPGANv1.4.pth) is not effective for some images #424

Open QunBB opened 2 months ago

QunBB commented 2 months ago

First, confirm

What happened?

As the following figure, you could see the two output faces are both blurry. One is with face_restore_model, another is not. It looks like the face restore is not effective.

image

Steps to reproduce the problem

image

Sysinfo

Ubuntu 24.04.1 LTS Chrome browser NVIDIA GeForce RTX 4090 torch 2.4.0+cu124

Relevant console log

got prompt
[ReActor] 11:55:49 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 11:55:49 - STATUS - Analyzing Source Image...
[ReActor] 11:55:50 - STATUS - Analyzing Target Image...
[ReActor] 11:55:50 - STATUS - Swapping...
[ReActor] 11:55:50 - STATUS - --Done!--
[ReActor] 11:55:50 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 11:55:50 - STATUS - Using Hashed Source Face(s) Model...
[ReActor] 11:55:50 - STATUS - Using Hashed Target Face(s) Model...
[ReActor] 11:55:50 - STATUS - Swapping...
[ReActor] 11:55:50 - STATUS - --Done!--
[ReActor] 11:55:50 - STATUS - Restoring with GFPGANv1.4.pth | Face Size is set to 512
Warning torch.load doesn't support weights_only on this pytorch version, loading unsafely.
Prompt executed in 1.64 seconds

Additional information

No response

darebgd commented 1 month ago

Defo a bug. Give that girl the same haircut and there you have it! P.S. Try with fully formed faces, maybe it will work better 🤣 It's face swap, not head swap 😮‍💨