Gourieff / comfyui-reactor-node

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

The generated results may occasionally be very blurry #215

Open oHuflying opened 10 months ago

oHuflying commented 10 months ago

First, confirm

What happened?

During use, the face occasionally becomes particularly blurry, and the process is completely random. For the same characters and parameters, only the random number seeds are different. The previous generation may be blurry, but the next generation is normal. This is a picture of the original character: prince-akachi-J1OScm_uHUQ-unsplash This is the image after normal replacement: image image This is a blurry image: image image

Steps to reproduce the problem

I used the ipadapter-faceid and comfyui sdxl model to generate images, and then used reactor to exchange face shapes. Most of the time, the results were clear and accurate, with occasional extremely blurry situations,

Sysinfo

comfyui sdxl model, size:768*1024 win11 3070 and 1080ti, Both GPUs have triggered this issue CUDA: 12.1 Driver: 531.14

Relevant console log

Requested to load SDXL
Loading 1 new model
loading in lowvram mode 3748.043335914612
100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [00:13<00:00,  1.33s/it]
Requested to load AutoencoderKL
Loading 1 new model
[ReActor] 20:56:30 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 20:56:30 - STATUS - Using Hashed Source Face(s) Model...
[ReActor] 20:56:30 - STATUS - Analyzing Target Image...
[ReActor] 20:56:33 - STATUS - Swapping...
[ReActor] 20:56:34 - STATUS - --Done!--
[ReActor] 20:56:34 - STATUS - Restoring with GFPGANv1.4.pth
Prompt executed in 36.46 seconds
Requested to load SDXL
Loading 1 new model
loading in lowvram mode 3748.043335914612
100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [00:13<00:00,  1.37s/it]
Requested to load AutoencoderKL
Loading 1 new model
[ReActor] 20:57:07 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 20:57:08 - STATUS - Using Hashed Source Face(s) Model...
[ReActor] 20:57:08 - STATUS - Analyzing Target Image...
[ReActor] 20:57:10 - STATUS - Swapping...
[ReActor] 20:57:11 - STATUS - --Done!--
[ReActor] 20:57:11 - STATUS - Restoring with GFPGANv1.4.pth
Prompt executed in 36.92 seconds

Additional information

codeformer_weight is 0.5~1.0, model: GFPGANv1.4.pth

Gourieff commented 10 months ago

With GFPGANv1.4.pth model the "codeformer_weight" parameter has no effect (only for Codeformer model) Perhaps you set "face_restore_visibility" too low

oHuflying commented 10 months ago

@Gourieff face_restore_visibility is always 1.0, Except for random numbers, all other parameters are the same, mostly normal, with occasional blurring image

Gourieff commented 2 months ago

This happens because of too large resolution of the input image