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

when using grey img with human'face,it doesn't work #705

Open
dosudo opened this issue Oct 4, 2024 · 0 comments
Open

when using grey img with human'face,it doesn't work #705

dosudo opened this issue Oct 4, 2024 · 0 comments

Comments

@dosudo
Copy link

dosudo commented Oct 4, 2024

the wrong information:File "/home/ubuntu/anaconda3/envs/env1/lib/python3.12/site-packages/facexlib/utils/face_restoration_helper.py", line 354, in paste_faces_to_input_image
upsample_img = inv_soft_mask * pasted_face + (1 - inv_soft_mask) * upsample_img
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
ValueError: operands could not be broadcast together with shapes (1404,2000,1) (1404,2000)

Because when using grey img with human's face, it run the coding block of if and that block can't change the grey img to three dimension.

the solution is move the line 346 and line 347 out of the coding block of else.

@dosudo dosudo changed the title use grey ing when using grey img with human'face,it doesn't work Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant