Code Monkey home page Code Monkey logo

adetailer's People

Contributors

bing-su avatar catboxanon avatar danamir avatar huchenlei avatar judahgazit avatar jwrush avatar ljleb avatar nakadun avatar natans8 avatar pre-commit-ci[bot] avatar szriru avatar whiteskar avatar wkpark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adetailer's Issues

Feature request Multiple passes

awesome extension :) thank you.

Would be great to be able to do multiple passes, and choose which model each pass is utilizing.

Could probably do this by just duplicating the extension, and picking different models for each instance of the extension, but would be nicer to have built in

When using alwayson_scripts controlnet and After Detailer together, the API does not return the ControlNet processed image

When using alwayson_scripts controlnet and After Detailer together, the API does not return the ControlNet processed image. The final image returns, however the canny/depth/pose reference image is not returned.

EDIT: I might have answered my own question, I see additional settings in the A1111 Settings:

  • ad_save_previews
  • ad_save_images_before

I'll see if these change the expected behavior.

EDIT 2: Nope, unfortunately the API still only returns the final image.

Any way to use this for background?

This extension is amazing. I think the only thing left would be a way to do just background. The main prompt can be the main subjects, then adetailer for face, hands and hopefully background in the future for really smooth workflow.

question

there is an error when i install it,i want to know how to do with it :
Error loading script: !adetailer.py
Traceback (most recent call last):
File "/root/autodl-tmp/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/root/autodl-tmp/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/autodl-tmp/stable-diffusion-webui/extensions/adetailer-main/scripts/!adetailer.py", line 15, in
from adetailer import (
File "/root/autodl-tmp/stable-diffusion-webui/extensions/adetailer-main/adetailer/init.py", line 5, in
from .ultralytics import ultralytics_predict
File "/root/autodl-tmp/stable-diffusion-webui/extensions/adetailer-main/adetailer/ultralytics.py", line 59, in
def mask_to_pil(masks, shape: tuple[int, int]) -> list[Image.Image]:
TypeError: 'type' object is not subscriptable

ํ•ญ์ƒ enable ์ด ์ฒดํฌ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.

ํ•ญ์ƒ enable ์ด ์ฒดํฌ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค๋ฅธ ์ต์Šคํ…์…˜๋“ค์€ ์‚ฌ์šฉํ• ๋•Œ ์ผœ์•ผ ํ•˜๋Š”๋ฐ

ad ๋Š” ์‚ฌ์šฉ์•ˆํ• ๋•Œ ๊บผ์•ผ ํ•˜๋Š”๋ฐ... ์˜๋„๋œ ๊ฑด๊ฐ€์š”?

์˜ˆ์ „์ด๋ผ๋ฉด ํ•ญ์ƒ ์ผœ์ ธ์žˆ์–ด๋„ ๋ชจ๋ธ์ด None ์œผ๋กœ ๋˜์–ด์žˆ์–ด ์ ์šฉ์ด ์•ˆ๋˜์—ˆ๋Š”๋ฐ

๋””ํดํŠธ๋ฅผ ๋”์œผ๋กœ ํ•˜๋ฉด ์–ด๋–จ๊นŒ์š”

Request help!!!

When I choose to use "hand_yolov8n.pt", the following result appears:

031455
PS: All parameters in [adetailer] are using default values, I don't know where this error comes from...๐Ÿ˜ฃ

์—…๋ฐ์ดํŠธ ํ›„ ํ˜น์‹œ ARGS ๋ฐ”๋€ ๋ถ€๋ถ„์ด ์žˆ๋‚˜์š”? ๊ธฐ์กด ๋ฐฉ์‹์œผ๋กœ API ํ˜ธ์ถœํ•˜๋ฉด ๋˜ ์—๋Ÿฌ๊ฐ€ ๋‚˜์„œ ๋กค๋ฐฑ ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

์—…๋ฐ์ดํŠธ ํ›„ ํ˜น์‹œ ARGS ๋ฐ”๋€ ๋ถ€๋ถ„์ด ์žˆ๋‚˜์š”? ๊ธฐ์กด ๋ฐฉ์‹์œผ๋กœ API ํ˜ธ์ถœํ•˜๋ฉด ๋˜ ์—๋Ÿฌ๊ฐ€ ๋‚˜์„œ ๋กค๋ฐฑ ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

ํ˜„์žฌ API ๋กœ ํ˜ธ์ถœํ•˜๋Š” ํŒŒ๋ผ๋ฉ”ํ„ฐ๋Š” ์ด๋ ‡์Šต๋‹ˆ๋‹ค.

  alwayson_scripts = {
    "After Detailer":
      {
        "args": [
          true,
          args[1]["ad_model"],
          args[1]["ad_prompt"],
          args[1]["ad_negative_prompt"],
          args[1]["ad_conf"].to_i,
          args[1]["ad_dilate_erode"].to_i,
          args[1]["ad_x_offset"].to_i,
          args[1]["ad_y_offset"].to_i,
          args[1]["ad_mask_blur"].to_i,
          args[1]["ad_denoising_strength"].to_f,
          args[1]["ad_inpaint_full_res"],
          args[1]["ad_inpaint_full_res_padding"].to_i,
          args[1]["ad_use_inpaint_width_height"],
          args[1]["ad_inpaint_width"].to_i,
          args[1]["ad_inpaint_height"].to_i,
          args[1]["ad_cfg_scale"].to_f,
          "None",
          1,
        ]
      }
  }
  
  8c525a3c ์ปค๋ฐ‹์—์„œ๋Š” ์ •์ƒ๋™์ž‘ ํ•ฉ๋‹ˆ๋‹ค. ํ˜น์‹œ ์ถ”๊ฐ€๋œ ๋ถ€๋ถ„์ด ์žˆ์œผ๋ฉด ๊ท€๋œธํ•ด์ฃผ์‹œ๋ฉด ์ˆ˜์ •ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

์—๋Ÿฌ ๋ฉ”์„ธ์ง€ ์ฒจ๋ถ€ ํ•ฉ๋‹ˆ๋‹ค.

May 10 14:38:34 rubyon.co.kr sh[100987]: Error running process: /home/ai/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py
May 10 14:38:34 rubyon.co.kr sh[100987]: Traceback (most recent call last):
May 10 14:38:34 rubyon.co.kr sh[100987]: File "/home/ai/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py", line 346, in get_args
May 10 14:38:34 rubyon.co.kr sh[100987]: inp = get_one_args(enabled, *args)
May 10 14:38:34 rubyon.co.kr sh[100987]: File "/home/ai/stable-diffusion-webui/extensions/adetailer/adetailer/args.py", line 117, in get_one_args
May 10 14:38:34 rubyon.co.kr sh[100987]: return ADetailerArgs(**arg_dict)
May 10 14:38:34 rubyon.co.kr sh[100987]: File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
May 10 14:38:34 rubyon.co.kr sh[100987]: pydantic.error_wrappers.ValidationError: 2 validation errors for ADetailerArgs
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_use_cfg_scale
May 10 14:38:34 rubyon.co.kr sh[100987]: value could not be parsed to a boolean (type=type_error.bool)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_cfg_scale
May 10 14:38:34 rubyon.co.kr sh[100987]: value is not a valid float (type=type_error.float)
May 10 14:38:34 rubyon.co.kr sh[100987]: The above exception was the direct cause of the following exception:
May 10 14:38:34 rubyon.co.kr sh[100987]: Traceback (most recent call last):
May 10 14:38:34 rubyon.co.kr sh[100987]: File "/home/ai/stable-diffusion-webui/modules/scripts.py", line 417, in process
May 10 14:38:34 rubyon.co.kr sh[100987]: script.process(p, *script_args)
May 10 14:38:34 rubyon.co.kr sh[100987]: File "/home/ai/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py", line 558, in process
May 10 14:38:34 rubyon.co.kr sh[100987]: arg_list = self.get_args(*args_)
May 10 14:38:34 rubyon.co.kr sh[100987]: File "/home/ai/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py", line 355, in get_args
May 10 14:38:34 rubyon.co.kr sh[100987]: raise ValueError("\n".join(message)) from e
May 10 14:38:34 rubyon.co.kr sh[100987]: ValueError: [-] ADetailer: ValidationError when validating 1st arguments: 2 validation errors for ADetailerArgs
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_use_cfg_scale
May 10 14:38:34 rubyon.co.kr sh[100987]: value could not be parsed to a boolean (type=type_error.bool)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_cfg_scale
May 10 14:38:34 rubyon.co.kr sh[100987]: value is not a valid float (type=type_error.float)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_model: 'face_yolov8s.pt' (<class 'str'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_prompt: '' (<class 'str'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_negative_prompt: '' (<class 'str'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_conf: 30 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_dilate_erode: 32 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_x_offset: 0 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_y_offset: 0 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_mask_blur: 4 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_denoising_strength: 0.4 (<class 'float'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_inpaint_full_res: True (<class 'bool'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_inpaint_full_res_padding: 0 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_use_inpaint_width_height: False (<class 'bool'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_inpaint_width: 512 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_inpaint_height: 512 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_use_cfg_scale: 7.0 (<class 'float'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_cfg_scale: 'None' (<class 'str'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_controlnet_model: 1 (<class 'int'>)
May 10 14:38:34 rubyon.co.kr sh[100987]: ad_controlnet_weight: 1.0 (<class 'float'>)

Error loading script: !adetailer.py with

Error loading script: !adetailer.py Traceback (most recent call last): File "/home/*/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/home/*/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 848, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/j*/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py", line 17, in <module> from adetailer import ( File "/home/*/stable-diffusion-webui/extensions/adetailer/adetailer/__init__.py", line 2, in <module> from .args import AD_ENABLE, ALL_ARGS, ADetailerArgs, enable_check File "/home/*/stable-diffusion-webui/extensions/adetailer/adetailer/args.py", line 23, in <module> class ArgsList(UserList): File "/home/*/stable-diffusion-webui/extensions/adetailer/adetailer/args.py", line 25, in ArgsList def attrs(self) -> tuple[str]: TypeError: 'type' object is not subscriptable
i have the latest AUTOMATIC1111/stable-diffusion-webui
The latest adetailer a0cd6f1 (Sat May 13 06:23:56 2023)
Linux Mint OS

Yolo doesn't work

Yolo dosn't work, but i can use mediapipe.
Progress stops at 98%, and the progress in the interface just freezes.
image
image

I also have ultralytics

image

But then again, mediapipe works as it should - it runs at the end of generation and improves the picture.
Whats wrong?

Noticed openpose and Adetailer don't work together for faces

When I use openpose and Adetailer inpaints the face, I notice I try to use openpose's full frame, instead of just the face portion.
Resulting in the faces regularly having tiny bodies inside.
Because it is using the full scale openpose model, instead of it's face portion.

Love this extension, hopefully it's something that can be fixed in the future.

Thanks for creating and sharing it!

Preview disabled during adetailer pass.

I have previews enabled, showing progress for every step (0).
But during the adetailer pass at the end of regular generation, previews are completely frozen until the very last step.

I'm using the current commit (d95d82c) with the current (5ab7f213) version of sd-webui (torch2, xformers 0.0.17, video card is a 1070 and running ubuntu 22.10).

There are no errors in stdout and everything else functions properly.

After update may/12, "images dont match"

Error running postprocess_batch: F:\AI\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py00:00<?, ?it/s]
Traceback (most recent call last):
File "F:\AI\stable-diffusion-webui\modules\scripts.py", line 463, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "F:\AI\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py", line 615, in postprocess_image
is_processed |= self._postprocess_image(p, pp, args, n=n)
File "F:\AI\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py", line 586, in _postprocess_image
processed = process_images(p2)
File "F:\AI\stable-diffusion-webui\modules\processing.py", line 526, in process_images
res = process_images_inner(p)
File "F:\AI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
File "F:\AI\stable-diffusion-webui\modules\processing.py", line 615, in process_images_inner
p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
File "F:\AI\stable-diffusion-webui\modules\processing.py", line 1065, in init
image_masked.paste(image.convert("RGBA").convert("RGBa"), mask=ImageOps.invert(self.mask_for_overlay.convert('L')))
File "F:\AI\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1731, in paste
self.im.paste(im, box, mask.im)
ValueError: images do not match

any ideas?

question about inpaint only masked

with ddetailer I could send image to inpaint, and press only masked and set width/height to 768/768 for example, and it would inpaint the faces at that resolution, when doing the same with adetailer I get an error, is there a different way to do it with adetailer that I'm missing?

Arguments: ('task(2rp4l4pchnhlx65)', 2, 'absurdres, highres, best quality, 1girl, ', '(worst quality:2), (low quality:2), (normal quality:2), lowres, jpeg artifacts, signature, watermark, username, blurry, artist name, text, error', [], <PIL.Image.Image image mode=RGBA size=1024x1536 at 0x1ADA5407BB0>, None, {'image': <PIL.Image.Image image mode=RGBA size=1024x1536 at 0x1ADA54074F0>, 'mask': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=1024x1536 at 0x1ADA54075B0>}, None, None, None, None, 20, 15, 4, 0, 1, False, False, 1, 1, 7, 1.5, 0.5, -1.0, -1.0, 0, 0, 0, False, 0, 1536, 1024, 1, 0, 1, 32, 0, '', '', '', [], 0, True, 'None', '', '', 30, 32, 0, 0, 4, 0.4, True, 0, True, 528, 1024, 7, 'control_v11p_sd15_inpaint [ebff9138]', 1, False, 'MultiDiffusion', False, 10, 10, 1, 64, False, True, 1024, 1024, 96, 96, 48, 1, 'None', 2, False, False, False, False, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, False, False, True, True, False, 3072, 192, True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7, False, False, True, False, False, 0, 'Gustavosta/MagicPrompt-Stable-Diffusion', '', False, 7, 100, 'Constant', 0, 'Constant', 0, 4, False, False, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', <controlnet.py.UiControlNetUnit object at 0x000001AC28652980>, 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, False, False, False, '1:1,1:2,1:2', '0:0,0:0,0:1', '0.2,0.8,0.8', 20, '<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, 0.5, 'Linear', '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, None, False, 50) {}
Traceback (most recent call last):
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\modules\img2img.py", line 181, in img2img
    processed = process_images(p)
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\modules\processing.py", line 515, in process_images
    res = process_images_inner(p)
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
    return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\modules\processing.py", line 604, in process_images_inner
    p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\modules\processing.py", line 1014, in init
    mask = mask.crop(crop_region)
  File "C:\Users\apyr\Documents\auto1111\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1228, in crop
    raise ValueError(msg)
ValueError: Coordinate 'right' is less than 'left'

[Question] - LORA and TI

Just a question, but does the prompt during the AD pass take into account TI embedding and LORA placeholder texts?

Adetailer preventing SD from reloading or loading (Win11)

I installed the git through A1111's extension tab, click reload, the CMD output hung at "Restarting WebUI". I left it for a few hours before forcing it close.

When running webui-user.bat it hangs at:
warnings.warn(

I deleted the extension folder then ran it again and I'm back to normal. I noticed the next line for me would normally be:
ControlNet v1.1.133

So maybe there's a conflict with ControlNet?

Adetailer hanging on basic attempt

I have the latest version of SD and Adetailer.
I can't get it to run properly.
I restarted the webUI, restarted SD.
I enabled both settings for saving copies of mask and before-Adetailer.

I am using the default settings of SD.
SD Prompt: person (doesn't matter what I choose)
Adetailer prompt: face
Model: 8n (doesn't matter which I choose)
Adetailer enabled, doesn't matter what other settings (I have also tried checking Use Inpaint Width/height).
I get to 95%:
image
In my console I have this (typically the middle bar shows as 95%, same as WebUI image above):
image
When I Ctrl + C to kill it, I get:
Interrupted with signal 2 in <frame at 0x000001FFA0CE89B0, file 'c:\\webui\\webui.py', line 266, code wait_on_server>

something changed with torch2?

After updating to Torch 2, i did a fresh install of SD.... in img2img i use Controlnet Tile + Ultimate SD Upscaler (4xultrasharp)....and aDetailer.
when i turn on ADETAILER, the faces are a garbled mess now.... when i turn it off.... it's working same as it was before the Torch update ....
is there some incompatibility or change that you know of that would cause this?

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.

Adetailer runs even if off

I have another extension, similar to adetailer, however when trying to do comparison runs, disabling adetailer (latest version), its causing issues anyway

Error running postprocess_batch: X:\STABLEDIFFUSION\AUTOMATIC111\extensions\adetailer\scripts!adetailer.py
Traceback (most recent call last):
File "X:\STABLEDIFFUSION\AUTOMATIC111\modules\scripts.py", line 462, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "X:\STABLEDIFFUSION\AUTOMATIC111\extensions\adetailer\scripts!adetailer.py", line 438, in postprocess_image
args = get_args(*args_)
File "X:\STABLEDIFFUSION\AUTOMATIC111\extensions\adetailer\adetailer\args.py", line 73, in get_args
arg_dict = {all_args.attr: args[i] for i, all_args in enumerate(ALL_ARGS)}
File "X:\STABLEDIFFUSION\AUTOMATIC111\extensions\adetailer\adetailer\args.py", line 73, in
arg_dict = {all_args.attr: args[i] for i, all_args in enumerate(ALL_ARGS)}
IndexError: tuple index out of range

This causes automatic to become unresponsive unless closed

Not work when put models in ./models/adetailer

In windows, models are downloaded into C:\Users\Administrator.cache\huggingface\hub\models--Bingsu--adetailer\snapshots\403e56c1b291da2145da824f3fde640bbe08de2f with shotcut to C:\Users\Administrator.cache\huggingface\hub\models--Bingsu--adetailer\blobs
Any way to use ./models/adetailer directly? It is bad network to download files from huggingface

How to use properly?

I have this installed, but I have no idea how to use it properly. Can you explain?

[Question] Parameter description

Hi. Thank you for the very cool extension, it helps just unreal!

But I don't fully understand what each slider is responsible for.
image

Can you please describe each function briefly and for the dumb ones. A couple of words would be enough. Or, even better, release an update where this explanation pops up when you point your cursor?
I don't really understand neural network theory, but I wish I understood what I was poking at. XD
If it's not too much trouble for you, of course.
(Sorry for the bad English)

What should I do to avoid this error?

Error running postprocess_batch: /root/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py
Traceback (most recent call last):
File "/root/stable-diffusion-webui/modules/scripts.py", line 462, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "/root/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py", line 642, in postprocess_image
is_processed |= self._postprocess_image(p, pp, args, n=n)
File "/root/stable-diffusion-webui/extensions/adetailer/scripts/!adetailer.py", line 587, in _postprocess_image
pred = predictor(ad_model, pp.image, args.ad_conf, **kwargs)
File "/root/stable-diffusion-webui/extensions/adetailer/adetailer/ultralytics.py", line 25, in ultralytics_predict
from ultralytics import YOLO
ModuleNotFoundError: No module named 'ultralytics'

ValueError: [-] ADetailer: Model 'face_yolo8s.pt' not found.

I have put face_yolo8s.pt into ./models/adetailer/face_yolov8s.pt, but when i enable adetailer, it said ValueError: [-] ADetailer: Model 'face_yolo8s.pt' not found. Available models: ['face_yolov8n.pt', 'face_yolov8s.pt', 'mediapipe_face_full', 'mediapipe_face_short', 'hand_yolov8n.pt']

closed by restart sdwebui

Unlink width/height when inpaint at full resolution is enabled

Currently, the img2img process always uses the same width/height as the txt2img process:

width=p.width,
height=p.height,

When the Inpaint at full resolution option is enabled, this probably should instead be unlinked and be controllable by the user, as quite often the purpose of using that option in img2img normally is to allow for inpainting at a much higher resolution that differs from the source image, such as 768x768, or even beyond that, as the image gets cropped to the masked area and upscaled, and then denoised. This is especially useful if running this extension with hires fix, as we may want to inpaint at a much higher resolution than what was the resolution pre-hires fix.

adetailer stopped showing in My A1111

Hello, Yesterday everything was working great but today when I started My webui adetailer was gone I updated it but still not showin and I get this error in my terminal window , btw I am on mac system

Error loading script: !adetailer.py

it was really great extension and I don't know what Happened !!??

[Feature Request] Option to save image before applying adetailer

As the title says, would be great to have a setting similar to 'Settings>Image Settings>Save a copy of image before doing face restoration'.

When enabled, it will save a copy before applying the face restoration.
This is good for comparisons, especially in batch processing.
I'm aware of the 'save mask previews' setting, but it would be great to also have an option for it spit out a clean image for comparison.

Thanks!

๋งˆ์ง€๋ง‰ ์ปค๋ฐ‹๋•Œ๋ฌธ์— ํ•ญ์ƒ Adetailer ๊ฐ€ ์ ์šฉ๋˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š” ํ”„๋กฌํ”„์ธ  ์šด์˜์ž ์ž…๋‹ˆ๋‹ค.

๋งˆ์ง€๋ง‰ ์ปค๋ฐ‹์„ ๋ณด๋‹ˆ ๋””ํดํŠธ ๋ชจ๋ธ ๊ฐ’์„ "None" ์—์„œ ๋ชจ๋ธ ๋ฐฐ์—ด ์ฒซ๋ฒˆ์งธ ๊ฒƒ์œผ๋กœ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ์œผ๋กœ ๋ฐ”๊พธ์—ˆ๋Š”๋ฐ

์ด๋กœ์ธํ•ด API ๋ฅผ ์ด์šฉํ•œ ๋ชจ๋“  ์ด๋ฏธ์ง€ ์ƒ์„ฑ์‹œ Adetailer ๊ฐ€ ์ ์šฉ๋˜๋”๋ผ๊ณ ์š”... ๊ทธ๋ž˜์„œ ์ญ‰ ์ง€์ผœ๋ณธ๊ฒฐ๊ณผ...

ใ… ใ… 

Adetailer ์ฒดํฌ๋ฐ•์Šค๋ฅผ ํ•ด์ œ ํ–ˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ๋ฌด์กฐ๊ฑด ์ ์šฉ๋˜๋Š”๊ฑฐ ๊ฐ™์•„ ๋ณด์ž…๋‹ˆ๋‹ค.

๊ธฐ์กด์—๋Š” ๋ฌด์กฐ๊ฑด ์ ์šฉ๋˜๋”๋ผ๋„ ๊ธฐ๋ณธ ๋ชจ๋ธ์ด "None" ์ด์–ด์„œ ๋ฐ”์ดํŒจ์Šค ๋œ๊ฑฐ๊ฐ™์•„ ๋ณด์ž…๋‹ˆ๋‹ค.

ํ˜„์žฌ ๋งˆ์ง€๋ง‰ ์ปค๋ฐ‹์ค‘ ๋””ํดํŠธ ๋ชจ๋ธ ์„ ํƒํ•˜๋Š” ๋ถ€๋ถ„๋งŒ ๊ธ‰ํ•˜๊ฒŒ ์ˆ˜์ •ํ•ด์„œ ์‚ฌ์šฉ์ค‘์ธ๋ฐ ํ™•์ธํ•ด ์ฃผ์…จ์œผ๋ฉด ํ•ด์„œ ๊ธ€ ๋‚จ๊ฒจ๋ด…๋‹ˆ๋‹ค.

Extension failed to run, Pls advice

Receiving the following issue:

Error running postprocess_batch: C:\Users\User\Documents\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py
Traceback (most recent call last):
File "C:\Users\User\Documents\stable-diffusion-webui\modules\scripts.py", line 462, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "C:\Users\User\Documents\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py", line 446, in postprocess_image
i2i = self.get_i2i_p(p, args, pp.image)
File "C:\Users\User\Documents\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py", line 409, in get_i2i_p
self.update_controlnet_args(i2i, args)
File "C:\Users\User\Documents\stable-diffusion-webui\extensions\adetailer\scripts!adetailer.py", line 424, in update_controlnet_args
self.controlnet_ext.update_scripts_args(
File "C:\Users\User\Documents\stable-diffusion-webui\extensions\adetailer\controlnet_ext\controlnet_ext.py", line 67, in update_scripts_args
self._update_scripts_args(p, model, weight)
File "C:\Users\User\Documents\stable-diffusion-webui\extensions\adetailer\controlnet_ext\controlnet_ext.py", line 57, in _update_scripts_args
control_mode=self.external_cn.ControlMode.BALANCED,
AttributeError: module 'extensions.sd-webui-controlnet.scripts.external_code' has no attribute 'ControlMode'

Pls advice!

Does not work with HiRes Fix if not inpainting at full resolution

AD works fine with HiRes fix if "Inpaint at full resolution" is checked.

But if "Inpaint at full resolution" is unchecked, the original low res image (before hi res fix is applied) is returned as final result

AD Preview Img (1024 x 1360)

00070-2632610465-ad-preview

AD Before Img (1024 x 1360)

00071-2632610465-ad-before

Final Img (512 x 680)

00072-2632610465

Adetailer on by default?

Adetailer being on by default now means that I often miss the setting on my initial generation on a webui load. Not always so bad when using txt2img on a low batch count, but not good when using img2img on an image with many people.

I've looked through the ui-config.json for an option to disable by default but cannot find it. This was not an issue when the default model was none.

I would please request restoring adetailer being disabled by default, or add a None model selection so that it isn't triggering when undesired. Additionally, can you add an easily-identifiable (e.g. adetailer.py/XXX2img/Adetailer enabled: true) setting in ui-config.json or point out which one it is currently?

็บข่‰ฒ้ข้ƒจ่ทŸ่ธชๆก†๏ผŒ่ฟ™ไธชๅทฅๅ…ทๅœจๅ“ชๅ„ฟ่ฎพ็ฝฎ๏ผŸ

ไฝฟ็”จๆ–นๆณ•๏ผšๅฎ‰่ฃ…ๅฅฝๆ’ไปถๅฐฑๅ‡บ็ŽฐSEEDไธ‹้ข๏ผŒๅ‹พ้€‰ๅผ€ๅฏ๏ผŒๅนถ้€‰ๆ‹ฉๆจกๅž‹๏ผŒไธ‹้ข่ฟ˜่ฆ้€‰โ€œINPOINTโ€๏ผŒ่ฟ˜ๆœ‰้€‰โ€œCON V11p SD15โ€๏ผˆๆ‰€ๆœ‰ๆจกๅผ้€š็”จ๏ผ‰็บข่‰ฒ้ข้ƒจ่ฟฝ่ธชๆก†๏ผšๅœจSD็š„ๆ€ป่ฎพ็ฝฎ้‡Œ้ขๆ‰พๅˆฐๅฎƒๅ‹พ้€‰ๅผ€ๅฏ๏ผŒ่ฟ™ๆ ท่ƒฝๅœจ็”Ÿๆˆๅ›พ็‰‡็š„ๆ–‡ไปถ้‡Œ้ขๅคน็œ‹ๅˆฐ2ๅผ ็›ธๅŒ็š„ๅ›พ็‰‡๏ผŒๅ…ถไธญ1ๅผ ๆœ‰่„ธ้ƒจ็บขๆก†๏ผŒๅฆๅˆ™็œ‹ไธๅˆฐใ€‚

็บข่‰ฒ้ข้ƒจ่ทŸ่ธชๆก†๏ผŒ่ฟ™ไธชๅทฅๅ…ทๅœจๅ“ชๅ„ฟ่ฎพ็ฝฎ๏ผŸโ€œCON V11p SD15โ€๏ผˆๆ‰€ๆœ‰ๆจกๅผ้€š็”จ๏ผ‰่ฟ™ไธชๅœจๅ“ชๅ„ฟ๏ผŸ

Can not work properly with controlnet

I tried to use this + controlnet openpose to produce batchs of images ,but i found only the first image could be controlled by controlnet model, others were random poses.
I'm using controlnet 1.125 with model sd15_openpose

Request help๐Ÿ˜”

"Thank you very much for your sharing. Could you please provide details on how to use it? I installed the plugin and launched it in T2IMG or IMAG2IMG, but the red facial detection box did not appear on the image. Thank you."

The output only shows the mask

If I checked Hires.fix it produces this result.
I didn't adjust any parameters of this extension, just choose a adetailer model and run it.
I tried other face models and found that only the face_yolov8s.pt can work correctly.

OK,The bad news is that this happens to all models now.๐Ÿ˜‚

23131243520-3956787584-absurdres,extremely detailed CG unity 8k wallpaper,masterpiece,best quality,((extremely detailed CG)), ((8k_wallpaper)), (master

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.