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.61k stars 411 forks source link

[Issue]: JSONDecodeError: Expecting value: line 1 column 1 (char 0) #1680

Closed Neoony closed 1 year ago

Neoony commented 1 year ago

Issue Description

I thought I give this a try, coming from lshqqytiger/stable-diffusion-webui-directml

I did git clone I change python in webui.bat "set PYTHON=C:\Users\Neoony\AppData\Local\Programs\Python\Python310\python.exe" Python version is the same as I used with lshqqytiger Launch parameter --use-directml and also trying --reinstall I am on Radeon RX 7900 XTX

However when its trying to load the model, or I try to load a custom model It just throws an error JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Any ideas why? I have already retried maybe 10 times and it has been the same over multiple commits

Full log:


Using VENV: H:\Programs\StableDiffusion\automatic\venv
18:53:34-030995 INFO     Starting SD.Next
18:53:34-043495 INFO     Python 3.10.9 on Windows
18:53:34-329997 INFO     Version: 14d1136f Fri Jul 14 18:09:07 2023 +0300
18:53:34-575497 INFO     Using DirectML Backend
18:53:34-576498 INFO     Installing package: torch-directml
18:54:09-163172 INFO     Installing package: torch-directml
18:54:13-296191 INFO     Torch 2.0.0+cpu
18:54:13-367191 INFO     Torch backend: DirectML (torch-directml 0.2.0.dev230426)
18:54:13-595191 INFO     Torch detected GPU: AMD Radeon RX 7900 XTX
18:54:13-596692 INFO     Installing package: tensorflow==2.12.0
18:54:45-804999 INFO     Forcing reinstall of all packages
18:54:45-806501 INFO     Verifying requirements
18:54:45-807499 INFO     Installing package: addict
18:54:47-389008 INFO     Installing package: aenum
18:54:49-216017 INFO     Installing package: aiohttp
18:55:06-930114 INFO     Installing package: anyio
18:55:24-229724 INFO     Installing package: appdirs
18:55:25-972233 INFO     Installing package: astunparse
18:55:27-947242 INFO     Installing package: bitsandbytes
18:55:45-995907 INFO     Installing package: blendmodes
18:55:48-543920 INFO     Installing package: clean-fid
18:56:11-039773 INFO     Installing package: easydev
18:56:13-321285 INFO     Installing package: extcolors
18:56:15-298295 INFO     Installing package: facexlib
18:56:26-361850 INFO     Installing package: filetype
18:56:28-273860 INFO     Installing package: future
18:56:45-677284 INFO     Installing package: gdown
18:56:47-852795 INFO     Installing package: gfpgan
18:56:58-169846 INFO     Installing package: GitPython
18:57:00-928361 INFO     Installing package: httpcore
18:57:17-969434 INFO     Installing package: inflection
18:57:20-055444 INFO     Installing package: jsonmerge
18:57:25-402984 INFO     Installing package: kornia
18:57:43-678074 INFO     Installing package: lark
18:58:00-671599 INFO     Installing package: lmdb
18:58:02-425109 INFO     Installing package: lpips
18:58:04-126152 INFO     Installing package: omegaconf
18:58:06-417665 INFO     Installing package: open-clip-torch
18:58:26-709733 INFO     Installing package: opencv-contrib-python
18:58:44-969822 INFO     Installing package: piexif
18:58:47-062333 INFO     Installing package: psutil
18:58:50-596925 INFO     Installing package: pyyaml
18:58:52-724936 INFO     Installing package: realesrgan
18:58:55-167448 INFO     Installing package: resize-right
18:58:57-143958 INFO     Installing package: rich
18:58:59-304969 INFO     Installing package: safetensors
18:59:01-308478 INFO     Installing package: scipy
18:59:03-464489 INFO     Installing package: tb_nightly
18:59:05-620998 INFO     Installing package: toml
18:59:22-545646 INFO     Installing package: torchdiffeq
18:59:24-715658 INFO     Installing package: torchsde
18:59:42-016278 INFO     Installing package: voluptuous
18:59:59-128077 INFO     Installing package: yapf
19:00:01-228582 INFO     Installing package: scikit-image
19:00:03-504093 INFO     Installing package: basicsr
19:00:05-827106 INFO     Installing package: compel
19:00:16-781660 INFO     Installing package: typing-extensions==4.7.1
19:00:34-133989 INFO     Installing package: antlr4-python3-runtime==4.9.3
19:00:51-469825 INFO     Installing package: pydantic==1.10.11
19:00:54-243338 INFO     Installing package: requests==2.31.0
19:01:11-399455 INFO     Installing package: tqdm==4.65.0
19:01:13-748966 INFO     Installing package: accelerate==0.20.3
19:01:16-601481 INFO     Installing package: opencv-python==4.7.0.72
19:01:34-861689 INFO     Installing package: diffusers==0.18.2
19:01:52-185244 INFO     Installing package: einops==0.4.1
19:01:54-855258 INFO     Installing package: gradio==3.32.0
19:02:10-842338 INFO     Installing package: numexpr==2.8.4
19:02:28-555974 INFO     Installing package: numpy==1.23.5
19:02:31-149987 INFO     Installing package: numba==0.57.0
19:02:54-284135 INFO     Installing package: pandas==1.5.3
19:03:07-241700 INFO     Installing package: protobuf==3.20.3
19:03:10-144715 INFO     Installing package: pytorch_lightning==1.9.4
19:03:29-992469 INFO     Installing package: transformers==4.30.2
19:03:47-912090 INFO     Installing package: tomesd==0.1.3
19:03:50-424602 INFO     Installing package: urllib3==1.26.15
19:03:53-077114 INFO     Installing package: Pillow==9.5.0
19:04:11-176272 INFO     Installing package: timm==0.6.13
19:04:30-038033 INFO     Verifying packages
19:04:30-039533 INFO     Installing package: git+https://github.com/openai/CLIP.git
19:05:09-127360 INFO     Installing package:
                         git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
19:05:35-138790 INFO     Installing package: onnxruntime==1.15.1
19:05:39-233812 INFO     Installing package: pi-heif
19:05:57-400499 INFO     Verifying repositories
19:06:21-512494 INFO     Verifying submodules
19:06:56-359169 INFO     Extension installed packages: clip-interrogator-ext ['clip-interrogator==0.6.0']
19:07:19-271683 INFO     Extension installed packages: sd-webui-agent-scheduler ['SQLAlchemy==2.0.18', 'greenlet==2.0.2']
19:07:51-409874 INFO     Extension installed packages: sd-webui-controlnet ['pywin32==306', 'lxml==4.9.3',
                         'reportlab==4.0.4', 'pycparser==2.21', 'portalocker==2.7.0', 'cffi==1.15.1', 'svglib==1.5.1',
                         'tinycss2==1.2.1', 'mediapipe==0.10.2', 'tabulate==0.9.0', 'cssselect2==0.7.0',
                         'webencodings==0.5.1', 'sounddevice==0.4.6', 'iopath==0.1.9', 'yacs==0.1.8',
                         'fvcore==0.1.5.post20221221']
19:08:12-974598 INFO     Extension installed packages: stable-diffusion-webui-images-browser ['Send2Trash==1.8.2',
                         'image-reward==1.5', 'fairscale==0.4.13']
19:08:36-819915 INFO     Extension installed packages: stable-diffusion-webui-rembg ['rembg==2.0.38', 'pooch==1.7.0',
                         'PyMatting==1.1.8']
19:08:36-901415 INFO     Extensions enabled: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora',
                         'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
19:08:36-902916 INFO     Verifying packages
19:08:36-903416 INFO     Installing package: git+https://github.com/openai/CLIP.git
19:08:44-263451 INFO     Installing package:
                         git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
19:08:52-414505 INFO     Installing package: onnxruntime==1.15.1
19:08:55-192015 INFO     Installing package: pi-heif
19:08:57-956530 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic\extensions-builtin
19:08:57-958030 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic\extensions
19:08:58-108031 INFO     Server arguments: ['--use-directml', '--reinstall']
No module 'xformers'. Proceeding without it.
19:09:02-536053 INFO     Pipeline: Backend.ORIGINAL
19:09:03-812055 INFO     Libraries loaded
19:09:03-813556 INFO     Using data path: H:\Programs\StableDiffusion\automatic
19:09:03-817056 INFO     Available VAEs: H:\Programs\StableDiffusion\automatic\models\VAE 0
19:09:03-826555 INFO     Available models: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion 2
19:09:07-178072 INFO     ControlNet v1.1.232
ControlNet v1.1.232
ControlNet preprocessor location: H:\Programs\StableDiffusion\automatic\extensions-builtin\sd-webui-controlnet\annotator\downloads
19:09:07-281072 INFO     ControlNet v1.1.232
ControlNet v1.1.232
Image Browser: ImageReward is not installed, cannot be used.
19:09:07-407072 ERROR    Module load:
                         H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\api.p
                         y: ImportError
Module load: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\api.py: ImportError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\script_loading.py:13 in load_module                                        │
│                                                                                                                          │
│   12 │   try:                                                                                                            │
│ ❱ 13 │   │   module_spec.loader.exec_module(module)                                                                      │
│   14 │   except Exception as e:                                                                                          │
│ in exec_module:883                                                                                                       │
│                                                                                                                          │
│                                                 ... 7 frames hidden ...                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:55 in <module>                            │
│                                                                                                                          │
│    54                                                                                                                    │
│ ❱  55 _ensure_critical_deps()                                                                                            │
│    56 # END DO NOT MOVE                                                                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:42 in _ensure_critical_deps               │
│                                                                                                                          │
│    41 │   elif numpy_version > (1, 24):                                                                                  │
│ ❱  42 │   │   raise ImportError("Numba needs NumPy 1.24 or less")                                                        │
│    43 │   try:                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: Numba needs NumPy 1.24 or less
19:09:07-444574 ERROR    Module load:
                         H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\postp
                         rocessing_rembg.py: ImportError
Module load: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py: ImportError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\script_loading.py:13 in load_module                                        │
│                                                                                                                          │
│   12 │   try:                                                                                                            │
│ ❱ 13 │   │   module_spec.loader.exec_module(module)                                                                      │
│   14 │   except Exception as e:                                                                                          │
│ in exec_module:883                                                                                                       │
│                                                                                                                          │
│                                                 ... 7 frames hidden ...                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:55 in <module>                            │
│                                                                                                                          │
│    54                                                                                                                    │
│ ❱  55 _ensure_critical_deps()                                                                                            │
│    56 # END DO NOT MOVE                                                                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:42 in _ensure_critical_deps               │
│                                                                                                                          │
│    41 │   elif numpy_version > (1, 24):                                                                                  │
│ ❱  42 │   │   raise ImportError("Numba needs NumPy 1.24 or less")                                                        │
│    43 │   try:                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: Numba needs NumPy 1.24 or less
19:09:07-618572 INFO     Loading UI theme: name=black-orange style=Auto
Running on local URL:  http://127.0.0.1:7860
19:09:14-068103 INFO     Local URL: http://127.0.0.1:7860/
19:09:14-070103 INFO     Initializing middleware
19:09:14-192603 INFO     [AgentScheduler] Task queue is empty
19:09:14-194103 INFO     [AgentScheduler] Registering APIs
19:09:14-487606 INFO     Model metadata saved: H:\Programs\StableDiffusion\automatic\metadata.json 5
19:09:14-489105 WARNING  Selected checkpoint not found: model.ckpt
Loading weights: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\reliberate_v10.safetensors ━━━━━ 0.0/… -:--:…
                                                                                                                GB
19:09:14-986608 INFO     Torch override dtype: no-half set
19:09:14-988108 INFO     Torch override VAE dtype: no-half set
19:09:14-988607 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
19:09:26-868663 ERROR    Failed to load stable diffusion model
19:09:26-880162 ERROR    loading stable diffusion model: JSONDecodeError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\sd_models.py:494 in get_sd_model                                           │
│                                                                                                                          │
│    493 │   │   │   │   │   if shared.backend == shared.Backend.ORIGINAL:                                                 │
│ ❱  494 │   │   │   │   │   │   reload_model_weights(op='model')                                                          │
│    495 │   │   │   │   │   elif shared.backend == shared.Backend.DIFFUSERS:                                              │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\modules\sd_models.py:1003 in reload_model_weights                                  │
│                                                                                                                          │
│   1002 │   │   if shared.backend == shared.Backend.ORIGINAL:                                                             │
│ ❱ 1003 │   │   │   load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=time                          │
│   1004 │   │   else:                                                                                                     │
│                                                                                                                          │
│                                                 ... 10 frames hidden ...                                                 │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:337 in decode                                │
│                                                                                                                          │
│   336 │   │   """                                                                                                        │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                          │
│   338 │   │   end = _w(s, end).end()                                                                                     │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:355 in raw_decode                            │
│                                                                                                                          │
│   354 │   │   except StopIteration as err:                                                                               │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                       │
│   356 │   │   return obj, end                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
19:09:28-728671 INFO     Startup time: 30.6s (torch=1.7s gradio=1.2s libraries=2.8s scripts=3.7s onchange=0.1s
                         ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s ui-extensions=6.0s ui-defaults=0.1s launch=0.2s
                         app-started=0.4s checkpoint=14.2s)

### Version Platform Description

Win 10 Pro 64bit
Python 3.10.9
Radeon RX 7900 XTX + 5950X
Version: 14d1136f Wed Jul 12 16:59:02 2023 -0400

18:53:34-030995 INFO     Starting SD.Next
18:53:34-043495 INFO     Python 3.10.9 on Windows
18:53:34-329997 INFO     Version: 14d1136f Fri Jul 14 18:09:07 2023 +0300
18:53:34-575497 INFO     Using DirectML Backend
18:53:34-576498 INFO     Installing package: torch-directml
18:54:09-163172 INFO     Installing package: torch-directml
18:54:13-296191 INFO     Torch 2.0.0+cpu
18:54:13-367191 INFO     Torch backend: DirectML (torch-directml 0.2.0.dev230426)
18:54:13-595191 INFO     Torch detected GPU: AMD Radeon RX 7900 XTX
18:54:13-596692 INFO     Installing package: tensorflow==2.12.0

### Acknowledgements

- [X] I have read the above and searched for existing issues
vladmandic commented 1 year ago

what does file H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\reliberate_v10.safetensors look like?

Neoony commented 1 year ago

Not exactly sure what are you asking, its the original reliberate model Thats just me trying other models.

Forgot to mention the same/similar errors happen with the default model, or whenever I try to switch to another model.

image

e.g. starting again and switching to v1-5-pruned-emaonly.safetensors Now without reinstall parameter


19:26:43-213772 INFO     Starting SD.Next
19:26:43-218275 INFO     Python 3.10.9 on Windows
19:26:43-434773 INFO     Version: 14d1136f Fri Jul 14 18:09:07 2023 +0300
19:26:43-815774 INFO     Using DirectML Backend
19:26:45-821284 INFO     Torch 2.0.0+cpu
19:26:45-845785 INFO     Torch backend: DirectML (torch-directml 0.2.0.dev230426)
19:26:46-049786 INFO     Torch detected GPU: AMD Radeon RX 7900 XTX
19:26:46-051285 INFO     Installing package: tensorflow==2.12.0
19:27:31-500994 INFO     Enabled extensions-builtin: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora',
                         'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
19:27:31-508494 INFO     Enabled extensions: []
19:27:31-509494 INFO     No changes detected: Quick launch active
19:27:31-515495 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic\extensions-builtin
19:27:31-516995 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic\extensions
19:27:31-585995 INFO     Server arguments: ['--use-directml']
No module 'xformers'. Proceeding without it.
19:27:38-027025 INFO     Pipeline: Backend.ORIGINAL
19:27:39-119529 INFO     Libraries loaded
19:27:39-121029 INFO     Using data path: H:\Programs\StableDiffusion\automatic
19:27:39-126029 INFO     Available VAEs: H:\Programs\StableDiffusion\automatic\models\VAE 0
19:27:39-133029 INFO     Available models: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion 2
19:27:43-213048 INFO     ControlNet v1.1.232
ControlNet v1.1.232
ControlNet preprocessor location: H:\Programs\StableDiffusion\automatic\extensions-builtin\sd-webui-controlnet\annotator\downloads
19:27:43-420548 INFO     ControlNet v1.1.232
ControlNet v1.1.232
Image Browser: ImageReward is not installed, cannot be used.
19:28:10-848675 INFO     Loading UI theme: name=black-orange style=Auto
Running on local URL:  http://127.0.0.1:7860
19:28:16-722703 INFO     Local URL: http://127.0.0.1:7860/
19:28:16-724703 INFO     Initializing middleware
19:28:17-163705 INFO     [AgentScheduler] Task queue is empty
19:28:17-164705 INFO     [AgentScheduler] Registering APIs
19:28:17-263205 WARNING  Selected checkpoint not found: model.ckpt
Loading weights: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\reliberate_v10.safetensors ━━━━━ 0.0/… -:--:…
                                                                                                                GB
19:28:17-945208 INFO     Torch override dtype: no-half set
19:28:17-946708 INFO     Torch override VAE dtype: no-half set
19:28:17-947708 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
19:28:26-382247 ERROR    Failed to load stable diffusion model
19:28:26-436747 ERROR    loading stable diffusion model: JSONDecodeError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\sd_models.py:494 in get_sd_model                                           │
│                                                                                                                          │
│    493 │   │   │   │   │   if shared.backend == shared.Backend.ORIGINAL:                                                 │
│ ❱  494 │   │   │   │   │   │   reload_model_weights(op='model')                                                          │
│    495 │   │   │   │   │   elif shared.backend == shared.Backend.DIFFUSERS:                                              │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\modules\sd_models.py:1003 in reload_model_weights                                  │
│                                                                                                                          │
│   1002 │   │   if shared.backend == shared.Backend.ORIGINAL:                                                             │
│ ❱ 1003 │   │   │   load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=time                          │
│   1004 │   │   else:                                                                                                     │
│                                                                                                                          │
│                                                 ... 10 frames hidden ...                                                 │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:337 in decode                                │
│                                                                                                                          │
│   336 │   │   """                                                                                                        │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                          │
│   338 │   │   end = _w(s, end).end()                                                                                     │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:355 in raw_decode                            │
│                                                                                                                          │
│   354 │   │   except StopIteration as err:                                                                               │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                       │
│   356 │   │   return obj, end                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
19:28:29-890763 INFO     Startup time: 58.3s (torch=4.2s gradio=0.8s libraries=2.5s scripts=31.6s onchange=0.1s
                         ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s ui-extensions=5.4s launch=0.2s app-started=0.5s
                         checkpoint=12.6s)
Loading weights: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors ━━━ 0.0… -:-…
                                                                                                                   GB
19:28:54-414906 INFO     Torch override dtype: no-half set
19:28:54-415906 INFO     Torch override VAE dtype: no-half set
19:28:54-416905 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
19:29:03-587948 ERROR    changing setting sd_model_checkpoint to v1-5-pruned-emaonly.safetensors: JSONDecodeError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\shared.py:637 in set                                                       │
│                                                                                                                          │
│   636 │   │   │   try:                                                                                                   │
│ ❱ 637 │   │   │   │   self.data_labels[key].onchange()                                                                   │
│   638 │   │   │   except Exception as e:                                                                                 │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\modules\call_queue.py:16 in f                                                      │
│                                                                                                                          │
│    15 │   │   with queue_lock:                                                                                           │
│ ❱  16 │   │   │   res = func(*args, **kwargs)                                                                            │
│    17 │   │   return res                                                                                                 │
│                                                                                                                          │
│                                                 ... 12 frames hidden ...                                                 │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:337 in decode                                │
│                                                                                                                          │
│   336 │   │   """                                                                                                        │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                          │
│   338 │   │   end = _w(s, end).end()                                                                                     │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:355 in raw_decode                            │
│                                                                                                                          │
│   354 │   │   except StopIteration as err:                                                                               │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                       │
│   356 │   │   return obj, end                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
vladmandic commented 1 year ago

first delete config.json, seems like its corrupt due to some previous crash or something. second, run webui --debug to capture a bit more info while model is loading.

Neoony commented 1 year ago

Oh, I guess I didnt try removing config.json before, only the folders like venv, pycache, tmp Its true I accidentally ran it without --use-directml the very first time, then did --use-directml with --reinstall, and then started cleaning folders and trying again.

Anyways I will also do a clean run, deleted all the files/folders which are not from git (config.json, venv and similar) And now running: --use-directml --debug --reinstall

Well its still happening:


Using VENV: H:\Programs\StableDiffusion\automatic\venv
21:57:36-882723 INFO     Starting SD.Next
21:57:36-886225 INFO     Python 3.10.9 on Windows
21:57:37-169225 INFO     Version: 14d1136f Fri Jul 14 18:09:07 2023 +0300
21:57:37-490226 DEBUG    Setting environment tuning
21:57:37-491726 DEBUG    Torch overrides: cuda=False rocm=False ipex=False diml=True
21:57:37-493226 DEBUG    Torch allowed: cuda=False rocm=False ipex=False diml=True
21:57:37-493726 INFO     Using DirectML Backend
21:57:37-494728 INFO     Installing package: torch-directml
21:57:37-495227 DEBUG    Running pip: install --upgrade torch-directml
21:58:13-594886 INFO     Installing package: torch-directml
21:58:13-596386 DEBUG    Running pip: install --upgrade torch-directml
21:58:32-877561 INFO     Torch 2.0.0+cpu
21:58:32-948559 INFO     Torch backend: DirectML (torch-directml 0.2.0.dev230426)
21:58:33-160062 INFO     Torch detected GPU: AMD Radeon RX 7900 XTX
21:58:33-161062 INFO     Installing package: tensorflow==2.12.0
21:58:33-162062 DEBUG    Running pip: install --upgrade tensorflow==2.12.0
21:58:50-901640 INFO     Forcing reinstall of all packages
21:58:50-903140 INFO     Verifying requirements
21:58:50-904143 INFO     Installing package: addict
21:58:50-905142 DEBUG    Running pip: install --upgrade addict
21:58:52-671646 INFO     Installing package: aenum
21:58:52-672646 DEBUG    Running pip: install --upgrade aenum
21:59:09-627000 INFO     Installing package: aiohttp
21:59:09-627999 DEBUG    Running pip: install --upgrade aiohttp
21:59:27-323090 INFO     Installing package: anyio
21:59:27-324090 DEBUG    Running pip: install --upgrade anyio
21:59:29-147598 INFO     Installing package: appdirs
21:59:29-148598 DEBUG    Running pip: install --upgrade appdirs
21:59:30-652605 INFO     Installing package: astunparse
21:59:30-653604 DEBUG    Running pip: install --upgrade astunparse
21:59:32-597113 INFO     Installing package: bitsandbytes
21:59:32-598112 DEBUG    Running pip: install --upgrade bitsandbytes
21:59:50-225851 INFO     Installing package: blendmodes
21:59:50-227352 DEBUG    Running pip: install --upgrade blendmodes
22:00:07-654732 INFO     Installing package: clean-fid
22:00:07-655732 DEBUG    Running pip: install --upgrade clean-fid
22:00:15-451768 INFO     Installing package: easydev
22:00:15-452767 DEBUG    Running pip: install --upgrade easydev
22:00:32-308818 INFO     Installing package: extcolors
22:00:32-309817 DEBUG    Running pip: install --upgrade extcolors
22:00:49-208980 INFO     Installing package: facexlib
22:00:49-209980 DEBUG    Running pip: install --upgrade facexlib
22:01:00-751531 INFO     Installing package: filetype
22:01:00-752533 DEBUG    Running pip: install --upgrade filetype
22:01:02-579038 INFO     Installing package: future
22:01:02-580038 DEBUG    Running pip: install --upgrade future
22:01:05-098051 INFO     Installing package: gdown
22:01:05-099550 DEBUG    Running pip: install --upgrade gdown
22:01:08-123064 INFO     Installing package: gfpgan
22:01:08-124064 DEBUG    Running pip: install --upgrade gfpgan
22:01:18-001108 INFO     Installing package: GitPython
22:01:18-002608 DEBUG    Running pip: install --upgrade GitPython
22:01:35-446476 INFO     Installing package: httpcore
22:01:35-447475 DEBUG    Running pip: install --upgrade httpcore
22:01:37-564985 INFO     Installing package: inflection
22:01:37-565985 DEBUG    Running pip: install --upgrade inflection
22:01:39-440994 INFO     Installing package: jsonmerge
22:01:39-442494 DEBUG    Running pip: install --upgrade jsonmerge
22:01:41-847506 INFO     Installing package: kornia
22:01:41-849004 DEBUG    Running pip: install --upgrade kornia
22:01:45-138519 INFO     Installing package: lark
22:01:45-140018 DEBUG    Running pip: install --upgrade lark
22:02:02-530505 INFO     Installing package: lmdb
22:02:02-531506 DEBUG    Running pip: install --upgrade lmdb
22:02:04-303012 INFO     Installing package: lpips
22:02:04-304013 DEBUG    Running pip: install --upgrade lpips
22:02:06-126023 INFO     Installing package: omegaconf
22:02:06-127023 DEBUG    Running pip: install --upgrade omegaconf
22:02:08-849035 INFO     Installing package: open-clip-torch
22:02:08-850037 DEBUG    Running pip: install --upgrade open-clip-torch
22:02:29-016194 INFO     Installing package: opencv-contrib-python
22:02:29-017193 DEBUG    Running pip: install --upgrade opencv-contrib-python
22:02:46-746610 INFO     Installing package: piexif
22:02:46-748110 DEBUG    Running pip: install --upgrade piexif
22:03:03-820349 INFO     Installing package: psutil
22:03:03-821849 DEBUG    Running pip: install --upgrade psutil
22:03:05-956357 INFO     Installing package: pyyaml
22:03:05-957357 DEBUG    Running pip: install --upgrade pyyaml
22:03:22-866185 INFO     Installing package: realesrgan
22:03:22-867185 DEBUG    Running pip: install --upgrade realesrgan
22:03:25-173196 INFO     Installing package: resize-right
22:03:25-174196 DEBUG    Running pip: install --upgrade resize-right
22:03:42-495049 INFO     Installing package: rich
22:03:42-496549 DEBUG    Running pip: install --upgrade rich
22:03:44-290057 INFO     Installing package: safetensors
22:03:44-291056 DEBUG    Running pip: install --upgrade safetensors
22:03:46-132565 INFO     Installing package: scipy
22:03:46-133565 DEBUG    Running pip: install --upgrade scipy
22:03:48-610576 INFO     Installing package: tb_nightly
22:03:48-611576 DEBUG    Running pip: install --upgrade tb_nightly
22:03:50-829085 INFO     Installing package: toml
22:03:50-830086 DEBUG    Running pip: install --upgrade toml
22:03:53-290597 INFO     Installing package: torchdiffeq
22:03:53-291596 DEBUG    Running pip: install --upgrade torchdiffeq
22:03:55-161106 INFO     Installing package: torchsde
22:03:55-162606 DEBUG    Running pip: install --upgrade torchsde
22:04:12-363387 INFO     Installing package: voluptuous
22:04:12-364887 DEBUG    Running pip: install --upgrade voluptuous
22:04:29-332237 INFO     Installing package: yapf
22:04:29-333236 DEBUG    Running pip: install --upgrade yapf
22:04:31-242244 INFO     Installing package: scikit-image
22:04:31-243743 DEBUG    Running pip: install --upgrade scikit-image
22:04:33-427753 INFO     Installing package: basicsr
22:04:33-428753 DEBUG    Running pip: install --upgrade basicsr
22:04:35-307261 INFO     Installing package: compel
22:04:35-308262 DEBUG    Running pip: install --upgrade compel
22:04:46-355810 INFO     Installing package: typing-extensions==4.7.1
22:04:46-357311 DEBUG    Running pip: install --upgrade typing-extensions==4.7.1
22:05:03-607834 INFO     Installing package: antlr4-python3-runtime==4.9.3
22:05:03-608834 DEBUG    Running pip: install --upgrade antlr4-python3-runtime==4.9.3
22:05:05-894344 INFO     Installing package: pydantic==1.10.11
22:05:05-895346 DEBUG    Running pip: install --upgrade pydantic==1.10.11
22:05:08-212856 INFO     Installing package: requests==2.31.0
22:05:08-214355 DEBUG    Running pip: install --upgrade requests==2.31.0
22:05:25-422295 INFO     Installing package: tqdm==4.65.0
22:05:25-423297 DEBUG    Running pip: install --upgrade tqdm==4.65.0
22:05:27-752805 INFO     Installing package: accelerate==0.20.3
22:05:27-753805 DEBUG    Running pip: install --upgrade accelerate==0.20.3
22:05:30-163320 INFO     Installing package: opencv-python==4.7.0.72
22:05:30-164819 DEBUG    Running pip: install --upgrade opencv-python==4.7.0.72
22:05:48-333817 INFO     Installing package: diffusers==0.18.2
22:05:48-335319 DEBUG    Running pip: install --upgrade diffusers==0.18.2
22:06:05-965778 INFO     Installing package: einops==0.4.1
22:06:05-967278 DEBUG    Running pip: install --upgrade einops==0.4.1
22:06:23-946361 INFO     Installing package: gradio==3.32.0
22:06:23-947361 DEBUG    Running pip: install --upgrade gradio==3.32.0
22:06:54-518223 INFO     Installing package: numexpr==2.8.4
22:06:54-519723 DEBUG    Running pip: install --upgrade numexpr==2.8.4
22:06:57-466233 INFO     Installing package: numpy==1.23.5
22:06:57-467734 DEBUG    Running pip: install --upgrade numpy==1.23.5
22:07:14-879648 INFO     Installing package: numba==0.57.0
22:07:14-881148 DEBUG    Running pip: install --upgrade numba==0.57.0
22:07:22-750183 INFO     Installing package: pandas==1.5.3
22:07:22-751683 DEBUG    Running pip: install --upgrade pandas==1.5.3
22:07:52-592999 INFO     Installing package: protobuf==3.20.3
22:07:52-594500 DEBUG    Running pip: install --upgrade protobuf==3.20.3
22:08:10-062394 INFO     Installing package: pytorch_lightning==1.9.4
22:08:10-063394 DEBUG    Running pip: install --upgrade pytorch_lightning==1.9.4
22:08:14-900918 INFO     Installing package: transformers==4.30.2
22:08:14-902419 DEBUG    Running pip: install --upgrade transformers==4.30.2
22:08:32-342420 INFO     Installing package: tomesd==0.1.3
22:08:32-343418 DEBUG    Running pip: install --upgrade tomesd==0.1.3
22:08:34-779429 INFO     Installing package: urllib3==1.26.15
22:08:34-781430 DEBUG    Running pip: install --upgrade urllib3==1.26.15
22:08:37-991944 INFO     Installing package: Pillow==9.5.0
22:08:37-993443 DEBUG    Running pip: install --upgrade Pillow==9.5.0
22:08:55-503510 INFO     Installing package: timm==0.6.13
22:08:55-504510 DEBUG    Running pip: install --upgrade timm==0.6.13
22:08:59-232027 INFO     Verifying packages
22:08:59-233527 INFO     Installing package: git+https://github.com/openai/CLIP.git
22:08:59-236027 DEBUG    Running pip: install --upgrade git+https://github.com/openai/CLIP.git
22:09:37-784211 INFO     Installing package: git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
22:09:37-785712 DEBUG    Running pip: install --upgrade git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
22:10:03-839475 INFO     Installing package: onnxruntime==1.15.1
22:10:03-840975 DEBUG    Running pip: install --upgrade onnxruntime==1.15.1
22:10:07-913994 INFO     Installing package: pi-heif
22:10:07-915494 DEBUG    Running pip: install --upgrade pi-heif
22:10:25-511726 INFO     Verifying repositories
22:10:41-184565 DEBUG    Submodule: H:\Programs\StableDiffusion\automatic\repositories\stable-diffusion-stability-ai / main
22:10:43-055073 DEBUG    Submodule: H:\Programs\StableDiffusion\automatic\repositories\taming-transformers / master
22:10:45-066082 DEBUG    Submodule: H:\Programs\StableDiffusion\automatic\repositories\k-diffusion / master
22:10:48-790598 DEBUG    Submodule: H:\Programs\StableDiffusion\automatic\repositories\BLIP / main
22:10:50-463418 INFO     Verifying submodules
22:11:14-281021 DEBUG    Submodule: extensions-builtin/a1111-sd-webui-lycoris / main
22:11:14-857025 DEBUG    Submodule: extensions-builtin/clip-interrogator-ext / main
22:11:15-746028 DEBUG    Submodule: extensions-builtin/multidiffusion-upscaler-for-automatic1111 / main
22:11:16-642032 DEBUG    Submodule: extensions-builtin/sd-dynamic-thresholding / master
22:11:17-464036 DEBUG    Submodule: extensions-builtin/sd-extension-system-info / main
22:11:18-675542 DEBUG    Submodule: extensions-builtin/sd-webui-agent-scheduler / main
22:11:19-677547 DEBUG    Submodule: extensions-builtin/sd-webui-controlnet / main
22:11:20-437050 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-images-browser / main
22:11:21-479555 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-rembg / master
22:11:22-169059 DEBUG    Submodule: modules/lora / main
22:11:23-304563 DEBUG    Submodule: modules/lycoris / main
22:11:24-173065 DEBUG    Submodule: wiki / master
22:11:24-584567 DEBUG    Installed packages: 181
22:11:24-586068 DEBUG    Extensions all: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora', 'multidiffusion-upscaler-for-automatic1111', 'ScuNET',
                         'sd-dynamic-thresholding', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser',
                         'stable-diffusion-webui-rembg', 'SwinIR']
22:11:24-655067 DEBUG    Running extension installer: H:\Programs\StableDiffusion\automatic\extensions-builtin\clip-interrogator-ext\install.py
22:11:28-771587 INFO     Extension installed packages: clip-interrogator-ext ['clip-interrogator==0.6.0']
22:11:29-117587 DEBUG    Running extension installer: H:\Programs\StableDiffusion\automatic\extensions-builtin\sd-extension-system-info\install.py
22:11:30-272592 DEBUG    Running extension installer: H:\Programs\StableDiffusion\automatic\extensions-builtin\sd-webui-agent-scheduler\install.py
22:11:51-286462 INFO     Extension installed packages: sd-webui-agent-scheduler ['SQLAlchemy==2.0.18', 'greenlet==2.0.2']
22:11:51-288962 DEBUG    Running extension installer: H:\Programs\StableDiffusion\automatic\extensions-builtin\sd-webui-controlnet\install.py
22:12:23-922163 INFO     Extension installed packages: sd-webui-controlnet ['pywin32==306', 'lxml==4.9.3', 'reportlab==4.0.4', 'pycparser==2.21', 'portalocker==2.7.0',
                         'cffi==1.15.1', 'svglib==1.5.1', 'tinycss2==1.2.1', 'mediapipe==0.10.2', 'tabulate==0.9.0', 'cssselect2==0.7.0', 'webencodings==0.5.1',
                         'sounddevice==0.4.6', 'iopath==0.1.9', 'yacs==0.1.8', 'fvcore==0.1.5.post20221221']
22:12:23-925162 DEBUG    Running extension installer: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-images-browser\install.py
22:12:44-908587 INFO     Extension installed packages: stable-diffusion-webui-images-browser ['Send2Trash==1.8.2', 'image-reward==1.5', 'fairscale==0.4.13']
22:12:44-910087 DEBUG    Running extension installer: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\install.py
22:12:54-081626 INFO     Extension installed packages: stable-diffusion-webui-rembg ['rembg==2.0.38', 'pooch==1.7.0', 'PyMatting==1.1.8']
22:12:54-159626 DEBUG    Extensions all: []
22:12:54-161127 INFO     Extensions enabled: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora', 'multidiffusion-upscaler-for-automatic1111', 'ScuNET',
                         'sd-dynamic-thresholding', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser',
                         'stable-diffusion-webui-rembg', 'SwinIR']
22:12:54-162126 INFO     Verifying packages
22:12:54-163126 INFO     Installing package: git+https://github.com/openai/CLIP.git
22:12:54-163626 DEBUG    Running pip: install --upgrade git+https://github.com/openai/CLIP.git
22:13:00-929158 INFO     Installing package: git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
22:13:00-930156 DEBUG    Running pip: install --upgrade git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
22:13:09-278694 INFO     Installing package: onnxruntime==1.15.1
22:13:09-279693 DEBUG    Running pip: install --upgrade onnxruntime==1.15.1
22:13:11-689704 INFO     Installing package: pi-heif
22:13:11-690703 DEBUG    Running pip: install --upgrade pi-heif
22:13:14-169216 DEBUG    Setup complete without errors: 1689365594
22:13:14-185214 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic\extensions-builtin
22:13:14-186218 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic\extensions
22:13:14-341221 DEBUG    Memory used: 0.12 total: 31.91 Collected 0
22:13:14-342716 DEBUG    Starting module: <module 'webui' from 'H:\\Programs\\StableDiffusion\\automatic\\webui.py'>
22:13:14-343715 INFO     Server arguments: ['--use-directml', '--debug', '--reinstall']
22:13:14-353715 DEBUG    Loading Torch
22:13:16-241723 DEBUG    Loading Gradio
22:13:17-360228 DEBUG    Loading Modules
No module 'xformers'. Proceeding without it.
22:13:18-844116 DEBUG    Created default config: H:\Programs\StableDiffusion\automatic\config.json
22:13:18-849117 INFO     Pipeline: Backend.ORIGINAL
22:13:18-851616 DEBUG    Saved styles: H:\Programs\StableDiffusion\automatic\styles.csv 0
22:13:18-854616 DEBUG    Loaded styles: H:\Programs\StableDiffusion\automatic\styles.csv 0
22:13:20-250622 DEBUG    Enumerated samplers: 22
22:13:20-327622 INFO     Libraries loaded
22:13:20-328623 DEBUG    Entering start sequence
22:13:21-153630 DEBUG    Version: {'app': 'sd.next', 'updated': '2023-07-14', 'hash': '14d1136f', 'url': 'https://github.com/vladmandic/automatic.git/tree/master'}
22:13:21-154627 INFO     Using data path: H:\Programs\StableDiffusion\automatic
22:13:21-156626 DEBUG    Event loop: <_WindowsSelectorEventLoop running=False closed=False debug=False>
22:13:21-157628 DEBUG    Entering initialize
22:13:21-159629 INFO     Available VAEs: H:\Programs\StableDiffusion\automatic\models\VAE 0
22:13:21-173126 INFO     Available models: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion 2
22:13:21-214629 DEBUG    Loading scripts
22:13:22-933134 INFO     ControlNet v1.1.232
ControlNet v1.1.232
ControlNet preprocessor location: H:\Programs\StableDiffusion\automatic\extensions-builtin\sd-webui-controlnet\annotator\downloads
22:13:23-031135 INFO     ControlNet v1.1.232
ControlNet v1.1.232
Image Browser: ImageReward is not installed, cannot be used.
22:13:23-142135 ERROR    Module load: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\api.py: ImportError
Module load: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\api.py: ImportError
╭─────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\script_loading.py:13 in load_module                                                                                        │
│                                                                                                                                                                          │
│   12 │   try:                                                                                                                                                            │
│ ❱ 13 │   │   module_spec.loader.exec_module(module)                                                                                                                      │
│   14 │   except Exception as e:                                                                                                                                          │
│ in exec_module:883                                                                                                                                                       │
│                                                                                                                                                                          │
│                                                                         ... 7 frames hidden ...                                                                          │
│                                                                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:55 in <module>                                                                            │
│                                                                                                                                                                          │
│    54                                                                                                                                                                    │
│ ❱  55 _ensure_critical_deps()                                                                                                                                            │
│    56 # END DO NOT MOVE                                                                                                                                                  │
│                                                                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:42 in _ensure_critical_deps                                                               │
│                                                                                                                                                                          │
│    41 │   elif numpy_version > (1, 24):                                                                                                                                  │
│ ❱  42 │   │   raise ImportError("Numba needs NumPy 1.24 or less")                                                                                                        │
│    43 │   try:                                                                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: Numba needs NumPy 1.24 or less
22:13:23-180134 ERROR    Module load: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py: ImportError
Module load: H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py: ImportError
╭─────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\script_loading.py:13 in load_module                                                                                        │
│                                                                                                                                                                          │
│   12 │   try:                                                                                                                                                            │
│ ❱ 13 │   │   module_spec.loader.exec_module(module)                                                                                                                      │
│   14 │   except Exception as e:                                                                                                                                          │
│ in exec_module:883                                                                                                                                                       │
│                                                                                                                                                                          │
│                                                                         ... 7 frames hidden ...                                                                          │
│                                                                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:55 in <module>                                                                            │
│                                                                                                                                                                          │
│    54                                                                                                                                                                    │
│ ❱  55 _ensure_critical_deps()                                                                                                                                            │
│    56 # END DO NOT MOVE                                                                                                                                                  │
│                                                                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\venv\lib\site-packages\numba\__init__.py:42 in _ensure_critical_deps                                                               │
│                                                                                                                                                                          │
│    41 │   elif numpy_version > (1, 24):                                                                                                                                  │
│ ❱  42 │   │   raise ImportError("Numba needs NumPy 1.24 or less")                                                                                                        │
│    43 │   try:                                                                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: Numba needs NumPy 1.24 or less
22:13:23-251635 DEBUG    Scripts load: ['a1111-sd-webui-lycoris:0.875s', 'Lora:0.115s', 'sd-webui-agent-scheduler:0.443s', 'sd-webui-controlnet:0.244s',
                         'stable-diffusion-webui-images-browser:0.103s']
Scripts load: ['a1111-sd-webui-lycoris:0.875s', 'Lora:0.115s', 'sd-webui-agent-scheduler:0.443s', 'sd-webui-controlnet:0.244s', 'stable-diffusion-webui-images-browser:0.103s']
22:13:23-336636 INFO     Loading UI theme: name=black-orange style=Auto
22:13:23-340638 DEBUG    Creating UI
22:13:23-367139 DEBUG    Extra networks: checkpoints items=2 subdirs=0
22:13:23-370138 DEBUG    Extra networks: lora items=3 subdirs=0
22:13:24-098138 DEBUG    Script: 0.41s ui_tabs H:\Programs\StableDiffusion\automatic\extensions-builtin\stable-diffusion-webui-images-browser\scripts\image_browser.py
22:13:24-100639 DEBUG    Extensions list failed to load: H:\Programs\StableDiffusion\automatic\html\extensions.json
Running on local URL:  http://127.0.0.1:7860
22:13:29-994666 INFO     Local URL: http://127.0.0.1:7860/
22:13:29-996166 DEBUG    Gradio registered functions: 1666
22:13:29-997166 INFO     Initializing middleware
22:13:30-000165 DEBUG    Creating API
22:13:30-094665 INFO     [AgentScheduler] Task queue is empty
22:13:30-095665 INFO     [AgentScheduler] Registering APIs
22:13:30-179166 DEBUG    Scripts setup: ['Tiled Diffusion:0.019s', 'ControlNet:0.011s', 'Alternative:0.008s']
22:13:30-180165 DEBUG    Scripts components: []
22:13:30-183164 INFO     Model metadata saved: H:\Programs\StableDiffusion\automatic\metadata.json 5
22:13:30-184665 WARNING  Selected checkpoint not found: model.ckpt
22:13:30-185665 DEBUG    Select checkpoint: reliberate_v10.safetensors
22:13:30-186665 DEBUG    Load model weights: existing=False target=H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\reliberate_v10.safetensors info=None
22:13:30-373166 DEBUG    gc: collected=10272 device=privateuseone:0 {'ram': {'used': 0.53, 'total': 31.91}}
Loading weights: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\reliberate_v10.safetensors ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/2.1 GB -:--:--
22:13:30-626668 DEBUG    Load model: name=H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\reliberate_v10.safetensors dict=True
22:13:30-627668 DEBUG    Verifying Torch settings
22:13:30-684168 DEBUG    Torch FP16 test passed
22:13:30-685668 INFO     Torch override dtype: no-half set
22:13:30-686668 INFO     Torch override VAE dtype: no-half set
22:13:30-687168 DEBUG    Desired Torch parameters: dtype=FP16 no-half=True no-half-vae=True upscast=False
22:13:30-688669 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
22:13:30-689669 DEBUG    Torch default device: privateuseone:0
22:13:30-690668 DEBUG    Model dict loaded: {'ram': {'used': 0.54, 'total': 31.91}}
22:13:30-701168 DEBUG    Model config loaded: {'ram': {'used': 0.54, 'total': 31.91}}
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
22:13:41-112214 ERROR    Failed to load stable diffusion model
22:13:41-138214 ERROR    loading stable diffusion model: JSONDecodeError
╭─────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\sd_models.py:494 in get_sd_model                                                                                           │
│                                                                                                                                                                          │
│    493 │   │   │   │   │   if shared.backend == shared.Backend.ORIGINAL:                                                                                                 │
│ ❱  494 │   │   │   │   │   │   reload_model_weights(op='model')                                                                                                          │
│    495 │   │   │   │   │   elif shared.backend == shared.Backend.DIFFUSERS:                                                                                              │
│                                                                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\modules\sd_models.py:1003 in reload_model_weights                                                                                  │
│                                                                                                                                                                          │
│   1002 │   │   if shared.backend == shared.Backend.ORIGINAL:                                                                                                             │
│ ❱ 1003 │   │   │   load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=time                                                                          │
│   1004 │   │   else:                                                                                                                                                     │
│                                                                                                                                                                          │
│                                                                         ... 10 frames hidden ...                                                                         │
│                                                                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:337 in decode                                                                                │
│                                                                                                                                                                          │
│   336 │   │   """                                                                                                                                                        │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                                                          │
│   338 │   │   end = _w(s, end).end()                                                                                                                                     │
│                                                                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:355 in raw_decode                                                                            │
│                                                                                                                                                                          │
│   354 │   │   except StopIteration as err:                                                                                                                               │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                                                       │
│   356 │   │   return obj, end                                                                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
22:13:43-745725 DEBUG    gc: collected=37405 device=privateuseone:0 {'ram': {'used': 0.33, 'total': 31.91}}
22:13:43-750224 INFO     Startup time: 29.4s (torch=1.9s gradio=1.1s libraries=3.0s vae=0.8s scripts=2.0s onchange=0.1s ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s
                         ui-extensions=6.2s ui-defaults=0.1s launch=0.2s app-started=0.2s checkpoint=13.6s)
22:13:59-870261 DEBUG    Server alive=True Requests=2 memory used: 0.33 total: 31.91
22:15:59-731709 DEBUG    Server alive=True Requests=2 memory used: 0.33 total: 31.91
22:17:59-588748 DEBUG    Server alive=True Requests=2 memory used: 0.33 total: 31.91
22:20:00-454133 DEBUG    Server alive=True Requests=2 memory used: 0.32 total: 31.91
22:22:00-298917 DEBUG    Server alive=True Requests=2 memory used: 0.3 total: 31.91
22:24:00-115260 DEBUG    Server alive=True Requests=2 memory used: 0.3 total: 31.91
22:25:59-974548 DEBUG    Server alive=True Requests=2 memory used: 0.29 total: 31.91
22:27:59-800840 DEBUG    Server alive=True Requests=2 memory used: 0.29 total: 31.91
22:28:37-309844 DEBUG    Select checkpoint: model v1-5-pruned-emaonly.safetensors
22:28:37-310843 DEBUG    Load model weights: existing=False target=H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors info=None
22:28:37-567845 DEBUG    gc: collected=955 device=privateuseone:0 {'ram': {'used': 0.35, 'total': 31.91}}
Loading weights: H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/4.3 GB -:--:--
22:28:37-853509 DEBUG    Load model: name=H:\Programs\StableDiffusion\automatic\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors dict=True
22:28:37-854508 DEBUG    Verifying Torch settings
22:28:37-899484 DEBUG    Torch FP16 test passed
22:28:37-901675 INFO     Torch override dtype: no-half set
22:28:37-902176 INFO     Torch override VAE dtype: no-half set
22:28:37-903176 DEBUG    Desired Torch parameters: dtype=FP16 no-half=True no-half-vae=True upscast=False
22:28:37-904176 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
22:28:37-905179 DEBUG    Torch default device: privateuseone:0
22:28:37-906676 DEBUG    Model dict loaded: {'ram': {'used': 0.36, 'total': 31.91}}
22:28:37-916677 DEBUG    Model config loaded: {'ram': {'used': 0.36, 'total': 31.91}}
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
22:28:48-196722 ERROR    changing setting sd_model_checkpoint to v1-5-pruned-emaonly.safetensors: JSONDecodeError
╭─────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic\modules\shared.py:637 in set                                                                                                       │
│                                                                                                                                                                          │
│   636 │   │   │   try:                                                                                                                                                   │
│ ❱ 637 │   │   │   │   self.data_labels[key].onchange()                                                                                                                   │
│   638 │   │   │   except Exception as e:                                                                                                                                 │
│                                                                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic\modules\call_queue.py:16 in f                                                                                                      │
│                                                                                                                                                                          │
│    15 │   │   with queue_lock:                                                                                                                                           │
│ ❱  16 │   │   │   res = func(*args, **kwargs)                                                                                                                            │
│    17 │   │   return res                                                                                                                                                 │
│                                                                                                                                                                          │
│                                                                         ... 12 frames hidden ...                                                                         │
│                                                                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:337 in decode                                                                                │
│                                                                                                                                                                          │
│   336 │   │   """                                                                                                                                                        │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                                                          │
│   338 │   │   end = _w(s, end).end()                                                                                                                                     │
│                                                                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:355 in raw_decode                                                                            │
│                                                                                                                                                                          │
│   354 │   │   except StopIteration as err:                                                                                                                               │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                                                                       │
│   356 │   │   return obj, end                                                                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Neoony commented 1 year ago

Also just cloning to a completely new folder and running --use-directml --debug with default model

Same issue

Any ideas? :/


Using VENV: H:\Programs\StableDiffusion\automatic2\venv
22:39:47-729011 INFO     Starting SD.Next
22:39:47-733511 INFO     Python 3.10.9 on Windows
22:39:48-216014 INFO     Version: a77a6690 Fri Jul 14 15:43:30 2023 -0400
22:39:48-441515 DEBUG    Setting environment tuning
22:39:48-442515 DEBUG    Torch overrides: cuda=False rocm=False ipex=False diml=True
22:39:48-443515 DEBUG    Torch allowed: cuda=False rocm=False ipex=False diml=True
22:39:48-444515 INFO     Using DirectML Backend
22:39:48-445015 DEBUG    Package version not found: torch
22:39:48-446015 DEBUG    Package version not found: torchvision
22:39:48-447015 INFO     Installing package: torch-directml
22:39:48-447515 DEBUG    Running pip: install --upgrade torch-directml
22:40:29-416196 DEBUG    Package version not found: torch
22:40:29-418698 DEBUG    Package version not found: torchvision
22:40:29-419697 INFO     Installing package: torch-directml
22:40:29-420696 DEBUG    Running pip: install --upgrade torch-directml
22:40:47-840798 INFO     Torch 2.0.0+cpu
22:40:47-904299 INFO     Torch backend: DirectML (torch-directml 0.2.0.dev230426)
22:40:48-100800 INFO     Torch detected GPU: AMD Radeon RX 7900 XTX
22:40:48-102300 DEBUG    Package version not found: tensorflow
22:40:48-102800 INFO     Installing package: tensorflow==2.12.0
22:40:48-103800 DEBUG    Running pip: install --upgrade tensorflow==2.12.0
22:41:22-345450 DEBUG    Repository update time: Fri Jul 14 21:43:30 2023
22:41:22-347950 INFO     Verifying requirements
22:41:22-348950 DEBUG    Package version not found: addict
22:41:22-349450 INFO     Installing package: addict
22:41:22-350451 DEBUG    Running pip: install --upgrade addict
22:41:23-973458 DEBUG    Package version not found: aenum
22:41:23-974957 INFO     Installing package: aenum
22:41:23-975458 DEBUG    Running pip: install --upgrade aenum
22:41:25-694966 DEBUG    Package version not found: aiohttp
22:41:25-695966 INFO     Installing package: aiohttp
22:41:25-696965 DEBUG    Running pip: install --upgrade aiohttp
22:41:57-845551 DEBUG    Package version not found: anyio
22:41:57-847051 INFO     Installing package: anyio
22:41:57-848050 DEBUG    Running pip: install --upgrade anyio
22:41:59-646060 DEBUG    Package version not found: appdirs
22:41:59-648059 INFO     Installing package: appdirs
22:41:59-649060 DEBUG    Running pip: install --upgrade appdirs
22:42:16-075028 DEBUG    Package version not found: astunparse
22:42:16-076028 INFO     Installing package: astunparse
22:42:16-076528 DEBUG    Running pip: install --upgrade astunparse
22:42:17-819039 DEBUG    Package version not found: bitsandbytes
22:42:17-820538 INFO     Installing package: bitsandbytes
22:42:17-821536 DEBUG    Running pip: install --upgrade bitsandbytes
22:42:36-434422 DEBUG    Package version not found: blendmodes
22:42:36-435422 INFO     Installing package: blendmodes
22:42:36-436422 DEBUG    Running pip: install --upgrade blendmodes
22:42:38-843933 DEBUG    Package version not found: clean-fid
22:42:38-844933 INFO     Installing package: clean-fid
22:42:38-845934 DEBUG    Running pip: install --upgrade clean-fid
22:42:46-652966 DEBUG    Package version not found: easydev
22:42:46-653966 INFO     Installing package: easydev
22:42:46-655466 DEBUG    Running pip: install --upgrade easydev
22:43:03-749395 DEBUG    Package version not found: extcolors
22:43:03-750394 INFO     Installing package: extcolors
22:43:03-751896 DEBUG    Running pip: install --upgrade extcolors
22:43:20-443177 DEBUG    Package version not found: facexlib
22:43:20-444176 INFO     Installing package: facexlib
22:43:20-445177 DEBUG    Running pip: install --upgrade facexlib
22:43:31-650226 DEBUG    Package version not found: filetype
22:43:31-651226 INFO     Installing package: filetype
22:43:31-652726 DEBUG    Running pip: install --upgrade filetype
22:43:48-492481 DEBUG    Package version not found: future
22:43:48-493479 INFO     Installing package: future
22:43:48-494480 DEBUG    Running pip: install --upgrade future
22:43:51-131491 DEBUG    Package version not found: gdown
22:43:51-132992 INFO     Installing package: gdown
22:43:51-133990 DEBUG    Running pip: install --upgrade gdown
22:44:08-112446 DEBUG    Package version not found: gfpgan
22:44:08-113947 INFO     Installing package: gfpgan
22:44:08-114946 DEBUG    Running pip: install --upgrade gfpgan
22:44:33-052379 DEBUG    Package version not found: GitPython
22:44:33-053876 INFO     Installing package: GitPython
22:44:33-054875 DEBUG    Running pip: install --upgrade GitPython
22:44:50-645953 DEBUG    Package version not found: httpcore
22:44:50-646953 INFO     Installing package: httpcore
22:44:50-647954 DEBUG    Running pip: install --upgrade httpcore
22:45:07-787748 DEBUG    Package version not found: inflection
22:45:07-789248 INFO     Installing package: inflection
22:45:07-789747 DEBUG    Running pip: install --upgrade inflection
22:45:24-780472 DEBUG    Package version not found: jsonmerge
22:45:24-781472 INFO     Installing package: jsonmerge
22:45:24-781972 DEBUG    Running pip: install --upgrade jsonmerge
22:45:27-076118 DEBUG    Package version not found: kornia
22:45:27-077119 INFO     Installing package: kornia
22:45:27-078119 DEBUG    Running pip: install --upgrade kornia
22:45:30-326133 DEBUG    Package version not found: lark
22:45:30-327632 INFO     Installing package: lark
22:45:30-329131 DEBUG    Running pip: install --upgrade lark
22:45:47-529706 DEBUG    Package version not found: lmdb
22:45:47-530707 INFO     Installing package: lmdb
22:45:47-531707 DEBUG    Running pip: install --upgrade lmdb
22:45:49-560714 DEBUG    Package version not found: lpips
22:45:49-561714 INFO     Installing package: lpips
22:45:49-562214 DEBUG    Running pip: install --upgrade lpips
22:45:51-553725 DEBUG    Package version not found: omegaconf
22:45:51-555226 INFO     Installing package: omegaconf
22:45:51-556225 DEBUG    Running pip: install --upgrade omegaconf
22:46:09-360547 DEBUG    Package version not found: open-clip-torch
22:46:09-362047 INFO     Installing package: open-clip-torch
22:46:09-363047 DEBUG    Running pip: install --upgrade open-clip-torch
22:46:14-801571 DEBUG    Package version not found: opencv-contrib-python
22:46:14-803570 INFO     Installing package: opencv-contrib-python
22:46:14-804570 DEBUG    Running pip: install --upgrade opencv-contrib-python
22:46:32-425592 DEBUG    Package version not found: piexif
22:46:32-427593 INFO     Installing package: piexif
22:46:32-428592 DEBUG    Running pip: install --upgrade piexif
22:46:49-939969 DEBUG    Package version not found: psutil
22:46:49-940969 INFO     Installing package: psutil
22:46:49-941969 DEBUG    Running pip: install --upgrade psutil
22:47:07-050429 DEBUG    Package version not found: pyyaml
22:47:07-051429 INFO     Installing package: pyyaml
22:47:07-052929 DEBUG    Running pip: install --upgrade pyyaml
22:47:24-505095 DEBUG    Package version not found: realesrgan
22:47:24-506095 INFO     Installing package: realesrgan
22:47:24-507097 DEBUG    Running pip: install --upgrade realesrgan
22:47:26-652105 DEBUG    Package version not found: resize-right
22:47:26-653605 INFO     Installing package: resize-right
22:47:26-654605 DEBUG    Running pip: install --upgrade resize-right
22:47:43-489770 DEBUG    Package version not found: rich
22:47:43-491268 INFO     Installing package: rich
22:47:43-492268 DEBUG    Running pip: install --upgrade rich
22:48:00-674622 DEBUG    Package version not found: safetensors
22:48:00-676123 INFO     Installing package: safetensors
22:48:00-676623 DEBUG    Running pip: install --upgrade safetensors
22:48:02-935134 DEBUG    Package version not found: scipy
22:48:02-936136 INFO     Installing package: scipy
22:48:02-936636 DEBUG    Running pip: install --upgrade scipy
22:48:20-032295 DEBUG    Package version not found: tb_nightly
22:48:20-033796 INFO     Installing package: tb_nightly
22:48:20-034795 DEBUG    Running pip: install --upgrade tb_nightly
22:48:22-250804 DEBUG    Package version not found: toml
22:48:22-251804 INFO     Installing package: toml
22:48:22-252804 DEBUG    Running pip: install --upgrade toml
22:48:24-314815 DEBUG    Package version not found: torchdiffeq
22:48:24-315814 INFO     Installing package: torchdiffeq
22:48:24-317314 DEBUG    Running pip: install --upgrade torchdiffeq
22:48:41-611835 DEBUG    Package version not found: torchsde
22:48:41-612835 INFO     Installing package: torchsde
22:48:41-613836 DEBUG    Running pip: install --upgrade torchsde
22:48:59-134125 DEBUG    Package version not found: voluptuous
22:48:59-135627 INFO     Installing package: voluptuous
22:48:59-136124 DEBUG    Running pip: install --upgrade voluptuous
22:49:16-290092 DEBUG    Package version not found: yapf
22:49:16-291092 INFO     Installing package: yapf
22:49:16-292092 DEBUG    Running pip: install --upgrade yapf
22:49:33-243632 DEBUG    Package version not found: scikit-image
22:49:33-245133 INFO     Installing package: scikit-image
22:49:33-245632 DEBUG    Running pip: install --upgrade scikit-image
22:49:35-540143 DEBUG    Package version not found: basicsr
22:49:35-541643 INFO     Installing package: basicsr
22:49:35-542642 DEBUG    Running pip: install --upgrade basicsr
22:49:52-453025 DEBUG    Package version not found: compel
22:49:52-454023 INFO     Installing package: compel
22:49:52-454523 DEBUG    Running pip: install --upgrade compel
22:50:04-312575 DEBUG    Package version not found: antlr4-python3-runtime
22:50:04-315075 INFO     Installing package: antlr4-python3-runtime==4.9.3
22:50:04-317576 DEBUG    Running pip: install --upgrade antlr4-python3-runtime==4.9.3
22:50:21-751308 DEBUG    Package version not found: pydantic
22:50:21-752809 INFO     Installing package: pydantic==1.10.11
22:50:21-753808 DEBUG    Running pip: install --upgrade pydantic==1.10.11
22:50:39-266744 DEBUG    Package version not found: tqdm
22:50:39-268743 INFO     Installing package: tqdm==4.65.0
22:50:39-270242 DEBUG    Running pip: install --upgrade tqdm==4.65.0
22:50:41-845756 DEBUG    Package version not found: accelerate
22:50:41-847253 INFO     Installing package: accelerate==0.20.3
22:50:41-848254 DEBUG    Running pip: install --upgrade accelerate==0.20.3
22:50:59-356017 DEBUG    Package version not found: opencv-python
22:50:59-357018 INFO     Installing package: opencv-python==4.7.0.72
22:50:59-358519 DEBUG    Running pip: install --upgrade opencv-python==4.7.0.72
22:51:17-814557 DEBUG    Package version not found: diffusers
22:51:17-815559 INFO     Installing package: diffusers==0.18.2
22:51:17-816557 DEBUG    Running pip: install --upgrade diffusers==0.18.2
22:51:35-080114 DEBUG    Package version not found: einops
22:51:35-081115 INFO     Installing package: einops==0.4.1
22:51:35-082114 DEBUG    Running pip: install --upgrade einops==0.4.1
22:51:37-560626 DEBUG    Package version not found: gradio
22:51:37-562126 INFO     Installing package: gradio==3.32.0
22:51:37-563126 DEBUG    Running pip: install --upgrade gradio==3.32.0
22:52:09-306505 DEBUG    Package version not found: numexpr
22:52:09-308005 INFO     Installing package: numexpr==2.8.4
22:52:09-309005 DEBUG    Running pip: install --upgrade numexpr==2.8.4
22:52:27-051477 WARNING  Package wrong version: numpy 1.25.1 required 1.23.5
22:52:27-052977 INFO     Installing package: numpy==1.23.5
22:52:27-054477 DEBUG    Running pip: install --upgrade numpy==1.23.5
22:52:44-965414 DEBUG    Package version not found: numba
22:52:44-967414 INFO     Installing package: numba==0.57.0
22:52:44-968414 DEBUG    Running pip: install --upgrade numba==0.57.0
22:53:08-305795 DEBUG    Package version not found: pandas
22:53:08-307297 INFO     Installing package: pandas==1.5.3
22:53:08-308296 DEBUG    Running pip: install --upgrade pandas==1.5.3
22:53:39-248631 DEBUG    Package version not found: protobuf
22:53:39-250132 INFO     Installing package: protobuf==3.20.3
22:53:39-251632 DEBUG    Running pip: install --upgrade protobuf==3.20.3
22:53:56-679152 DEBUG    Package version not found: pytorch_lightning
22:53:56-680153 INFO     Installing package: pytorch_lightning==1.9.4
22:53:56-681153 DEBUG    Running pip: install --upgrade pytorch_lightning==1.9.4
22:54:16-606369 DEBUG    Package version not found: transformers
22:54:16-607869 INFO     Installing package: transformers==4.30.2
22:54:16-608869 DEBUG    Running pip: install --upgrade transformers==4.30.2
22:54:34-067684 DEBUG    Package version not found: tomesd
22:54:34-069184 INFO     Installing package: tomesd==0.1.3
22:54:34-069684 DEBUG    Running pip: install --upgrade tomesd==0.1.3
22:54:37-788200 WARNING  Package wrong version: urllib3 2.0.3 required 1.26.15
22:54:37-790200 INFO     Installing package: urllib3==1.26.15
22:54:37-791200 DEBUG    Running pip: install --upgrade urllib3==1.26.15
22:54:40-557714 WARNING  Package wrong version: Pillow 10.0.0 required 9.5.0
22:54:40-559214 INFO     Installing package: Pillow==9.5.0
22:54:40-560215 DEBUG    Running pip: install --upgrade Pillow==9.5.0
22:54:58-240791 DEBUG    Package version not found: timm
22:54:58-242292 INFO     Installing package: timm==0.6.13
22:54:58-243291 DEBUG    Running pip: install --upgrade timm==0.6.13
22:55:17-550244 INFO     Verifying packages
22:55:17-551745 DEBUG    Package version not found: clip
22:55:17-552745 INFO     Installing package: git+https://github.com/openai/CLIP.git
22:55:17-555246 DEBUG    Running pip: install --upgrade git+https://github.com/openai/CLIP.git
22:55:56-709191 DEBUG    Package version not found: invisible-watermark
22:55:56-710192 INFO     Installing package:
                         git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
22:55:56-710692 DEBUG    Running pip: install --upgrade
                         git+https://github.com/patrickvonplaten/invisible-watermark.git@remove_onnxruntime_depedency
22:56:22-876385 DEBUG    Package version not found: onnxruntime
22:56:22-877886 INFO     Installing package: onnxruntime==1.15.1
22:56:22-879386 DEBUG    Running pip: install --upgrade onnxruntime==1.15.1
22:56:27-212905 DEBUG    Package version not found: pi_heif
22:56:27-213905 INFO     Installing package: pi-heif
22:56:27-214905 DEBUG    Running pip: install --upgrade pi-heif
22:56:44-890179 INFO     Verifying repositories
22:56:44-893179 INFO     Cloning repository: https://github.com/Stability-AI/stablediffusion.git
22:57:06-009772 INFO     Cloning repository: https://github.com/CompVis/taming-transformers.git
22:57:27-431805 INFO     Cloning repository: https://github.com/crowsonkb/k-diffusion.git
22:57:28-897811 INFO     Cloning repository: https://github.com/sczhou/CodeFormer.git
22:57:31-712324 INFO     Cloning repository: https://github.com/salesforce/BLIP.git
22:57:34-098835 INFO     Verifying submodules
22:57:54-682424 DEBUG    Submodule: extensions-builtin/a1111-sd-webui-lycoris / main
22:57:55-231927 DEBUG    Submodule: extensions-builtin/clip-interrogator-ext / main
22:57:55-868430 DEBUG    Submodule: extensions-builtin/multidiffusion-upscaler-for-automatic1111 / main
22:57:56-484932 DEBUG    Submodule: extensions-builtin/sd-dynamic-thresholding / master
22:57:57-049935 DEBUG    Submodule: extensions-builtin/sd-extension-system-info / main
22:57:57-814438 DEBUG    Submodule: extensions-builtin/sd-webui-agent-scheduler / main
22:57:58-482441 DEBUG    Submodule: extensions-builtin/sd-webui-controlnet / main
22:57:59-836448 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-images-browser / main
22:58:01-033453 DEBUG    Submodule: extensions-builtin/stable-diffusion-webui-rembg / master
22:58:01-740955 DEBUG    Submodule: modules/lora / main
22:58:02-516959 DEBUG    Submodule: modules/lycoris / main
22:58:03-339463 DEBUG    Submodule: wiki / master
22:58:03-686964 DEBUG    Installed packages: 181
22:58:03-688464 DEBUG    Extensions all: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora',
                         'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
22:58:03-768464 DEBUG    Running extension installer:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\clip-interrogator-ext\install.py
22:58:07-887982 INFO     Extension installed packages: clip-interrogator-ext ['clip-interrogator==0.6.0']
22:58:08-232984 DEBUG    Running extension installer:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\sd-extension-system-info\install.py
22:58:09-359488 DEBUG    Running extension installer:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\sd-webui-agent-scheduler\install.py
22:58:30-310170 INFO     Extension installed packages: sd-webui-agent-scheduler ['SQLAlchemy==2.0.18', 'greenlet==2.0.2']
22:58:30-311669 DEBUG    Running extension installer:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\sd-webui-controlnet\install.py
22:59:02-506590 INFO     Extension installed packages: sd-webui-controlnet ['pywin32==306', 'lxml==4.9.3',
                         'reportlab==4.0.4', 'pycparser==2.21', 'portalocker==2.7.0', 'cffi==1.15.1', 'svglib==1.5.1',
                         'tinycss2==1.2.1', 'mediapipe==0.10.2', 'tabulate==0.9.0', 'cssselect2==0.7.0',
                         'webencodings==0.5.1', 'sounddevice==0.4.6', 'iopath==0.1.9', 'yacs==0.1.8',
                         'fvcore==0.1.5.post20221221']
22:59:02-510091 DEBUG    Running extension installer:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-images-browser\ins
                         tall.py
22:59:28-534281 INFO     Extension installed packages: stable-diffusion-webui-images-browser ['pyarrow==12.0.1',
                         'xxhash==3.2.0', 'datasets==2.13.1', 'Send2Trash==1.8.2', 'image-reward==1.5',
                         'multiprocess==0.70.14', 'fairscale==0.4.13', 'dill==0.3.6']
22:59:28-537279 DEBUG    Running extension installer:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-rembg\install.py
22:59:53-221434 INFO     Extension installed packages: stable-diffusion-webui-rembg ['rembg==2.0.38', 'pooch==1.7.0',
                         'PyMatting==1.1.8']
22:59:53-305434 DEBUG    Extensions all: []
22:59:53-306434 INFO     Extensions enabled: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora',
                         'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
22:59:53-307935 INFO     Verifying packages
22:59:53-310434 DEBUG    Setup complete without errors: 1689368393
22:59:53-366435 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic2\extensions-builtin
22:59:53-367935 INFO     Extension preload: 0.0s H:\Programs\StableDiffusion\automatic2\extensions
22:59:53-460435 DEBUG    Memory used: 0.08 total: 31.91 Collected 0
22:59:53-461935 DEBUG    Starting module: <module 'webui' from 'H:\\Programs\\StableDiffusion\\automatic2\\webui.py'>
22:59:53-462935 INFO     Server arguments: ['--use-directml', '--debug']
22:59:53-473936 DEBUG    Loading Torch
22:59:55-502447 DEBUG    Loading Gradio
22:59:56-733949 DEBUG    Loading Modules
No module 'xformers'. Proceeding without it.
22:59:58-414955 DEBUG    Created default config: H:\Programs\StableDiffusion\automatic2\config.json
22:59:58-416955 INFO     Pipeline: Backend.ORIGINAL
22:59:58-419955 DEBUG    Saved styles: H:\Programs\StableDiffusion\automatic2\styles.csv 0
22:59:58-423455 DEBUG    Loaded styles: H:\Programs\StableDiffusion\automatic2\styles.csv 0
22:59:59-862963 DEBUG    Enumerated samplers: 22
23:00:00-009465 INFO     Libraries loaded
23:00:00-010966 DEBUG    Entering start sequence
23:00:01-081469 DEBUG    Version: {'app': 'sd.next', 'updated': '2023-07-14', 'hash': 'a77a6690', 'url':
                         'https://github.com/vladmandic/automatic.git/tree/master'}
23:00:01-082969 INFO     Using data path: H:\Programs\StableDiffusion\automatic2
23:00:07-967999 DEBUG    Event loop: <_WindowsSelectorEventLoop running=False closed=False debug=False>
23:00:07-969499 DEBUG    Entering initialize
23:00:07-977498 INFO     Available VAEs: H:\Programs\StableDiffusion\automatic2\models\VAE 0
23:00:07-980999 INFO     Available models: H:\Programs\StableDiffusion\automatic2\models\Stable-diffusion 0
Download the default model? (y/N) y
Downloading: "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" to H:\Programs\StableDiffusion\automatic2\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors

100.0%
23:02:01-139430 DEBUG    Loading scripts
23:02:03-649943 INFO     ControlNet v1.1.232
ControlNet v1.1.232
ControlNet preprocessor location: H:\Programs\StableDiffusion\automatic2\extensions-builtin\sd-webui-controlnet\annotator\downloads
23:02:03-797943 INFO     ControlNet v1.1.232
ControlNet v1.1.232
Image Browser: Creating database
Image Browser: Database created
23:02:04-226944 ERROR    Module load:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-rembg\scripts\api.
                         py: ImportError
Module load: H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-rembg\scripts\api.py: ImportError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic2\modules\script_loading.py:13 in load_module                                       │
│                                                                                                                          │
│   12 │   try:                                                                                                            │
│ ❱ 13 │   │   module_spec.loader.exec_module(module)                                                                      │
│   14 │   except Exception as e:                                                                                          │
│ in exec_module:883                                                                                                       │
│                                                                                                                          │
│                                                 ... 7 frames hidden ...                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic2\venv\lib\site-packages\numba\__init__.py:55 in <module>                           │
│                                                                                                                          │
│    54                                                                                                                    │
│ ❱  55 _ensure_critical_deps()                                                                                            │
│    56 # END DO NOT MOVE                                                                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic2\venv\lib\site-packages\numba\__init__.py:42 in _ensure_critical_deps              │
│                                                                                                                          │
│    41 │   elif numpy_version > (1, 24):                                                                                  │
│ ❱  42 │   │   raise ImportError("Numba needs NumPy 1.24 or less")                                                        │
│    43 │   try:                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: Numba needs NumPy 1.24 or less
23:02:04-269446 ERROR    Module load:
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-rembg\scripts\post
                         processing_rembg.py: ImportError
Module load: H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py: ImportError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic2\modules\script_loading.py:13 in load_module                                       │
│                                                                                                                          │
│   12 │   try:                                                                                                            │
│ ❱ 13 │   │   module_spec.loader.exec_module(module)                                                                      │
│   14 │   except Exception as e:                                                                                          │
│ in exec_module:883                                                                                                       │
│                                                                                                                          │
│                                                 ... 7 frames hidden ...                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic2\venv\lib\site-packages\numba\__init__.py:55 in <module>                           │
│                                                                                                                          │
│    54                                                                                                                    │
│ ❱  55 _ensure_critical_deps()                                                                                            │
│    56 # END DO NOT MOVE                                                                                                  │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic2\venv\lib\site-packages\numba\__init__.py:42 in _ensure_critical_deps              │
│                                                                                                                          │
│    41 │   elif numpy_version > (1, 24):                                                                                  │
│ ❱  42 │   │   raise ImportError("Numba needs NumPy 1.24 or less")                                                        │
│    43 │   try:                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: Numba needs NumPy 1.24 or less
23:02:04-359444 DEBUG    Scripts load: ['a1111-sd-webui-lycoris:1.213s', 'Lora:0.156s', 'sd-extension-system-info:0.058s',
                         'sd-webui-agent-scheduler:0.662s', 'sd-webui-controlnet:0.367s',
                         'stable-diffusion-webui-images-browser:0.411s', 'stable-diffusion-webui-rembg:0.059s']
Scripts load: ['a1111-sd-webui-lycoris:1.213s', 'Lora:0.156s', 'sd-extension-system-info:0.058s', 'sd-webui-agent-scheduler:0.662s', 'sd-webui-controlnet:0.367s', 'stable-diffusion-webui-images-browser:0.411s', 'stable-diffusion-webui-rembg:0.059s']
23:02:04-472946 INFO     Loading UI theme: name=black-orange style=Auto
23:02:04-483946 DEBUG    Creating UI
23:02:04-511945 DEBUG    Extra networks: checkpoints items=1 subdirs=0
23:02:05-520950 DEBUG    Script: 0.47s ui_tabs
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\stable-diffusion-webui-images-browser\scr
                         ipts\image_browser.py
23:02:05-525450 DEBUG    Extensions list failed to load: H:\Programs\StableDiffusion\automatic2\html\extensions.json
Running on local URL:  http://127.0.0.1:7860
23:02:11-805979 INFO     Local URL: http://127.0.0.1:7860/
23:02:11-807477 DEBUG    Gradio registered functions: 1663
23:02:11-808478 INFO     Initializing middleware
23:02:11-811979 DEBUG    Creating API
23:02:11-915980 INFO     [AgentScheduler] Task queue is empty
23:02:11-916978 INFO     [AgentScheduler] Registering APIs
23:02:12-197479 DEBUG    Script: 0.23s app_started
                         H:\Programs\StableDiffusion\automatic2\extensions-builtin\sd-webui-agent-scheduler\scripts\task_sch
                         eduler.py
23:02:12-198479 DEBUG    Scripts setup: ['Tiled Diffusion:0.02s', 'ControlNet:0.011s', 'Alternative:0.008s']
23:02:12-199479 DEBUG    Scripts components: []
23:02:12-202980 INFO     Model metadata saved: H:\Programs\StableDiffusion\automatic2\metadata.json 1
23:02:12-204479 DEBUG    Select checkpoint: model v1-5-pruned-emaonly.safetensors
23:02:12-205479 DEBUG    Load model weights: existing=False
                         target=H:\Programs\StableDiffusion\automatic2\models\Stable-diffusion\v1-5-pruned-emaonly.safetenso
                         rs info=None
23:02:12-402980 DEBUG    gc: collected=2450 device=privateuseone:0 {'ram': {'used': 0.49, 'total': 31.91}}
Loading weights: H:\Programs\StableDiffusion\automatic2\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors ━━━ 0.… -:-…
                                                                                                                    GB
23:02:12-695983 DEBUG    Load model:
                         name=H:\Programs\StableDiffusion\automatic2\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
                         dict=True
23:02:12-696982 DEBUG    Verifying Torch settings
23:02:12-794483 DEBUG    Torch FP16 test passed
23:02:12-796982 INFO     Torch override dtype: no-half set
23:02:12-797982 INFO     Torch override VAE dtype: no-half set
23:02:12-798982 DEBUG    Desired Torch parameters: dtype=FP16 no-half=True no-half-vae=True upscast=False
23:02:12-799481 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
23:02:12-800482 DEBUG    Torch default device: privateuseone:0
23:02:12-801482 DEBUG    Model dict loaded: {'ram': {'used': 0.51, 'total': 31.91}}
23:02:12-812482 DEBUG    Model config loaded: {'ram': {'used': 0.51, 'total': 31.91}}
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
23:02:22-137523 ERROR    Failed to load stable diffusion model
23:02:22-204523 ERROR    loading stable diffusion model: JSONDecodeError
╭─────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────╮
│ H:\Programs\StableDiffusion\automatic2\modules\sd_models.py:494 in get_sd_model                                          │
│                                                                                                                          │
│    493 │   │   │   │   │   if shared.backend == shared.Backend.ORIGINAL:                                                 │
│ ❱  494 │   │   │   │   │   │   reload_model_weights(op='model')                                                          │
│    495 │   │   │   │   │   elif shared.backend == shared.Backend.DIFFUSERS:                                              │
│                                                                                                                          │
│ H:\Programs\StableDiffusion\automatic2\modules\sd_models.py:1003 in reload_model_weights                                 │
│                                                                                                                          │
│   1002 │   │   if shared.backend == shared.Backend.ORIGINAL:                                                             │
│ ❱ 1003 │   │   │   load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=time                          │
│   1004 │   │   else:                                                                                                     │
│                                                                                                                          │
│                                                 ... 10 frames hidden ...                                                 │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:337 in decode                                │
│                                                                                                                          │
│   336 │   │   """                                                                                                        │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                          │
│   338 │   │   end = _w(s, end).end()                                                                                     │
│                                                                                                                          │
│ C:\Users\Neoony\AppData\Local\Programs\Python\Python310\lib\json\decoder.py:355 in raw_decode                            │
│                                                                                                                          │
│   354 │   │   except StopIteration as err:                                                                               │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                       │
│   356 │   │   return obj, end                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
23:02:32-243567 DEBUG    gc: collected=37419 device=privateuseone:0 {'ram': {'used': 0.28, 'total': 31.91}}
23:02:32-252568 INFO     Startup time: 158.8s (torch=2.0s gradio=1.2s libraries=3.3s vae=8.0s models=113.0s codeformer=0.1s
                         scripts=3.2s onchange=0.1s ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.3s ui-extensions=6.6s
                         ui-defaults=0.1s launch=0.2s app-started=0.4s checkpoint=20.1s)
vladmandic commented 1 year ago

i'm sorry, i cannot reproduce this under any circumstances, i hope someone can chime in.

Neoony commented 1 year ago

Thanks for trying anyways Strange What python version are you running btw?

vladmandic commented 1 year ago

multiple versions, nothing wrong with python 3.10.9 you have.

Neoony commented 1 year ago

Actually I just realized I am also having this exact same issue with lshqqytiger/stable-diffusion-webui-directml I just didnt try it since

Thats pretty strange, because not only it always worked perfectly fine for me for months, but I was also running it fine just before trying vladmandic/automatic (First run I forgot to do directml parameter)

Updated python to 3.10.11 just to try

Then I found this https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3987 Deleted C:\Users\Neoony\.cache

Ran clean lshqqytiger/stable-diffusion-webui-directml All fine

Ran clean vladmandic/automatic Also fine :)

It was that damn cache :D I had no idea it stores some cache there

Anyways, Thanks. Resolved