-
Notifications
You must be signed in to change notification settings - Fork 105
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
ERROR - Failed to swap face in postprocess method : apply_overlay() takes 3 positional arguments but 4 were given #178
Comments
I've been messing with the settings since it popped up on me yesterday. |
Massive failure, everyone is waiting for a solution. There is a malfunction in i2i. If you uncheck:
But in a separate FaceSwapLab tab on the main panel, it works fine, but it's inconvenient. |
The error has to do with the updated processing.py modules in a1111. In your faceswaplab's extension folder, find imgutils.py inside /faceswaplab_utils/ folder go to line 224 or where it says: change it to: See if it helps. If anybody has another solution, please share |
This solution did not help. It gave an error and turned off the faceswaplab module. |
Same. Get this error text
Worth a shot though |
antorio's solution works for me. |
Many thanks @antorio! |
i2i works now with that @antorio! Text2image is broke now but I'll survive without it. I don't think I used it much anyways. Here's that error code if you wanted to see it regardless
|
Hello,
Facing this issue also in txt2img, hope there will be a fix soon. Thanks |
Thank you all! Took me forever to find this fix but glad it was posted. Hope T2I is fixed soon! |
@jet3004 look this issue 171 with the code below it fixed faceswaplab in both txt2img and img2img
|
FWIW, I came here with the same problem - first time user. Then found Reactor does exactly what I need and works. It's available as a direct install from the A1111 extensions menu. |
IMO, in context of face similarity with source images, Reactor doesn't render nearly as good as faceswaplab. |
@antorio @ncandelier, @jet3004, The return value of Therefore, we need to make the following changes: if p.overlay_images and batch_index < len(p.overlay_images):
selected_overlay = p.overlay_images[batch_index]
img, _ = processing.apply_overlay(img, p.paste_to, selected_overlay)
# ^
# this
else:
logger.debug("No overlay selected or overlay list is empty.")
return img Now img2img(inpaint) and txt2img is work.
return image
return image, original_denoised_image
|
Thank you - this worked for me. |
3Q |
Edited code as per fix here: glucauze/sd-webui-faceswaplab#178 Issue with code due to update in auto1111, extension not updated as archived. Code not identical to fix in issue linked, some manual work done, to ffully test.
hi , i have this error .. using latest A1111 v1.9 i already change code from antorio . still not fix edit : ok working now , i forget to follow python code format . |
Getting this error when doing a basic faceswap: Not sure if there was an update to SD or a1111 but this same action worked a couple days ago.
2024-03-02 11:56:33,232 - FaceSwapLab - INFO - blend all faces together
2024-03-02 11:56:33,267 - FaceSwapLab - INFO - loading face Max.safetensors
2024-03-02 11:56:33,267 - FaceSwapLab - INFO - Int Gender : 0
2024-03-02 11:56:33,267 - FaceSwapLab - INFO - Process face 0
2024-03-02 11:56:33,275 - FaceSwapLab - INFO - Source Gender 0
2024-03-02 11:56:33,275 - FaceSwapLab - INFO - Target faces count : 1
2024-03-02 11:56:33,275 - FaceSwapLab - INFO - swap face 0
2024-03-02 11:56:34,283 - FaceSwapLab - INFO - ********************************************************************************
2024-03-02 11:56:34,323 - FaceSwapLab - INFO - Inswapper
2024-03-02 11:56:34,323 - FaceSwapLab - INFO - ********************************************************************************
2024-03-02 11:56:34,403 - FaceSwapLab - INFO - Finished processing image, return 1 images
2024-03-02 11:56:34,403 - FaceSwapLab - INFO - 1 images swapped
2024-03-02 11:56:34,403 - FaceSwapLab - ERROR - Failed to swap face in postprocess method : apply_overlay() takes 3 positional arguments but 4 were given
Traceback (most recent call last):
File "C:\a1111\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab.py", line 201, in postprocess
swp_img = imgutils.apply_mask(swp_img, p, batch_index)
File "C:\a1111\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_utils\imgutils.py", line 224, in apply_mask
img = processing.apply_overlay(img, p.paste_to, batch_index, p.overlay_images)
TypeError: apply_overlay() takes 3 positional arguments but 4 were given
The text was updated successfully, but these errors were encountered: