Adetailer Model to Automatically Impaint male and female genitalia
V2 Models should work with anime and realistic models, please give feedback as I don't have any time to test.
The Quality of male and female genitalia suffers if it only takes up a small portion of the image. This model allows you to automatically mask and impaint genitalia using the Adetailer extension.
Usage:
Copy into your "models/adetailer" folder
activate adetailer extension and select the genitalia model
adjust denoising and padding as needed
Works great in combination with my Bettercocks/Tgirl and FAPP Loras, but any other genitalia Lora like Godpussy can be used. However the benefit seems to be bigger for cocks
Limitations:
The old models (penis , pussy, penis+ pussy) were only trained on photorealistic images and won't work well with anime models.
Description
Detect only pussy
FAQ
Comments (30)
Omg I was literally just thinking this morning 'why isn't there an ADetailer for dicks’ and I'm so excited to see this 💪
I use bettercocks all the time n I'm confident you've made the same high quality w this tool. Thanks for the cock magic 🪄
>there will be a version that supports both anime and realistic if there is demand for it
YES PLEASE
demanding would be rude but...
Looks like there is quite some demand, I see what I can do
we need this for SDXL :)
This should work on SDXL too, the problem is that there are no many Loras to render HQ genitalia yet.
@sandro609
@ffjggrtbjibv it works well on SDXL - I'll post a couple examples
THANK YOU
That's what I've been thinking of for a while, detection models for other things not only face/body.
Could this be used in the future to correct things like penis morphing through pants instead of having an unzipped zipper?
After trying this amazing detector model, I have a feedback. It's best to split penis and vagina models. There are few times that it detects armpits as vagina and make corrections as such. :D
Good suggestion. I just added versions for just penis or just pussy
@ffjggrtbjibv Thank you very much! You're amazing in this! Been a fan of yours since Tgirls!
Getting an error related to ultralytics.utils when running this ADetailer model:
WARNING C:\Stuff\AI\SD\stable-diffusion-webui\models\adetailer\genitalia (photoreal penis pussy).pt appears to require 'ultralytics.utils', which is not in ultralytics requirements.AutoInstall will run now for 'ultralytics.utils' but this feature will be removed in the future.Recommend fixes are to train a new model using the latest 'ultralytics' package or to run a command with an official YOLOv8 model, i.e. 'yolo predict model=yolov8n.pt'requirements: Ultralytics requirement "ultralytics.utils" not found, attempting AutoUpdate...WARNING: Ignoring invalid distribution -illow (c:\users\someone\appdata\local\programs\python\python310\lib\site-packages)WARNING: Ignoring invalid distribution -illow (c:\users\someone\appdata\local\programs\python\python310\lib\site-packages)ERROR: Could not find a version that satisfies the requirement ultralytics.utils (from versions: none)ERROR: No matching distribution found for ultralytics.utilsWARNING: Ignoring invalid distribution -illow (c:\users\someone\appdata\local\programs\python\python310\lib\site-packages)WARNING: Ignoring invalid distribution -illow (c:\users\someone\appdata\local\programs\python\python310\lib\site-packages)WARNING: Ignoring invalid distribution -illow (c:\users\someone\appdata\local\programs\python\python310\lib\site-packages)[notice] A new release of pip is available: 23.0 -> 23.2.1[notice] To update, run: python.exe -m pip install --upgrade piprequirements: Command 'pip install --no-cache "ultralytics.utils" ' returned non-zero exit status 1.Error running postprocess_batch: C:\Stuff\AI\SD\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.pyTraceback (most recent call last): File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\ultralytics\nn\tasks.py", line 511, in torch_safe_load return torch.load(file, map_location='cpu'), file # load File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 877, in load return load(openedzipfile, map_location, pickle_module, **pickle_load_args) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1253, in _load result = unpickler.load() File "C:\Users\someone\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1213, in load dispatch[key[0]](self) File "C:\Users\someone\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1529, in load_global klass = self.find_class(module, name) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1246, in find_class return super().find_class(mod_name, name) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\_graveyard\legacy_import_unpickler.py", line 24, in find_class return super().find_class(new_module, name) File "C:\Users\someone\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1580, in find_class import(module, level=0)ModuleNotFoundError: No module named 'ultralytics.utils'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\Stuff\AI\SD\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, *script_args) File "C:\Stuff\AI\SD\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 552, in postprocess_image is_processed |= self._postprocess_image(p, pp, args, n=n) File "C:\Stuff\AI\SD\stable-diffusion-webui\extensions\adetailer\scripts\!adetailer.py", line 490, in postprocessimage pred = predictor(ad_model, pp.image, args.ad_confidence, **kwargs) File "C:\Stuff\AI\SD\stable-diffusion-webui\extensions\adetailer\adetailer\ultralytics.py", line 22, in ultralytics_predict model = YOLO(model_path) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\ultralytics\yolo\engine\model.py", line 107, in init self._load(model, task) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\ultralytics\yolo\engine\model.py", line 156, in _load self.model, self.ckpt = attempt_load_one_weight(weights) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\ultralytics\nn\tasks.py", line 571, in attempt_load_one_weight ckpt, weight = torch_safe_load(weight) # load ckpt File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\ultralytics\nn\tasks.py", line 526, in torch_safe_load return torch.load(file, map_location='cpu'), file # load File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 877, in load return load(openedzipfile, map_location, pickle_module, **pickle_load_args) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1253, in _load result = unpickler.load() File "C:\Users\someone\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1213, in load dispatch[key[0]](self) File "C:\Users\someone\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1529, in load_global klass = self.find_class(module, name) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1246, in find_class return super().find_class(mod_name, name) File "C:\Stuff\AI\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\_graveyard\legacy_import_unpickler.py", line 24, in find_class return super().find_class(new_module, name) File "C:\Users\someone\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1580, in find_class import(module, level=0)ModuleNotFoundError: No module named 'ultralytics.utils'fresh restart and it will work
Same here, deleting and reinstalling ADetailer worked.
Updating ADetailer to v23.8.0 fixed the error.
TIPS & OBSERVATIONS:
- I found the order of ADetailer is important: imo person > hands > face > genitals works best
- to avoid dick fingers, I turned the ADetailer detection to 0.5 and 0.6 sometimes, especially when there's heavy contrast in the image
- like the other ADetailer models, this one is susceptible to whatever else is in ur prompt while generating. This ADetailer works wonderfully on it's own HOWEVER cleaning the prompt down to just the modifiers, applicable Lora and genital related prompt inside the ADetailer window really makes a difference.
Fr tho: phenomenal work. 12/10.
Can you share an example of your ADetailer prompt/settings? I use it a lot for faces and it works great with default settings and focused prompt, but it's making the genitalia look worse with "<lyco:tgirls_V4:1>penis, testicles" as the ADetailer prompt.
What does the 'person' adetailer do & how does it work?
@bomber055 I'm sorry I missed this message, here's an example of an ADetailer prompt:
Normal prompt: Dynamic angle, (Anime), (swimming underwater in coral reef, happy facial expression, redneck 35yo adult man:1.2), belly hairy chest Bara, erect penis scrotum, visible butt between thighs, calves barefoot arms pubic hair, (bubbles:1.2) stubble, (micro-air bubbles:1.3),(full body shot:1.2), vibrant colors, <lora:GoodHands-vanilla:1>, <lora:epiNoiseoffset_v2:1>, <lora:add_detail:1>,
ADetailer prompt: (Anime), erect penis scrotum pubic hair, vibrant colors, <lora:GoodHands-vanilla:1>, <lora:epiNoiseoffset_v2:1>, <lora:add_detail:1>,
You need to put the quality modifiers, style modifiers and any applicable LoRA in the ADetailer for the best results without inapplicable parts of the prompt. In the example given, I've gotten bubbles in the foreskin before lol
The reason this matters is ADetailer will zoom in on the area by upscaling it then inpaint with less context. This means you can get elements of the prompt you don't want interfering with your freshly detailed penis.
@thechinesetiger235
The person model on ADetailer is supposed to denoise then inpaint individual bodies/limbs of each person one by one. It's useful - when it works - to improve overall cohesion for human figure, especially if you've got ppl next to each other.
If you are interested, here's a fantastic guide on the core ADetailer features on a terrible website. The whole site is very informative just poorly designed imo.
Can you hint to a tutorial on how to train ADetailer models?
@biscuithead Thank you!
I had this idea a couple months ago, but didn't know who could make it. Thank you!! Also, I would love to have an anime/2D version.
Works great to correct pussy in lowres gen! love it!
Additional adetailer models are a great try as I don't know of any others. It can be used for animation, but I would like to have a dedicated correspondence. Especially in anime, nipples can't be drawn beautifully, so I think it would be nice to have a "nipples model".
Nipple model is available here https://civitai.com/models/135658/nipple-adetailer-model
@ffjggrtbjibv You are so awesome! Thank you!
