-
Notifications
You must be signed in to change notification settings - Fork 303
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]: ADetailer: img2img inpainting detected. adetailer disabled. #455
Comments
I was wondering if it's a bug or an intended feature. The latest commit makes it seem intended but I'm unsure why you'd want to disable in inpaint. I've fixed it by going to Edit !detailer.py Save and restart SD. |
Yes. I just saw it in the latest changelog. Very strange to arbitrarily limit such a great feature. Anway, the fix worked. Thanks for the quick help! |
After I tried to change it, the ADetailer was completely gone from the page. |
Thank you Etroto!! It works. |
can we please revisit whether this is intended behavior or actually a bug? for me it doesn't really make sense to deactivate adetailer for inpainting either. by the way, not only inpainting is affected by this change, but generally everything that has to do with img2img. if you want to upscale via img2img, for example, adetailer also no longer works. and tbh manually changing values in *.py files isn't exactly a good long term solution to fix this. imo this issue shouldn't be marked als closed and complete @Bing-su any thoughts on this? |
Perhaps I jumped the gun when closing this issue. Should I reopen it? |
It's working fine for me, but how are you guys doing this? This is to prevent a bug with nested inpaints that was often reported in the past. 0: 640x448 1 face, 5.0ms
Speed: 1.0ms preprocess, 5.0ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 448)
100%|████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:01<00:00, 7.61it/s]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 9/9 [00:06<00:00, 1.43it/s]
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 5.84it/s]
Total progress: 0%| | 0/1 [00:00<?, ?it/s]
0: 640x512 1 face, 84.7ms
Speed: 2.7ms preprocess, 84.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512)
100%|████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:01<00:00, 7.30it/s]
0: 640x512 1 face, 6.5ms
Speed: 1.0ms preprocess, 6.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512)
100%|████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:01<00:00, 7.59it/s]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 1/1 [00:05<00:00, 5.67s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 6.24it/s]
Total progress: 0%| | 0/1 [00:00<?, ?it/s]
0: 640x512 1 face, 79.6ms
Speed: 3.5ms preprocess, 79.6ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512)
100%|████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:01<00:00, 5.54it/s]
0: 640x512 1 face, 5.2ms
Speed: 2.6ms preprocess, 5.2ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 512)
100%|████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:01<00:00, 7.64it/s]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 1/1 [00:06<00:00, 6.05s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 1/1 [00:06<00:00, 6.05s/it] |
I'm also experiencing this issue, and I'm simply going from txt2img to img2img by clicking the "Send image and generation parameters to img2img tab." button underneath the original image. EDIT: adding this note to say that @etreto's temporary solution also worked for me. |
Somehow, there is no return for true or false.
|
What do you mean exactly? @staticmethod
def is_img2img_inpaint(p) -> bool:
return hasattr(p, "image_mask") and bool(p.image_mask) to this: @staticmethod
def is_img2img_inpaint(p) -> bool:
return False Or if you want to preserve the original line in case you want to revert (for whatever reason), you can comment it and add your new line below it, like this: @staticmethod
def is_img2img_inpaint(p) -> bool:
# return hasattr(p, "image_mask") and bool(p.image_mask)
return False |
Okay, that's something different. I thought there was a true that has to be changed to a false. I'll try that, thanks. 👍 |
I'm also seeing this issue. I upscaled an image 2x and then sent that upscaled image to img2img to upscale again. I wanted to touch up the face using adetailer but I keep seeing this message in the console at the start of the generation:
|
Will this be addressed, or manual code change gonna be necessary all the time? |
I have the same issue on v1.7.0
|
As @etreto suggested, edit the section in !adetailer.py file (follow this path to find it: \stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py) from
to
|
Thanks! It worked. |
Is this bug ever going to be addressed?! It happens on standard img2img not just inpainting tab. |
Seems like it's not a bug, but a feature. |
How can it be a feature if it occurs even when there is no inpainting? It specifically says "inpainting detected adetailer disabled." |
Hmm, this is strange. Just tested it and it doesn't happen in normal img2img for me. |
I think the problem is 'inpaint is detected' if there's an image loaded into the inpaint tab, regardless of whether that tab is being used or not. I'm not 100% sure yet because I've altered the script as people above are doing to ignore it, and I'll be generating all day today, so I can't test it myself until I change the script back then restart SD. |
Aight, you did the best thing (modifying the script). |
Changing the script just makes the message disappear. ADetailer does its job, but the result is not embedded. I get just the original. I have the suspicion that ADetailer should not work for this way for copyright reasons, because one could manipulate any photo in a lifelike way, while all other face-swap methods (currently) still deliver poor results and are almost always recognizable as manipulation. |
Then you must've done something wrong, as for me adetailer does work after changing this line. As for the reasoning, ReActor and other tools offer much better and reliable options for face swapping, while adetailer is not only not exclusive to face adjustments, but also works on fundamentally different principle. |
Adetailer is not a faceswap. It's just inpainting. You could do exactly what it's doing by inpainting with your own mask. Having it auto detect a face, mask, and inpaint on-the-fly, is the convenience Adetailer offers, but at the end of the day it just an inpaint, which has no 'copyright protection'. |
Just got the newest commit today and this is the biggest issue for me. Adetailer is disabling itself when merely upscaling in img2img. Why? I now have to run img2img again after upscaling with 'Skip img2img' checked. This takes 10x longer than just letting adetailer run during the upscale. If this is a feature and not a bug, it's a bad one. The author should consider changing it. |
For me same problem, Adetailer deactivates itself even after modifying "!adetailer.py" and restarting the web.ui: I have version 24.1.2. Wouldn't there be a more stable version? Or would reinstalling Adetailer not solve the problem?... |
arghh this is really annoying. All i want is adetailer to tidy up folders of images. |
I don't think that reinstalling would do anything, since the "inpainting detected, adetailer disabled" is specifically implemented into all versions post v23.11.1. I rolled back to v23.11.1 for that reason. |
Adetailer seems to work in I2I if Ultimate Upscale is not enabled ... BUT the generation takes a really long time, i closed the console at about 10mins on my 3090. |
Thank you! |
Tried this and also return Flase, adetailer still wont work in inpainting. Any other methods? How do I roll back previous version? |
Edit: See in comment below for much easier method by @akmesb . |
Why so complicated? Stable-diffusion-webui does all this completely automatically at next startup anyway. |
Oh, so you simply put the folder in the extensions directory and it will work? Super easy then! |
Well I tried the fix and had no luck. Rolling back also did nothing in the end. This change has really made a chore of my workflow. |
Why is this a thing? Lmao. |
Fixed img2img inpainting cannot be used with the message: "img2img inpainting detected. adetailer disabled" Based on: Bing-su#455
Damn, still no fix? But yeah changing those values to |
It starts the ADetailer process but once it's finished, it gets discarded. |
why ADetailer is working with SD15 in inpaint but SDXL dont ? |
Installing the older version of Adetailer worked for me |
Wait wha? |
For me, installing the latest version resulted in this error ADetailer: img2img inpainting detected. adetailer disabled So, i shifted to the older version. Removed the latest version and installed the older version from the extensions tab, using the URL mentioned above. Thereafter, in the installed tab, i didn't click "check for updates" and clicked "Apply and Restart UI" |
I thought that didn't work for someone else. Kinda sad that you have to downgrade... |
Yep, but its still better than getting an error. |
@Bing-su Could you revert this change, please? |
I wouldnt use that link. Looks suspect |
Can't this problem be fixed? |
The restriction on this issue has been relaxed since version 24.3.1. |
Describe the bug
Hi,
I just updated Adetailer to the latest version, now it won't allow me to run in inpaint mode.
I made sure that the "Skip img2img" checkbox is unchecked, and I don't see any options in Settings that allow me to turn it back on.
It just prompts this error message:
ADetailer: img2img inpainting detected. adetailer disabled.
How do I resolve this?
Screenshots
No response
Console logs, from start to end.
List of installed extensions
No response
The text was updated successfully, but these errors were encountered: