Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blurred face #496

Open
3 tasks done
lubovski opened this issue Nov 26, 2024 · 4 comments
Open
3 tasks done

Blurred face #496

lubovski opened this issue Nov 26, 2024 · 4 comments

Comments

@lubovski
Copy link

First, confirm

  • I have read the instruction carefully
  • I have searched the existing issues
  • I have updated the extension to the latest version

What happened?

Almost all my attempts at face replacement lead to blurry results. I tried different faces, different detection and restoration models - the result is the same. This problem is also reproduced on the Tensor Art site, so I rule out a problem with my equipment.
Screenshot_1

Steps to reproduce the problem

Image generation - face replacement

Sysinfo

Windows 10, Firefox, RTX 3070

Relevant console log

Loading 1 new model
loaded completely 0.0 159.55708122253418 True
[ReActor] 02:32:48 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 02:32:48 - STATUS - Analyzing Source Image...
[ReActor] 02:32:50 - STATUS - Trying to halve 'det_size' parameter
[ReActor] 02:32:51 - STATUS - Analyzing Target Image...
[ReActor] 02:32:53 - STATUS - Swapping...
[ReActor] 02:33:01 - STATUS - --Done!--
[ReActor] 02:33:01 - 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.
        Starting restore_face with codeformer_fidelity: 0.1

0: 640x448 1 face, 145.7ms
Speed: 4.0ms preprocess, 145.7ms inference, 55.3ms postprocess per image at shape (1, 3, 640, 448)
Prompt executed in 53.53 seconds

Additional information

No response

@lubovski lubovski added bug Something isn't working new labels Nov 26, 2024
@Gourieff
Copy link
Owner

Show your workflow please and provide your input and the source images as well
If a face in the input image is too large dimension - the restoration model won't restore it

@Gourieff Gourieff removed the new label Nov 27, 2024
@lubovski
Copy link
Author

Show your workflow please and provide your input and the source images as well If a face in the input image is too large dimension - the restoration model won't restore it

I used different faces - big and small. Here is an example of a photo of a face, the total resolution is 726x402, and the face in the photo takes up a small part.

1
2
Face
WF.json

@Gourieff
Copy link
Owner

Gourieff commented Nov 27, 2024

You probably do smth wrong, you don't need to crop the face before swap or to restore it after with additional restorers
Just open any of the images below in your Comfy to load the WF, it's rather simple to swap even with large pictures
And you should use good quality source images as well
Swapped to C.D.:
+ComfyUI_temp_vyrhc_00040_
Swapped to M.B.:
+ComfyUI_temp_vyrhc_00038_

@Gourieff Gourieff added 💬 discussion and removed bug Something isn't working labels Nov 27, 2024
@lubovski
Copy link
Author

Yes, your workflow really works. I will try to figure out what is the problem in my workflow. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants