Panchovix / stable-diffusion-webui-reForge

GNU Affero General Public License v3.0
351 stars 17 forks source link

[Bug]: Adetailer new models not working #50

Closed CasanovaSan closed 3 months ago

CasanovaSan commented 3 months ago

Checklist

What happened?

So i installed a custom adetailer model that focuses on faces and it gives me this error

Error running postprocess_image: C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\scripts!adetailer.py Traceback (most recent call last): File "C:\SD\Packages\stable-diffusion-webui-reForge\modules\scripts.py", line 933, in postprocess_image script.postprocess_image(p, pp, script_args) File "C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\aaaaaa\traceback.py", line 173, in wrapper raise error from None ValueError: ┌─────────────────────────────────────────────────────────────────────────┐ │ System info │ │ ┌─────────────┬───────────────────────────────────────────────────────┐ │ │ │ │ Value │ │ │ ├─────────────┼───────────────────────────────────────────────────────┤ │ │ │ Platform │ Windows-10-10.0.22631-SP0 │ │ │ │ Python │ 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, │ │ │ │ │ 00:38:17) [MSC v.1929 64 bit (AMD64)] │ │ │ │ Version │ f0.0.20.1-v1.10.0RC-latest-581-g1d909e5e │ │ │ │ Commit │ 1d909e5e7d3a5153f12df01a3b9a12e12adcb488 │ │ │ │ Commandline │ ['C:\SD\Packages\stable-diffusion-webui-reForge\… │ │ │ │ │ '--gradio-allowed-path', 'C:\SD\Images'] │ │ │ │ Libraries │ {'torch': '2.1.2+cu121', 'torchvision': │ │ │ │ │ '0.16.2+cu121', 'ultralytics': '8.2.62', 'mediapipe': │ │ │ │ │ '0.10.14'} │ │ │ └─────────────┴───────────────────────────────────────────────────────┘ │ │ Inputs │ │ ┌─────────────────┬───────────────────────────────────────────────────┐ │ │ │ │ Value │ │ │ ├─────────────────┼───────────────────────────────────────────────────┤ │ │ │ prompt │ zPDXL2, score_9, score_8_up, score_7_up, │ │ │ │ │ Expressiveh, ultra detailed, one valkyrie in │ │ │ │ │ gorgeous armor is holding a spear in hand, │ │ │ │ │ goddess, detaile and (pale:0.8) skin, beautiful │ │ │ │ │ face, curvy body and large (saggy:0.5) breasts, │ │ │ │ │ nipples, thighs, armoured dress, angel wings, │ │ │ │ │ looking at viewer, cloudy sky, holy light, light │ │ │ │ │ from clouds, fantasy theme │ │ │ │ negative_prompt │ score_5,score_4, bad quality, worst quality, │ │ │ │ │ zPDXL2-neg │ │ │ │ n_iter │ 1 │ │ │ │ batch_size │ 1 │ │ │ │ width │ 832 │ │ │ │ height │ 1216 │ │ │ │ sampler_name │ DPM++ 2M │ │ │ │ enable_hr │ True │ │ │ │ hr_upscaler │ 4x_NMKD-Siax_200k │ │ │ │ checkpoint │ MedusaCAS2.fp16.safetensors │ │ │ │ vae │ Automatic │ │ │ │ unet │ Automatic │ │ │ └─────────────────┴───────────────────────────────────────────────────┘ │ │ ADetailer │ │ ┌─────────────────────┬──────────────────────────────┐ │ │ │ │ Value │ │ │ ├─────────────────────┼──────────────────────────────┤ │ │ │ version │ 24.6.0 │ │ │ │ ad_model │ Anzhc Face seg 640 v2 y8n.pt │ │ │ │ ad_prompt │ │ │ │ │ ad_negative_prompt │ │ │ │ │ ad_controlnet_model │ None │ │ │ │ is_api │ False │ │ │ └─────────────────────┴──────────────────────────────┘ │ │ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\modules_forge\patch_b │ │ │ │ asic.py:13 in loader │ │ │ │ │ │ │ │ 12 │ │ try: │ │ │ │ > 13 │ │ │ result = originalloader(*args, **kwargs) │ │ │ │ 14 │ │ except Exception as e: │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\torch\serialization.py:1014 in load │ │ │ │m │ │ │ │ 1013 │ │ │ │ │ │ raise pickle.UnpicklingError(UNSAFE │ │ │ │ > 1014 │ │ │ │ return _load(opened_zipfile, │ │ │ │ 1015 │ │ │ │ │ │ │ map_location, │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\torch\serialization.py:1422 in _load │ │ │ │ │ │ │ │ 1421 │ unpickler.persistent_load = persistent_load │ │ │ │ > 1422 │ result = unpickler.load() │ │ │ │ 1423 │ │ │ │ │ │ │ │ in load:1213 │ │ │ │ │ │ │ │ in load_global:1529 │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\torch\serialization.py:1415 in find_class │ │ │ │ │ │ │ │ 1414 │ │ │ mod_name = load_module_mapping.get(mod_name, mod │ │ │ │ > 1415 │ │ │ return super().find_class(mod_name, name) │ │ │ │ 1416 │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\pytorch_lightning_graveyard\legacy_import_unpickler.py:24 in │ │ │ │ find_class │ │ │ │ │ │ │ │ 23 │ │ │ warnings.warn(f"Redirecting import of {module}.{na │ │ │ │ > 24 │ │ return super().find_class(new_module, name) │ │ │ │ 25 │ │ │ │ │ │ │ │ in find_class:1580 │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ ModuleNotFoundError: No module named 'dill' │ │ │ │ During handling of the above exception, another exception occurred: │ │ │ │ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │ │ │ aaaaaa\traceback.py:153 in wrapper │ │ │ │ │ │ │ │ 152 │ │ try: │ │ │ │ > 153 │ │ │ return func(*args, kwargs) │ │ │ │ 154 │ │ except Exception as e: │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │ │ │ scripts!adetailer.py:818 in postprocess_image │ │ │ │ │ │ │ │ 817 │ │ │ │ │ continue │ │ │ │ > 818 │ │ │ │ is_processed |= self._postprocess_image_inne │ │ │ │ 819 │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │ │ │ scripts!adetailer.py:739 in _postprocess_image_inner │ │ │ │ │ │ │ │ 738 │ │ with change_torch_load(): │ │ │ │ > 739 │ │ │ pred = predictor(ad_model, pp.image, args.ad_con │ │ │ │ 740 m │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │ │ │ adetailer\ultralytics.py:27 in ultralytics_predict │ │ │ │ │ │ │ │ 26 │ │ │ │ │ > 27 │ model = YOLO(model_path) │ │ │ │ 28 │ apply_classes(model, model_path, classes) │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\ultralytics\models\yolo\model.py:23 in init │ │ │ │ │ │ │ │ 22 │ │ │ # Continue with default YOLO initialization │ │ │ │ > 23 │ │ │ super().init(model=model, task=task, verbose= │ │ │ │ 24 │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\ultralytics\engine\model.py:141 in init │ │ │ │ │ │ │ │ 140 │ │ else: │ │ │ │ > 141 │ │ │ self._load(model, task=task) │ │ │ │ 142 │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\ultralytics\engine\model.py:293 in _load │ │ │ │ │ │ │ │ 292 │ │ if Path(weights).suffix == ".pt": │ │ │ │ > 293 │ │ │ self.model, self.ckpt = attempt_load_one_weight( │ │ │ │ 294 │ │ │ self.task = self.model.args["task"] │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\ultralytics\nn\tasks.py:855 in attempt_load_one_weight │ │ │ │ │ │ │ │ 854 │ """Loads a single model weights.""" │ │ │ │ > 855 │ ckpt, weight = torch_safe_load(weight) # load ckpt │ │ │ │ 856 │ args = {DEFAULT_CFG_DICT, (ckpt.get("train_args", {} │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │ │ │ s\ultralytics\nn\tasks.py:781 in torch_safe_load │ │ │ │ │ │ │ │ 780 │ │ ): │ │ │ │ > 781 │ │ │ ckpt = torch.load(file, map_location="cpu") │ │ │ │ 782 │ │ │ │ │ │ │ │ C:\SD\Packages\stable-diffusion-webui-reForge\modules_forge\patch_b │ │ │ │ asic.py:29 in loader │ │ │ │ │ │ │ │ 28 │ │ │ │ │ │ exp += f'You may try again now and For │ │ │ │ > 29 │ │ │ raise ValueError(exp) │ │ │ │ 30 m│ │ return result │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ ValueError: No module named 'dill' │ │ File corrupted: │ │ C:\SD\Packages\stable-diffusion-webui-reForge\models\adetailer\Anzhc │ │ Face seg 640 v2 y8n.pt │ │ Forge has tried to move the corrupted file to │ │ C:\SD\Packages\stable-diffusion-webui-reForge\models\adetailer\Anzhc │ │ Face seg 640 v2 y8n.pt.corrupted │ │ You may try again now and Forge will download models again. │ │ │ └─────────────────────────────────────────────────────────────────────────┘

Steps to reproduce the problem

install Anzhc face seg Face seg 640 from civitai and use it and it will give the same error as above (this does not happen on Webui a1111)

What should have happened?

it should load the model normally and work

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-07-22-09-00.json

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: f0.0.20.1-v1.10.0RC-latest-581-g1d909e5e
Commit hash: 1d909e5e7d3a5153f12df01a3b9a12e12adcb488
C:\SD\Packages\stable-diffusion-webui-reForge\extensions\sd-webui-infinite-image-browsing\install.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
C:\SD\Packages\stable-diffusion-webui-reForge\extensions-builtin\forge_legacy_preprocessors\install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
C:\SD\Packages\stable-diffusion-webui-reForge\extensions-builtin\sd_forge_controlnet\install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
Launching Web UI with arguments: --gradio-allowed-path 'C:\SD\Images'
Total VRAM 4096 MB, total RAM 14188 MB
Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --always-normal-vram
Set vram state to: LOW_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3050 Laptop GPU : native
Hint: your device supports --pin-shared-memory for potential speed improvements.
Hint: your device supports --cuda-malloc for potential speed improvements.
Hint: your device supports --cuda-stream for potential speed improvements.
VAE dtype: torch.bfloat16
CUDA Stream Activated:  False
Using pytorch cross attention
ControlNet preprocessor location: C:\SD\Packages\stable-diffusion-webui-reForge\models\ControlNetPreprocessor
Tag Autocomplete: Creating frequency database
Tag Autocomplete: Database successfully created
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: 24.6.0, num models: 13
Loading model MedusaCAS2.fp16.safetensors [4e7214fe95] (1 out of 1)
Loading weights [4e7214fe95] from C:\SD\Packages\stable-diffusion-webui-reForge\models\Stable-diffusion\MedusaCAS2.fp16.safetensors
2024-07-22 11:51:21,780 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://127.0.0.1:7860
model_type EPS
UNet ADM Dimension 2816

To create a public link, set `share=True` in `launch()`.
IIB Database file has been successfully backed up to the backup folder.
🤯 LobeTheme: Initializing...
Startup time: 42.1s (prepare environment: 6.3s, import torch: 5.0s, import gradio: 1.4s, setup paths: 1.9s, initialize shared: 0.3s, other imports: 1.1s, load scripts: 22.5s, create ui: 3.0s, gradio launch: 0.4s).
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
left over keys: dict_keys(['denoiser.sigmas'])
*** Error loading embedding datassRevFINALPony_final.safetensors
    Traceback (most recent call last):
      File "C:\SD\Packages\stable-diffusion-webui-reForge\modules\textual_inversion\textual_inversion.py", line 203, in load_from_dir
        self.load_from_file(fullfn, fn)
      File "C:\SD\Packages\stable-diffusion-webui-reForge\modules\textual_inversion\textual_inversion.py", line 184, in load_from_file
        embedding = create_embedding_from_data(data, name, filename=filename, filepath=path)
      File "C:\SD\Packages\stable-diffusion-webui-reForge\modules\textual_inversion\textual_inversion.py", line 297, in create_embedding_from_data
        assert len(data.keys()) == 1, 'embedding file has multiple terms in it'
    AssertionError: embedding file has multiple terms in it

---
To load target model SDXLClipModel
Begin to load 1 model
Moving model(s) has taken 0.45 seconds
Model loaded in 31.7s (load weights from disk: 0.5s, forge instantiate config: 2.4s, forge load real models: 19.3s, forge finalize: 0.2s, load textual inversion embeddings: 5.8s, calculate empty prompt: 3.4s).
To load target model SDXL:00, ?it/s]
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  2882.4561529159546
[Memory Management] Model Memory (MB) =  4897.086494445801
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  -3038.630341529846
[Memory Management] Requested SYNC Preserved Memory (MB) =  1429.5816555023193
[Memory Management] Parameters Loaded to SYNC Stream (MB) =  3467.4670486450195
[Memory Management] Parameters Loaded to GPU (MB) =  1429.581298828125
Moving model(s) has taken 1.78 seconds
100%|██████████| 30/30 [01:03<00:00,  2.12s/it]
To load target model AutoencoderKL
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  2853.9737310409546
[Memory Management] Model Memory (MB) =  159.55708122253418
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  1670.4166498184204
Moving model(s) has taken 0.85 seconds
Cleanup minimal inference memory.
tiled upscale: 100%|██████████| 24/24 [00:12<00:00,  1.97it/s]
To load target model SDXL
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  2819.3414068222046
[Memory Management] Model Memory (MB) =  4897.086494445801
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  -3101.745087623596
[Memory Management] Requested SYNC Preserved Memory (MB) =  1381.0318508148193
[Memory Management] Parameters Loaded to SYNC Stream (MB) =  3516.21826171875
[Memory Management] Parameters Loaded to GPU (MB) =  1380.8300857543945
Moving model(s) has taken 0.63 seconds
100%|██████████| 10/10 [00:44<00:00,  4.48s/it]
To load target model AutoencoderKL
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  2817.4410161972046
[Memory Management] Model Memory (MB) =  159.55708122253418
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  1633.8839349746704
Moving model(s) has taken 0.99 seconds
*** Error running postprocess_image: C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\scripts\!adetailer.py
    Traceback (most recent call last):
      File "C:\SD\Packages\stable-diffusion-webui-reForge\modules\scripts.py", line 933, in postprocess_image
        script.postprocess_image(p, pp, *script_args)
      File "C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\aaaaaa\traceback.py", line 173, in wrapper
        raise error from None
    ValueError: 
    ┌─────────────────────────────────────────────────────────────────────────┐
    │                               System info                               │
    │ ┌─────────────┬───────────────────────────────────────────────────────┐ │
    │ │             │ Value                                                 │ │
    │ ├─────────────┼───────────────────────────────────────────────────────┤ │
    │ │    Platform │ Windows-10-10.0.22631-SP0                             │ │
    │ │      Python │ 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023,          │ │
    │ │             │ 00:38:17) [MSC v.1929 64 bit (AMD64)]                 │ │
    │ │     Version │ f0.0.20.1-v1.10.0RC-latest-581-g1d909e5e              │ │
    │ │      Commit │ 1d909e5e7d3a5153f12df01a3b9a12e12adcb488              │ │
    │ │ Commandline │ ['C:\\SD\\Packages\\stable-diffusion-webui-reForge\\… │ │
    │ │             │ '--gradio-allowed-path', 'C:\\SD\\Images']            │ │
    │ │   Libraries │ {'torch': '2.1.2+cu121', 'torchvision':               │ │
    │ │             │ '0.16.2+cu121', 'ultralytics': '8.2.62', 'mediapipe': │ │
    │ │             │ '0.10.14'}                                            │ │
    │ └─────────────┴───────────────────────────────────────────────────────┘ │
    │                                 Inputs                                  │
    │ ┌─────────────────┬───────────────────────────────────────────────────┐ │
    │ │                 │ Value                                             │ │
    │ ├─────────────────┼───────────────────────────────────────────────────┤ │
    │ │          prompt │ zPDXL2, score_9, score_8_up, score_7_up,          │ │
    │ │                 │ Expressiveh, ultra detailed, one valkyrie in      │ │
    │ │                 │ gorgeous armor is holding a spear in hand,        │ │
    │ │                 │ goddess, detaile and (pale:0.8) skin, beautiful   │ │
    │ │                 │ face, curvy body and large (saggy:0.5) breasts,   │ │
    │ │                 │ nipples, thighs, armoured dress, angel wings,     │ │
    │ │                 │ looking at viewer, cloudy sky, holy light, light  │ │
    │ │                 │ from clouds, fantasy theme                        │ │
    │ │ negative_prompt │ score_5,score_4, bad quality, worst quality,      │ │
    │ │                 │ zPDXL2-neg                                        │ │
    │ │          n_iter │ 1                                                 │ │
    │ │      batch_size │ 1                                                 │ │
    │ │           width │ 832                                               │ │
    │ │          height │ 1216                                              │ │
    │ │    sampler_name │ DPM++ 2M                                          │ │
    │ │       enable_hr │ True                                              │ │
    │ │     hr_upscaler │ 4x_NMKD-Siax_200k                                 │ │
    │ │      checkpoint │ MedusaCAS2.fp16.safetensors                       │ │
    │ │             vae │ Automatic                                         │ │
    │ │            unet │ Automatic                                         │ │
    │ └─────────────────┴───────────────────────────────────────────────────┘ │
    │                       ADetailer                                         │
    │ ┌─────────────────────┬──────────────────────────────┐                  │
    │ │                     │ Value                        │                  │
    │ ├─────────────────────┼──────────────────────────────┤                  │
    │ │             version │ 24.6.0                       │                  │
    │ │            ad_model │ Anzhc Face seg 640 v2 y8n.pt │                  │
    │ │           ad_prompt │                              │                  │
    │ │  ad_negative_prompt │                              │                  │
    │ │ ad_controlnet_model │ None                         │                  │
    │ │              is_api │ False                        │                  │
    │ └─────────────────────┴──────────────────────────────┘                  │
    │ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\modules_forge\patch_b │ │
    │ │ asic.py:13 in loader                                                │ │
    │ │                                                                     │ │
    │ │   12 │   │   try:                                                   │ │
    │ │ > 13 │   │   │   result = original_loader(*args, **kwargs)          │ │
    │ │   14 │   │   except Exception as e:                                 │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\torch\serialization.py:1014 in load                               │ │
    │ │m                                                                     │ │
    │ │   1013 │   │   │   │   │   │   raise pickle.UnpicklingError(UNSAFE_ │ │
    │ │ > 1014 │   │   │   │   return _load(opened_zipfile,                 │ │
    │ │   1015 │   │   │   │   │   │   │    map_location,                   │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\torch\serialization.py:1422 in _load                              │ │
    │ │                                                                     │ │
    │ │   1421 │   unpickler.persistent_load = persistent_load              │ │
    │ │ > 1422 │   result = unpickler.load()                                │ │
    │ │   1423                                                              │ │
    │ │                                                                     │ │
    │ │ in load:1213                                                        │ │
    │ │                                                                     │ │
    │ │ in load_global:1529                                                 │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\torch\serialization.py:1415 in find_class                         │ │
    │ │                                                                     │ │
    │ │   1414 │   │   │   mod_name = load_module_mapping.get(mod_name, mod │ │
    │ │ > 1415 │   │   │   return super().find_class(mod_name, name)        │ │
    │ │   1416                                                              │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\pytorch_lightning\_graveyard\legacy_import_unpickler.py:24 in     │ │
    │ │ find_class                                                          │ │
    │ │                                                                     │ │
    │ │   23 │   │   │   warnings.warn(f"Redirecting import of {module}.{na │ │
    │ │ > 24 │   │   return super().find_class(new_module, name)            │ │
    │ │   25                                                                │ │
    │ │                                                                     │ │
    │ │ in find_class:1580                                                  │ │
    │ └─────────────────────────────────────────────────────────────────────┘ │
    │ ModuleNotFoundError: No module named 'dill'                             │
    │                                                                         │
    │ During handling of the above exception, another exception occurred:     │
    │                                                                         │
    │ ┌───────────────── Traceback (most recent call last) ─────────────────┐ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │
    │ │ aaaaaa\traceback.py:153 in wrapper                                  │ │
    │ │                                                                     │ │
    │ │   152 │   │   try:                                                  │ │
    │ │ > 153 │   │   │   return func(*args, **kwargs)                      │ │
    │ │   154 │   │   except Exception as e:                                │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │
    │ │ scripts\!adetailer.py:818 in postprocess_image                      │ │
    │ │                                                                     │ │
    │ │    817 │   │   │   │   │   continue                                 │ │
    │ │ >  818 │   │   │   │   is_processed |= self._postprocess_image_inne │ │
    │ │    819                                                              │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │
    │ │ scripts\!adetailer.py:739 in _postprocess_image_inner               │ │
    │ │                                                                     │ │
    │ │    738 │   │   with change_torch_load():                            │ │
    │ │ >  739 │   │   │   pred = predictor(ad_model, pp.image, args.ad_con │ │
    │ │    740 m                                                             │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\extensions\adetailer\ │ │
    │ │ adetailer\ultralytics.py:27 in ultralytics_predict                  │ │
    │ │                                                                     │ │
    │ │   26 │                                                              │ │
    │ │ > 27 │   model = YOLO(model_path)                                   │ │
    │ │   28 │   apply_classes(model, model_path, classes)                  │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\ultralytics\models\yolo\model.py:23 in __init__                   │ │
    │ │                                                                     │ │
    │ │    22 │   │   │   # Continue with default YOLO initialization       │ │
    │ │ >  23 │   │   │   super().__init__(model=model, task=task, verbose= │ │
    │ │    24                                                               │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\ultralytics\engine\model.py:141 in __init__                       │ │
    │ │                                                                     │ │
    │ │    140 │   │   else:                                                │ │
    │ │ >  141 │   │   │   self._load(model, task=task)                     │ │
    │ │    142                                                              │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\ultralytics\engine\model.py:293 in _load                          │ │
    │ │                                                                     │ │
    │ │    292 │   │   if Path(weights).suffix == ".pt":                    │ │
    │ │ >  293 │   │   │   self.model, self.ckpt = attempt_load_one_weight( │ │
    │ │    294 │   │   │   self.task = self.model.args["task"]              │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\ultralytics\nn\tasks.py:855 in attempt_load_one_weight            │ │
    │ │                                                                     │ │
    │ │    854 │   """Loads a single model weights."""                      │ │
    │ │ >  855 │   ckpt, weight = torch_safe_load(weight)  # load ckpt      │ │
    │ │    856 │   args = {**DEFAULT_CFG_DICT, **(ckpt.get("train_args", {} │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\venv\lib\site-package │ │
    │ │ s\ultralytics\nn\tasks.py:781 in torch_safe_load                    │ │
    │ │                                                                     │ │
    │ │    780 │   │   ):                                                   │ │
    │ │ >  781 │   │   │   ckpt = torch.load(file, map_location="cpu")      │ │
    │ │    782                                                              │ │
    │ │                                                                     │ │
    │ │ C:\SD\Packages\stable-diffusion-webui-reForge\modules_forge\patch_b │ │
    │ │ asic.py:29 in loader                                                │ │
    │ │                                                                     │ │
    │ │   28 │   │   │   │   │   │   exp += f'You may try again now and For │ │
    │ │ > 29 │   │   │   raise ValueError(exp)                              │ │
    │ │   30 m│   │   return result                                          │ │
    │ └─────────────────────────────────────────────────────────────────────┘ │
    │ ValueError: No module named 'dill'                                      │
    │ File corrupted:                                                         │
    │ C:\SD\Packages\stable-diffusion-webui-reForge\models\adetailer\Anzhc    │
    │ Face seg 640 v2 y8n.pt                                                  │
    │ Forge has tried to move the corrupted file to                           │
    │ C:\SD\Packages\stable-diffusion-webui-reForge\models\adetailer\Anzhc    │
    │ Face seg 640 v2 y8n.pt.corrupted                                        │
    │ You may try again now and Forge will download models again.             │
    │                                                                         │
    └─────────────────────────────────────────────────────────────────────────┘

---
Total progress: 100%|██████████| 40/40 [02:44<00:00,  4.11s/it]t]

Additional information

No response

Panchovix commented 3 months ago

Hi there, it says no module installed 'dill'.

If you install that module in your venv, does it work?

Panchovix commented 3 months ago

Okay I downloaded these new models from https://huggingface.co/Anzhc/Anzhcs_YOLOs/tree/main and had the same issue.

Then on the venv, I installed "dill" with pip install dill, and these new models work fine.

So make sure to install that library and it will work.