Bing-su / adetailer

Auto detecting, masking and inpainting with detection model.
GNU Affero General Public License v3.0
4.15k stars 317 forks source link

[Bug]: ValueError: [-] ADetailer: Model 'nipple.pt' not found. Available │ │ models: ['face_yolov8n.pt' #332

Closed waaaok closed 11 months ago

waaaok commented 1 year ago

Describe the bug

I updated to the latest version, I couldn't use the plug-in anymore

Screenshots

image

Console logs, from start to end.

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c

Launching Web UI with arguments: --theme dark --xformers --autolaunch
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 23.9.2, num models: 9
2023-09-20 01:21:57,472 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: F:\sd-webui-aki-v4.4\extensions\sd-webui-controlnet\annotator\downloads
2023-09-20 01:21:57,807 - ControlNet - INFO - ControlNet v1.1.410
Loading weights [2aab7b4296] from F:\sd-webui-aki-v4.4\models\Stable-diffusion\Chilloutmix-Ni-pruned-fp16-fix.safetensors
Creating model from config: F:\sd-webui-aki-v4.4\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
*Deforum ControlNet support: enabled*
Loading VAE weights specified in settings: F:\sd-webui-aki-v4.4\models\VAE\animevae.pt
Applying attention optimization: xformers... done.
Model loaded in 7.0s (load weights from disk: 1.3s, create model: 0.9s, apply weights to model: 0.9s, apply half(): 1.1s, load VAE: 1.5s, move model to device: 1.1s, calculate empty prompt: 0.2s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 41.4s (launcher: 6.8s, import torch: 10.8s, import gradio: 2.0s, setup paths: 1.2s, other imports: 1.8s, setup codeformer: 0.1s, load scripts: 10.9s, create ui: 4.9s, gradio launch: 2.8s).
=========================================================================================
A tensor with all NaNs was produced in VAE.
Web UI will now convert VAE into 32-bit float and retry.
To disable this behavior, disable the 'Automaticlly revert VAE to 32-bit floats' setting.
To always start with 32-bit VAE, use --no-half-vae commandline flag.
=========================================================================================

0: 640x448 1 face, 197.2ms
Speed: 3.0ms preprocess, 197.2ms inference, 18.9ms postprocess per image at shape (1, 3, 640, 448)
*** Error running postprocess_image: F:\sd-webui-aki-v4.4\extensions\adetailer\scripts\!adetailer.py
    Traceback (most recent call last):
      File "F:\sd-webui-aki-v4.4\modules\scripts.py", line 575, in postprocess_image
        script.postprocess_image(p, pp, *script_args)
      File "F:\sd-webui-aki-v4.4\extensions\adetailer\adetailer\traceback.py", line 159, in wrapper
        raise error from None
    ValueError: 
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
    ┌─────────────────────────────────────────────────────────────────────────┐
    │                               System info                               │
    │ ┌─────────────┬───────────────────────────────────────────────────────┐ │
    │ │             │ Value                                                 │ │
    │ ├─────────────┼───────────────────────────────────────────────────────┤ │
    │ │    Platform │ Windows-10-10.0.19041-SP0                             │ │
    │ │      Python │ 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023,          │ │
    │ │             │ 00:38:17) [MSC v.1929 64 bit (AMD64)]                 │ │
    │ │     Version │ v1.5.2                                                │ │
    │ │      Commit │ c9c8485bc1e8720aba70f029d25cba1c4abf2b5c              │ │
    │ │ Commandline │ ['F:\\sd-webui-aki-v4.4\\launch.py', '--theme',       │ │
    │ │             │ 'dark', '--xformers', '--autolaunch']                 │ │
    │ │   Libraries │ {'torch': '2.0.1+cu118', 'torchvision':               │ │
    │ │             │ '0.15.2+cu118', 'ultralytics': '8.0.181',             │ │
    │ │             │ 'mediapipe': '0.10.5'}                                │ │
    │ └─────────────┴───────────────────────────────────────────────────────┘ │
    │                                 Inputs                                  │
    │ ┌─────────────────┬───────────────────────────────────────────────────┐ │
    │ │                 │ Value                                             │ │
    │ ├─────────────────┼───────────────────────────────────────────────────┤ │
    │ │          prompt │ (8k, RAW photo, best quality, masterpiece:1.2),   │ │
    │ │                 │ 1girl,portrait,                                   │ │
    │ │ negative_prompt │ easynegative,(worst quality:2), (low quality:2),  │ │
    │ │                 │ (nsfw:1.5),  monochrome,  ugly,  badhandv4,       │ │
    │ │                 │ ng_deepnegative_v1_75t                            │ │
    │ │          n_iter │ 1                                                 │ │
    │ │      batch_size │ 1                                                 │ │
    │ │           width │ 512                                               │ │
    │ │          height │ 768                                               │ │
    │ │    sampler_name │ DPM++ SDE Karras                                  │ │
    │ │       enable_hr │ False                                             │ │
    │ │     hr_upscaler │ Latent                                            │ │
    │ │      checkpoint │ Chilloutmix-Ni-pruned-fp16-fix.safetensors        │ │
    │ │                 │ [2aab7b4296]                                      │ │
    │ │             vae │ animevae.pt                                       │ │
    │ │            unet │ Automatic                                         │ │
    │ └─────────────────┴───────────────────────────────────────────────────┘ │
    │                 ADetailer                                               │
    │ ┌─────────────────────┬─────────────────┐                               │
    │ │                     │ Value           │                               │
    │ ├─────────────────────┼─────────────────┤                               │
    │ │             version │ 23.9.2          │                               │
    │ │            ad_model │ face_yolov8s.pt │                               │
    │ │           ad_prompt │ smile           │                               │
    │ │  ad_negative_prompt │                 │                               │
    │ │ ad_controlnet_model │ None            │                               │
    │ │              is_api │ False           │                               │
    │ └─────────────────────┴─────────────────┘                               │
    │ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │
    │ │ F:\sd-webui-aki-v4.4\extensions\adetailer\adetailer\traceback.py:13 │ │
    │ │ 9 in wrapper                                                        │ │
    │ │                                                                     │ │
    │ │   136 │   │   width = width - 4 if width > 4 else None              │ │
    │ │   137 │   │   console = Console(file=string, width=width)           │ │
    │ │   138 │   │   try:                                                  │ │
    │ │ > 139 │   │   │   return func(*args, **kwargs)                      │ │
    │ │   140 │   │   except Exception as e:                                │ │
    │ │   141 │   │   │   tables = [                                        │ │
    │ │   142 │   │   │   │   get_table(title, data)                        │ │
    │ │                                                                     │ │
    │ │ F:\sd-webui-aki-v4.4\extensions\adetailer\scripts\!adetailer.py:656 │ │
    │ │ in postprocess_image                                                │ │
    │ │                                                                     │ │
    │ │   653 │   │   │   for n, args in enumerate(arg_list):               │ │
    │ │   654 │   │   │   │   if args.ad_model == "None":                   │ │
    │ │   655 │   │   │   │   │   continue                                  │ │
    │ │ > 656 │   │   │   │   is_processed |= self._postprocess_image_inner │ │
    │ │   657 │   │                                                         │ │
    │ │   658 │   │   if is_processed:                                      │ │
    │ │   659 │   │   │   self.save_image(                                  │ │
    │ │                                                                     │ │
    │ │ F:\sd-webui-aki-v4.4\extensions\adetailer\scripts\!adetailer.py:575 │ │
    │ │ in _postprocess_image_inner                                         │ │
    │ │                                                                     │ │
    │ │   572 │   │   │   ad_model = args.ad_model                          │ │
    │ │   573 │   │   else:                                                 │ │
    │ │   574 │   │   │   predictor = ultralytics_predict                   │ │
    │ │ > 575 │   │   │   ad_model = self.get_ad_model(args.ad_model)       │ │
    │ │   576 │   │   │   kwargs["device"] = self.ultralytics_device        │ │
    │ │   577 │   │                                                         │ │
    │ │   578 │   │   with change_torch_load():                             │ │
    │ │                                                                     │ │
    │ │ F:\sd-webui-aki-v4.4\extensions\adetailer\scripts\!adetailer.py:475 │ │
    │ │ in get_ad_model                                                     │ │
    │ │                                                                     │ │
    │ │   472 │   def get_ad_model(self, name: str):                        │ │
    │ │   473 │   │   if name not in model_mapping:                         │ │
    │ │   474 │   │   │   msg = f"[-] ADetailer: Model {name!r} not found.  │ │
    │ │ > 475 │   │   │   raise ValueError(msg)                             │ │
    │ │   476 │   │   return model_mapping[name]                            │ │
    │ │   477 │                                                             │ │
    │ │   478 │   def sort_bboxes(self, pred: PredictOutput) -> PredictOutp │ │
    │ └─────────────────────────────────────────────────────────────────────┘ │
    │ ValueError: [-] ADetailer: Model 'nipple.pt' not found. Available       │
    │ models: ['face_yolov8n.pt', 'face_yolov8s.pt', 'hand_yolov8n.pt',       │
    │ 'person_yolov8n-seg.pt', 'person_yolov8s-seg.pt',                       │
    │ 'mediapipe_face_full', 'mediapipe_face_short', 'mediapipe_face_mesh',   │
    │ 'mediapipe_face_mesh_eyes_only']                                        │
    └─────────────────────────────────────────────────────────────────────────┘

---

List of installed extensions

image

wsyxyxyx commented 1 year ago

兄弟你解决了吗?我也是这个问题face_yolov8n和faceyolov8s都用不了 Brother, have you solved it? I also have this problem face Yolov8n and face_ Yolov8s can't even be used WARNING Unable to automatically guess model task, assuming 'task=detect'. Explicitly define task for your model, i.e. 'task=detect', 'segment', 'classify', or 'pose'. * Error running postprocess_image: D:\AI\sd-webui-aki-v4.4\extensions\adetailer\scripts!adetailer.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4.4\modules\scripts.py", line 675, in postprocess_image script.postprocess_image(p, pp, script_args) File "D:\AI\sd-webui-aki-v4.4\extensions\adetailer\adetailer\traceback.py", line 159, in wrapper raise error from None TypeError: 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。 ┌─────────────────────────────────────────────────────────────────────────┐ │ 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.6.0 │ │ │ │ Commit │ 5ef669de080814067961f28357256e8fe27544f4 │ │ │ │ Commandline │ ['D:\AI\sd-webui-aki-v4.4\launch.py', │ │ │ │ │ '--medvram-sdxl', '--theme', 'dark', '--xformers', │ │ │ │ │ '--api', '--autolaunch'] │ │ │ │ Libraries │ {'torch': '2.0.1+cu118', 'torchvision': │ │ │ │ │ '0.15.2+cu118', 'ultralytics': '8.0.187', │ │ │ │ │ 'mediapipe': '0.10.5'} │ │ │ └─────────────┴───────────────────────────────────────────────────────┘ │ │ Inputs │ │ ┌─────────────────┬────────────────────────────────────────────┐ │ │ │ │ Value │ │ │ ├─────────────────┼────────────────────────────────────────────┤ │ │ │ prompt │ 1girl, │ │ │ │ negative_prompt │ │ │ │ │ n_iter │ 1 │ │ │ │ batch_size │ 1 │ │ │ │ width │ 512 │ │ │ │ height │ 512 │ │ │ │ sampler_name │ DPM++ 2M Karras │ │ │ │ enable_hr │ False │ │ │ │ hr_upscaler │ Latent │ │ │ │ checkpoint │ anything-v5-PrtRE.safetensors [7f96a1a9ca] │ │ │ │ vae │ vae-ft-mse-840000-ema-pruned.safetensors │ │ │ │ unet │ Automatic │ │ │ └─────────────────┴────────────────────────────────────────────┘ │ │ ADetailer │ │ ┌─────────────────────┬─────────────────┐ │ │ │ │ Value │ │ │ ├─────────────────────┼─────────────────┤ │ │ │ version │ 23.9.3 │ │ │ │ ad_model │ face_yolov8n.pt │ │ │ │ ad_prompt │ │ │ │ │ ad_negative_prompt │ │ │ │ │ ad_controlnet_model │ None │ │ │ │ is_api │ False │ │ │ └─────────────────────┴─────────────────┘ │ │ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │ │ │ D:\AI\sd-webui-aki-v4.4\extensions\adetailer\adetailer\traceback.py │ │ │ │ :139 in wrapper │ │ │ │ │ │ │ │ 136 │ │ width = width - 4 if width > 4 else None │ │ │ │ 137 │ │ console = Console(file=string, width=width) │ │ │ │ 138 │ │ try: │ │ │ │ > 139 │ │ │ return func(args, kwargs) │ │ │ │ 140 │ │ except Exception as e: │ │ │ │ 141 │ │ │ tables = [ │ │ │ │ 142 │ │ │ │ get_table(title, data) │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\extensions\adetailer\scripts!adetailer.py: │ │ │ │ 656 in postprocess_image │ │ │ │ │ │ │ │ 653 │ │ │ for n, args in enumerate(arg_list): │ │ │ │ 654 │ │ │ │ if args.ad_model == "None": │ │ │ │ 655 │ │ │ │ │ continue │ │ │ │ > 656 │ │ │ │ is_processed |= self._postprocess_image_inner │ │ │ │ 657 │ │ │ │ │ │ 658 │ │ if is_processed: │ │ │ │ 659 │ │ │ self.save_image( │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\extensions\adetailer\scripts!adetailer.py: │ │ │ │ 579 in _postprocess_image_inner │ │ │ │ │ │ │ │ 576 │ │ │ kwargs["device"] = self.ultralytics_device │ │ │ │ 577 │ │ │ │ │ │ 578 │ │ with change_torch_load(): │ │ │ │ > 579 │ │ │ pred = predictor(ad_model, pp.image, args.ad_conf │ │ │ │ 580 │ │ │ │ │ │ 581 │ │ masks = self.pred_preprocessing(pred, args) │ │ │ │ 582 │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\extensions\adetailer\adetailer\ultralytics. │ │ │ │ py:22 in ultralytics_predict │ │ │ │ │ │ │ │ 19 │ from ultralytics import YOLO │ │ │ │ 20 │ │ │ │ │ 21 │ model = YOLO(model_path) │ │ │ │ > 22 │ pred = model(image, conf=confidence, device=device) │ │ │ │ 23 │ │ │ │ │ 24 │ bboxes = pred[0].boxes.xyxy.cpu().numpy() │ │ │ │ 25 │ if bboxes.size == 0: │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\python\lib\site-packages\ultralytics\engine │ │ │ │ \model.py:96 in call │ │ │ │ │ │ │ │ 93 │ │ │ │ │ 94 │ def call(self, source=None, stream=False, kwargs): │ │ │ │ 95 │ │ """Calls the 'predict' function with given arguments │ │ │ │ > 96 │ │ return self.predict(source, stream, kwargs) │ │ │ │ 97 │ │ │ │ │ 98 │ @staticmethod │ │ │ │ 99 │ def is_hub_model(model): │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\python\lib\site-packages\ultralytics\engine │ │ │ │ \model.py:229 in predict │ │ │ │ │ │ │ │ 226 │ │ │ │ │ │ 227 │ │ if not self.predictor: │ │ │ │ 228 │ │ │ self.predictor = (predictor or self._smart_load(' │ │ │ │ > 229 │ │ │ self.predictor.setup_model(model=self.model, verb │ │ │ │ 230 │ │ else: # only update args if predictor is already set │ │ │ │ 231 │ │ │ self.predictor.args = get_cfg(self.predictor.args │ │ │ │ 232 │ │ │ if 'project' in args or 'name' in args: │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\python\lib\site-packages\ultralytics\engine │ │ │ │ \predictor.py:305 in setup_model │ │ │ │ │ │ │ │ 302 │ │ │ │ │ 303 │ def setup_model(self, model, verbose=True): │ │ │ │ 304 │ │ """Initialize YOLO model with given parameters and se │ │ │ │ > 305 │ │ self.model = AutoBackend(model or self.args.model, │ │ │ │ 306 │ │ │ │ │ │ │ │ device=select_device(self.ar │ │ │ │ 307 │ │ │ │ │ │ │ │ dnn=self.args.dnn, │ │ │ │ 308 │ │ │ │ │ │ │ │ data=self.args.data, │ │ │ │ │ │ │ │ D:\AI\sd-webui-aki-v4.4\python\lib\site-packages\ultralytics\nn\aut │ │ │ │ obackend.py:285 in init │ │ │ │ │ │ │ │ 282 │ │ │ raise NotImplementedError('Triton Inference Serve │ │ │ │ 283 │ │ else: │ │ │ │ 284 │ │ │ from ultralytics.engine.exporter import export_fo │ │ │ │ > 285 │ │ │ raise TypeError(f"model='{w}' is not a supported │ │ │ │ 286 │ │ │ │ │ │ │ 'See https://docs.ultralytics.com │ │ │ │ 287 │ │ │ │ │ │ │ f'\n\n{export_formats()}') │ │ │ │ 288 │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ TypeError: │ │ model='D:\AI\sd-webui-aki-v4.4.cache\sdwebuilauncher\hfmirror\blob\30e │ │ 7adcf03c1e250ffce66a9ff5324358c311f02a093f93f5424d650803ce077' is not a │ │ supported model format. See https://docs.ultralytics.com/modes/predict │ │ for help. │ │ │ │ Format Argument Suffix CPU GPU │ │ 0 PyTorch - .pt True True │ │ 1 TorchScript torchscript .torchscript True True │ │ 2 ONNX onnx .onnx True True │ │ 3 OpenVINO openvino _openvino_model True False │ │ 4 TensorRT engine .engine False True │ │ 5 CoreML coreml .mlpackage True False │ │ 6 TensorFlow SavedModel saved_model _saved_model True True │ │ 7 TensorFlow GraphDef pb .pb True True │ │ 8 TensorFlow Lite tflite .tflite True False │ │ 9 TensorFlow Edge TPU edgetpu _edgetpu.tflite True False │ │ 10 TensorFlow.js tfjs _web_model True False │ │ 11 PaddlePaddle paddle _paddle_model True True │ │ 12 ncnn ncnn _ncnn_model True True │ └─────────────────────────────────────────────────────────────────────────┘