vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.51k stars 401 forks source link

[Issue]: Adetail not work even enabled #2879

Closed adsads77 closed 5 months ago

adsads77 commented 7 months ago

Issue Description

I installed the latestet version of Adetail, but it did not work even it's enabled

Version Platform Description

version: 24.1.2

Relevant log output

Error running postprocess_batch: D:\Program Files\sd-webui-aki-v4\extensions\adetailer\scripts\!adetailer.py
Traceback (most recent call last):
  File "D:\Program Files\sd-webui-aki-v4\modules\scripts.py", line 462, in postprocess_image
    script.postprocess_image(p, pp, *script_args)
  File "D:\Program Files\sd-webui-aki-v4\extensions\adetailer\adetailer\traceback.py", line 159, in wrapper
    raise error from None
AttributeError:
┌─────────────────────────────────────────────────────────────────────────┐
│                               System info                               │
│ ┌─────────────┬───────────────────────────────────────────────────────┐ │
│ │             │ Value                                                 │ │
│ ├─────────────┼───────────────────────────────────────────────────────┤ │
│ │    Platform │ Windows-10-10.0.22621-SP0                             │ │
│ │      Python │ 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023,          │ │
│ │             │ 00:38:17) [MSC v.1929 64 bit (AMD64)]                 │ │
│ │     Version │ Unknown (too old or vladmandic)                       │ │
│ │      Commit │ Unknown                                               │ │
│ │ Commandline │ ['D:\\Program Files\\sd-webui-aki-v4\\launch.py',     │ │
│ │             │ '--theme', 'dark', '--xformers', '--api',             │ │
│ │             │ '--autolaunch']                                       │ │
│ │   Libraries │ {'torch': '2.0.0+cu118', 'torchvision':               │ │
│ │             │ '0.15.1+cu118', 'ultralytics': '8.1.15', 'mediapipe': │ │
│ │             │ '0.10.9'}                                             │ │
│ └─────────────┴───────────────────────────────────────────────────────┘ │
│ └─────────────┴───────────────────────────────────────────────────────┘ │
│                                 Inputs                                  │
│ ┌─────────────────┬───────────────────────────────────────────────────┐ │
│ │                 │ Value                                             │ │
│ ├─────────────────┼───────────────────────────────────────────────────┤ │
│ │          prompt │ Frontal photography,Look front,evening,dark       │ │
│ │                 │ clouds,the setting sun,On the city rooftop,A 20   │ │
│ │                 │ year old female,Black top,Black Leggings,black    │ │
│ │                 │ hair,long hair, dark theme, muted tones, pastel   │ │
│ │                 │ colors, high contrast, (natural skin texture, A   │ │
│ │                 │ dim light, high clarity) ((sky                    │ │
│ │                 │ background))((Facial highlights))                 │ │
│ │ negative_prompt │ easynegative,(worst quality:2),(low               │ │
│ │                 │ quality:2),(normal quality:2),lowres,bad          │ │
│ │                 │ anatomy,bad hands,normal                          │ │
│ │                 │ quality,((monochrome)),((grayscale)),((watermark… │ │
│ │          n_iter │ 1                                                 │ │
│ │      batch_size │ 1                                                 │ │
│ │           width │ 512                                               │ │
│ │          height │ 512                                               │ │
│ │    sampler_name │ Euler a                                           │ │
│ │       enable_hr │ False                                             │ │
│ │     hr_upscaler │ Latent                                            │ │
│ │      checkpoint │ LEOSAM's MoonFilm _                               │ │
│ │                 │ 胶片风真实感大模型_2.0.safetensors                │ │
│ │             vae │ None                                              │ │
│ │            unet │ ------                                            │ │
│ └─────────────────┴───────────────────────────────────────────────────┘ │
│                   ADetailer                                             │
│ ┌─────────────────────┬─────────────────────┐                           │
│ │                     │ Value               │                           │
│ ├─────────────────────┼─────────────────────┤                           │
│ │             version │ 24.1.2              │                           │
│ │            ad_model │ mediapipe_face_full │                           │
│ │           ad_prompt │ detailed face       │                           │
│ │  ad_negative_prompt │                     │                           │
│ │ ad_controlnet_model │ None                │                           │
│ │              is_api │ False               │                           │
│ └─────────────────────┴─────────────────────┘                           │
│ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │
│ │ D:\Program                                                          │ │
│ │ Files\sd-webui-aki-v4\extensions\adetailer\adetailer\traceback.py:1 │ │
│ │ 39 in wrapper                                                       │ │
│ │                                                                     │ │
│ │   138 │   │   try:                                                  │ │
│ │ > 139 │   │   │   return func(*args, **kwargs)                      │ │
│ │   140 │   │   except Exception as e:                                │ │
│ │                                                                     │ │
│ │ D:\Program                                                          │ │
│ │ Files\sd-webui-aki-v4\extensions\adetailer\scripts\!adetailer.py:75 │ │
│ │ 5 in postprocess_image                                              │ │
│ │                                                                     │ │
│ │    754 │   │                                                        │ │
│ │ >  755 │   │   if self.need_call_postprocess(p):                    │ │
│ │    756 │   │   │   dummy = Processed(p, [], p.seed, "")             │ │
│ │                                                                     │ │
│ │ D:\Program                                                          │ │
│ │ Files\sd-webui-aki-v4\extensions\adetailer\scripts\!adetailer.py:62 │ │
│ │ 1 in need_call_postprocess                                          │ │
│ │                                                                     │ │
│ │    620 │   │   │   return False                                     │ │
│ │ >  621 │   │   return p.batch_index == 0                            │ │
│ │    622                                                              │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ AttributeError: 'StableDiffusionProcessingTxt2Img' object has no        │
│ attribute 'batch_index'                                                 │
└─────────────────────────────────────────────────────────────────────────┘

Backend

Original

Branch

Master

Model

SD 1.5

Acknowledgements

vladmandic commented 7 months ago

i cannot reproduce, please document entire workflow step by step.

adsads77 commented 7 months ago

i cannot reproduce, please document entire workflow step by step.

1.After installing Adetailer, I chose text2images and enabled Adetailer.

  1. Then I started generating an image once with all settings of Adetailer default, but Adetailer didn't work. From the image generated and progress bar, it can be seen that SD didn't redrawn. And the console did not report any errors. 3.Then I tried generated an image again, and Adetailer still didn't work, but I found the errors above appeared on the console this time. 4.Then, whether I change to a different ADetailer model or adjust other parameters, Adetailer still didn't work.
vladmandic commented 6 months ago

no matter what i do, i cannot reproduce this issue.

YangYT1234567 commented 6 months ago

一样的问题

YangYT1234567 commented 6 months ago

Adetail 也不起作用

vladmandic commented 6 months ago

english only pls.

YangYT1234567 commented 6 months ago

Hi boss:

  1. When Adetail is turned on, the drawing time becomes longer;
  2. Reinstall, version V24.3.1, txt2img-images and img2img-images have no face and hand repairs, the red box area is displayed, and the face and hands in the picture are not repaired;
  3. The console reports error information;
YangYT1234567 commented 6 months ago

** Error running postprocess_image: D:\sd-webui-aki-v4.4\extensions\adetailer\scripts!adetailer.py Traceback (most recent call last): File "D:\sd-webui-aki-v4.4\modules\scripts.py", line 856, in postprocess_image script.postprocess_image(p, pp, script_args) File "D:\sd-webui-aki-v4.4\extensions\adetailer\adetailer\traceback.py", line 159, in wrapper raise error from None ModuleNotFoundError: ┌─────────────────────────────────────────────────────────────────────────┐ │ System info │ │ ┌─────────────┬───────────────────────────────────────────────────────┐ │ │ │ │ Value │ │ │ ├─────────────┼───────────────────────────────────────────────────────┤ │ │ │ Platform │ Windows-10-10.0.22621-SP0 │ │ │ │ Python │ 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, │ │ │ │ │ 00:38:17) [MSC v.1929 64 bit (AMD64)] │ │ │ │ Version │ v1.8.0 │ │ │ │ Commit │ bef51aed032c0aaa5cfd80445bc4cf0d85b408b5 │ │ │ │ Commandline │ ['D:\sd-webui-aki-v4.4\launch.py', '--theme', │ │ │ │ │ 'light', '--xformers', '--opt-channelslast', '--api', │ │ │ │ │ '--autolaunch'] │ │ │ │ Libraries │ {'torch': '2.0.1+cu118', 'torchvision': │ │ │ │ │ '0.15.2+cu118', 'ultralytics': 'Unknown', │ │ │ │ │ 'mediapipe': '0.10.9'} │ │ │ └─────────────┴───────────────────────────────────────────────────────┘ │ │ Inputs │ │ ┌─────────────────┬───────────────────────────────────────────────────┐ │ │ │ │ Value │ │ │ ├─────────────────┼───────────────────────────────────────────────────┤ │ │ │ prompt │ oil paintings, │ │ │ │ │ style of john singer sargent, │ │ │ │ │ a girl, │ │ │ │ │ ,<lora:xl_more_art-… │ │ │ │ negative_prompt │ CGI,Unreal,Airbrushed,Digital, │ │ │ │ n_iter │ 1 │ │ │ │ batch_size │ 1 │ │ │ │ width │ 512 │ │ │ │ height │ 912 │ │ │ │ sampler_name │ DPM++ 2M Karras │ │ │ │ enable_hr │ False │ │ │ │ hr_upscaler │ Latent │ │ │ │ checkpoint │ SD XL\sd_xl_base_1.0_0.9vae.safetensors │ │ │ │ vae │ sdxl_vae.safetensors │ │ │ │ unet │ Automatic │ │ │ └─────────────────┴───────────────────────────────────────────────────┘ │ │ ADetailer

YangYT1234567 commented 6 months ago
                                 │
│ ┌─────────────────────┬─────────────────┐                               │
│ │                     │ Value           │                               │
│ ├─────────────────────┼─────────────────┤                               │
│ │             version │ 24.3.1          │                               │
│ │            ad_model │ face_yolov8n.pt │                               │
│ │           ad_prompt │                 │                               │
│ │  ad_negative_prompt │                 │                               │
│ │ ad_controlnet_model │ None            │                               │
│ │              is_api │ False           │                               │
│ └─────────────────────┴─────────────────┘                               │
│ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │
│ │ D:\sd-webui-aki-v4.4\extensions\adetailer\adetailer\traceback.py:13 │ │
│ │ 9 in wrapper                                                        │ │
│ │                                                                     │ │
│ │   138 │   │   try:                                                  │ │
│ │ > 139 │   │   │   return func(*args, **kwargs)                      │ │
│ │   140 │   │   except Exception as e:                                │ │
│ │                                                                     │ │
│ │ D:\sd-webui-aki-v4.4\extensions\adetailer\scripts\!adetailer.py:788 │ │
│ │ in postprocess_image                                                │ │
│ │                                                                     │ │
│ │    787 │   │   │   │   │   continue                                 │ │
│ │ >  788 │   │   │   │   is_processed |= self._postprocess_image_inne │ │
│ │    789                                                              │ │
│ │                                                                     │ │
│ │ D:\sd-webui-aki-v4.4\extensions\adetailer\scripts\!adetailer.py:711 │ │
│ │ in _postprocess_image_inner                                         │ │
│ │                                                                     │ │
│ │    710 │   │   with change_torch_load():                            │ │
│ │ >  711 │   │   │   pred = predictor(ad_model, pp.image, args.ad_con │ │
│ │    712                                                              │ │
│ │                                                                     │ │
│ │ D:\sd-webui-aki-v4.4\extensions\adetailer\adetailer\ultralytics.py: │ │
│ │ 25 in ultralytics_predict                                           │ │
│ │                                                                     │ │
│ │   24 ) -> PredictOutput:                                            │ │
│ │ > 25 │   from ultralytics import YOLO                               │ │
│ │   26                                                                │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ ModuleNotFoundError: No module named 'ultralytics'        
YangYT1234567 commented 6 months ago

Installing the webui-forge version, ADetailer has no effect

YangYT1234567 commented 6 months ago

The picture on the left shows the retouching effect when ADetailer was running normally; In the picture on the right, currently ADetailer cannot edit the picture; 11

YangYT1234567 commented 6 months ago

adsads77 Hello, has the problem been solved?

YangYT1234567 commented 6 months ago

Other users also reported the same problem https://github.com/Bing-su/adetailer/issues/212

vladmandic commented 6 months ago

@YangYT1234567 your issue is not related to what this issue was created for. ultralytics is internal dependency by adetailer and on your system its not getting installed. if adetailer requires it, adetailer should install it - so either install it manually or report to adetailer.

YangYT1234567 commented 6 months ago

@YangYT1234567 your issue is not related to what this issue was created for. ultralytics is internal dependency by adetailer and on your system its not getting installed. if adetailer requires it, adetailer should install it - so either install it manually or report to adetailer.

Thank you very much

essi2 commented 5 months ago

Post text removed - Issue resolved and also unrelated

vladmandic commented 5 months ago

@essi2 i cannot reproduce. also, even if problem does exist its not related to issue that is handled here - please create a separate issue and document it fully.

vladmandic commented 5 months ago

closing the issue for now since there are no updates from original creator of the issue for 5 weeks - if further information is provided, issue can be reopened.