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

[Bug] Face Crop Option #6

Closed
HaGustav opened this issue Mar 2, 2023 · 4 comments
Closed

[Bug] Face Crop Option #6

HaGustav opened this issue Mar 2, 2023 · 4 comments

Comments

@HaGustav
Copy link

HaGustav commented Mar 2, 2023

Hi there,

first of all thank you for your work. I really enjoy figuring out your extension and it seems to work for most of the features.
The only feature that is not working for me is the implementation of your face crop. I get the following message when trying to generate with face crop activated:

Error completing request Arguments: ([...], [], <PIL.Image.Image image mode=RGBA size=348x538 at 0x7FD2FD1132E0>, None, None, None, None, None, None, 35, 0, 4, 0, 1, False, False, 1, 1, 15.5, 1.5, 0.35, 1241424.0, -1.0, 0, 0, 0, False, 512, 512, 0, 0, 32, 0, '', '', '', [], 9, True, True, 'openpose', 'control_openpose-fp16 [9ca67cc5]', 1, None, False, 'Scale to Fit (Inner Fit)', False, False, 512, 64, 64, 0, 1, False, '<ul>\n<li><code>CFG Scale</code> should be 2 or lower.</li>\n</ul>\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, 'None', '<p style="margin-bottom:0.75em">Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8</p>', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, '', '<p style="margin-bottom:0.75em">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>', 64, 0, 2, 1, '', 0, '', 0, '', True, False, False, False, 0, 'testZwei', 'Normal', 1, True, 5, 1, 'None', False, True, 'YuNet', 512, 0.24, 1.5, False, 'Nico Robin', 0.5, 0.1, False, True, 'YuNet', 1024, 0.5, 1.5, False, 'face close up,', True, True, True, 0, 0.1, 1, 'None', False, 0, 2, 512, 512, False, None, 50) {}
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/img2img.py", line 169, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 376, in run
processed = script.run(p, *script_args)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/ebsynth_utility/scripts/custom_script.py", line 851, in run
face_coords = self.detect_face(image, mask_image, face_detection_method, max_crop_size)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/ebsynth_utility/scripts/custom_script.py", line 207, in detect_face
img_array = mask_array * img_array
ValueError: operands could not be broadcast together with shapes (538,348,3) (538,348,4)

Is this a bug or am i doing something wrong?

@s9roll7
Copy link
Owner

s9roll7 commented Mar 2, 2023

Thanks for the report.
It is probably a bug, but let me check just to be sure.
Is the version you are using the latest?

And if you remember by what means you generated the mask, I'd like to know.

@HaGustav
Copy link
Author

HaGustav commented Mar 2, 2023

I was using "Transparent Background" as my Mask.
The version i was using should be the latest one. I downloaded it yesterday here from git.

@s9roll7
Copy link
Owner

s9roll7 commented Mar 2, 2023

Thank you. I found the cause of the bug.
It seems that it was not able to handle videos with 32bit channel (RGBA) information

@s9roll7
Copy link
Owner

s9roll7 commented Mar 2, 2023

Fixed.

@HaGustav HaGustav closed this as completed Mar 2, 2023
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

2 participants