adetailer
adetailer copied to clipboard
Feature Request: Only modify target at index N
There is currently a huge downside for adetailer, and that is we cannot use it on images with multiple subjects. For example if we have 5 people in an image, adetailer face will modify all subjects.
If we can have an option to only target subject at index N (of the list of detected targets), this will greatly enhance the usability of adetailer. For example if our image has a man and a woman, we can limit 1st tab to index 0 and inpaint a man, and limit 2nd tab to index 1 to inpaint the woman.
I'll try, but I don't think I'll be able to control it as intended.
How about this: https://github.com/Bing-su/adetailer/wiki/Advanced
Thanks! This will solve most use cases and is a very big upgrade. The only unfortunate case is that we're still not able to "skip" one of the targets even with the blank option.
hi a did it for version at 26.05.2023 you need change thats files in that version
- open !adetailer.py in editor
- find-> for j in range(steps):
- add after this string -> if j != args.ad_instance_num: continue
- open args.py in editor
- find-> ad_negative_prompt: str = ""
- add after this string-> ad_instance_num: int = 0
- find-> ppop = partial(self.ppop, p)
- add after-> ppop("ADetailer instance num")
- find-> ("ad_negative_prompt", "ADetailer negative prompt"),
- add after-> ("ad_instance_num", "ADetailer instance num"),
- open ui.py in editor
- find-> elem_id=eid("ad_conf"), )
- add after-> w.ad_instance_num = gr.Slider( label="Detection instance number" + suffix(n), minimum=0, maximum=6, step=1, value=0, visible=True, elem_id=eid("ad_instance_num"), ) formatting indents are important to keep After this and restart bat you see in UI under Detection spoiler new slider named "Detection instance number" counter of order starts from 0(0 - work with fist only instanse and etc.). Impotant save original files for packed proccessing multimask in the future.
also set in settings Sort bounding boxes by Position(left-to-right) And need to undestand when you deleting person or face from original picture using early tabs, in next tabs order of masks changes because in every next tabs list of masks detecting from start
Thanks! This will solve most use cases and is a very big upgrade. The only unfortunate case is that we're still not able to "skip" one of the targets even with the blank option.
You can actually now SKIP, see https://github.com/Bing-su/adetailer/wiki/Advanced. And if you changethe order in the Settings to be from big to small area, more or less you can figure out the order in which the faces will be changed. And then you can prompt for each individual one in a wildcard, or skip those that you want to skip.