vladmandic / automatic

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

[Issue]: Startup issue with logging in ABG_extension and sd-webui-supermerger, and trouble with model path (logging seems to be involved as well) #706

Closed mart-hill closed 1 year ago

mart-hill commented 1 year ago

Issue Description

Sorry to report another issue (I used --upgrade option)... :)

There's an issue, probably for upstream, with two extensions, which started correctly until just now - ABG_extension and sd-webui-supermerger:

2023-05-02 21:30:27,139 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\ABG_extension / main
2023-05-02 21:30:28,184 | DEBUG | X:\AI\automatic\installer.py | Running extension installer: X:\AI\automatic\extensions\ABG_extension / X:\AI\automatic\extensions\ABG_extension\install.py
2023-05-02 21:30:29,127 | ERROR | X:\AI\automatic\installer.py | Error running extension installer: X:\AI\automatic\extensions\ABG_extension\install.py
2023-05-02 21:30:29,129 | DEBUG | X:\AI\automatic\installer.py | 
Traceback (most recent call last):

  File "X:\AI\automatic\extensions\ABG_extension\install.py", line 8, in <module>

    launch.run_pip("install opencv-python", "opencv-python")

  File "X:\AI\automatic\launch.py", line 80, in run_pip

    return run(f'"{sys.executable}" -m pip {pkg} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")

  File "X:\AI\automatic\launch.py", line 44, in run

    installer.log(desc)

TypeError: 'Logger' object is not callable

2023-05-02 21:30:29,285 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\CFG-Schedule-for-Automatic1111-SD / main
2023-05-02 21:30:30,503 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\custom-diffusion-webui / master
2023-05-02 21:30:31,851 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\DreamArtist-sd-webui-extension / master
2023-05-02 21:30:33,045 | DEBUG | X:\AI\automatic\installer.py | Running extension installer: X:\AI\automatic\extensions\DreamArtist-sd-webui-extension / X:\AI\automatic\extensions\DreamArtist-sd-webui-extension\install.py
2023-05-02 21:30:34,058 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\embedding-inspector / main
2023-05-02 21:30:35,376 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\gigadiffusion / master
2023-05-02 21:30:36,718 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\novelai-2-local-prompt / main
2023-05-02 21:30:38,105 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\openpose-editor / master
2023-05-02 21:30:39,504 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\posex / master
2023-05-02 21:30:41,004 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\prompt-fusion-extension / main
2023-05-02 21:30:42,485 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\PXL8 / main
2023-05-02 21:30:44,017 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-dynamic-prompts / main
2023-05-02 21:30:45,356 | DEBUG | X:\AI\automatic\installer.py | Running extension installer: X:\AI\automatic\extensions\sd-dynamic-prompts / X:\AI\automatic\extensions\sd-dynamic-prompts\install.py
2023-05-02 21:30:45,773 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\SD-latent-mirroring / main
2023-05-02 21:30:47,220 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-additional-networks / main
2023-05-02 21:30:48,710 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-ar / main
2023-05-02 21:30:50,207 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-bayesian-merger / main
2023-05-02 21:30:51,394 | DEBUG | X:\AI\automatic\installer.py | Running extension installer: X:\AI\automatic\extensions\sd-webui-bayesian-merger / X:\AI\automatic\extensions\sd-webui-bayesian-merger\install.py
2023-05-02 21:30:52,360 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-check-tensors / master
2023-05-02 21:30:53,677 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-llul / master
2023-05-02 21:30:55,109 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-lora-block-weight / main
2023-05-02 21:30:56,413 | DEBUG | X:\AI\automatic\installer.py | Setting branch: X:\AI\automatic\extensions\sd-webui-supermerger / main
2023-05-02 21:30:57,561 | DEBUG | X:\AI\automatic\installer.py | Running extension installer: X:\AI\automatic\extensions\sd-webui-supermerger / X:\AI\automatic\extensions\sd-webui-supermerger\install.py
2023-05-02 21:30:58,313 | ERROR | X:\AI\automatic\installer.py | Error running extension installer: X:\AI\automatic\extensions\sd-webui-supermerger\install.py
2023-05-02 21:30:58,314 | DEBUG | X:\AI\automatic\installer.py | 
Traceback (most recent call last):

  File "X:\AI\automatic\extensions\sd-webui-supermerger\install.py", line 4, in <module>

    launch.run_pip("install scikit-learn", "scikit-learn")

  File "X:\AI\automatic\launch.py", line 80, in run_pip

    return run(f'"{sys.executable}" -m pip {pkg} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")

  File "X:\AI\automatic\launch.py", line 44, in run

    installer.log(desc)

TypeError: 'Logger' object is not callable

Then, at the end, I get this error:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ X:\AI\automatic\launch.py:105 in <module>                                                                            │
│                                                                                                                      │
│   104     import webui                                                                                               │
│ ❱ 105     webui.webui()                                                                                              │
│   106                                                                                                                │
│                                                                                                                      │
│ X:\AI\automatic\webui.py:243 in webui                                                                                │
│                                                                                                                      │
│   242     log.debug('Entering WebUI')                                                                                │
│ ❱ 243     start_ui()                                                                                                 │
│   244     load_model()                                                                                               │
│                                                                                                                      │
│ X:\AI\automatic\webui.py:192 in start_ui                                                                             │
│                                                                                                                      │
│   191     async_policy()                                                                                             │
│ ❱ 192     initialize()                                                                                               │
│   193     if shared.opts.clean_temp_dir_at_start:                                                                    │
│                                                                                                                      │
│ X:\AI\automatic\webui.py:93 in initialize                                                                            │
│                                                                                                                      │
│    92     modelloader.cleanup_models()                                                                               │
│ ❱  93     modules.sd_models.setup_model()                                                                            │
│    94     startup_timer.record("models")                                                                             │
│                                                                                                                      │
│ X:\AI\automatic\modules\sd_models.py:90 in setup_model                                                               │
│                                                                                                                      │
│    89         os.makedirs(model_path)                                                                                │
│ ❱  90     list_models()                                                                                              │
│    91     enable_midas_autodownload()                                                                                │
│                                                                                                                      │
│ X:\AI\automatic\modules\sd_models.py:113 in list_models                                                              │
│                                                                                                                      │
│   112     elif shared.cmd_opts.ckpt != shared.default_sd_model_file:                                                 │
│ ❱ 113         shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}", file=sys.std                       │
│   114     for filename in sorted(model_list, key=str.lower):                                                         │
│                                                                                                                      │
│ C:\Users\Mik\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py:1489 in warning                         │
│                                                                                                                      │
│   1488         if self.isEnabledFor(WARNING):                                                                        │
│ ❱ 1489             self._log(WARNING, msg, args, **kwargs)                                                           │
│   1490                                                                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Logger._log() got an unexpected keyword argument 'file'

...which interrupts the startup of the server.

Version Platform Description

2023-05-02 21:22:58,432 | INFO | X:\AI\automatic\installer.py | Python 3.10.9 on Windows 2023-05-02 21:22:58,661 | DEBUG | X:\AI\automatic\installer.py | Git 2.38.0.windows.1 2023-05-02 21:23:02,466 | INFO | X:\AI\automatic\installer.py | Version: eaea88a4 Mon May 1 21:03:08 2023 -0400 2023-05-02 21:23:08,602 | DEBUG | X:\AI\automatic\installer.py | Setting branch: . / master 2023-05-02 21:23:18,654 | INFO | X:\AI\automatic\installer.py | Upgraded to version: 568e7009 Tue May 2 15:12:13 2023 -0400 2023-05-02 21:23:18,656 | INFO | X:\AI\automatic\installer.py | Setting environment tuning 2023-05-02 21:23:18,674 | INFO | X:\AI\automatic\installer.py | nVidia CUDA toolkit detected 2023-05-02 21:23:22,688 | DEBUG | X:\AI\automatic\installer.py | Package version found: torch 2.0.0+cu118 2023-05-02 21:23:22,690 | DEBUG | X:\AI\automatic\installer.py | Package version found: torchvision 0.15.1+cu118 2023-05-02 21:23:22,690 | DEBUG | X:\AI\automatic\installer.py | Package version found: torchaudio 2.0.1+cu118 2023-05-02 21:23:46,442 | INFO | X:\AI\automatic\installer.py | Torch 2.0.0+cu118 2023-05-02 21:23:46,472 | INFO | X:\AI\automatic\installer.py | Torch backend: nVidia CUDA 11.8 cuDNN 8700 2023-05-02 21:23:46,501 | INFO | X:\AI\automatic\installer.py | Torch detected GPU: NVIDIA GeForce RTX 3090 VRAM 24575 Arch (8, 6) Cores 82

I used Edge for the last couple of hours, but at this point, I didn't get to use it any more. :)

CyberLykan commented 1 year ago

Getting the same TypeError: Logger._log() got an unexpected keyword argument 'file' error even after removing the supermerger extension and doing a git fetch --all and git reset --hard origin/master.

gnadenlos commented 1 year ago

Same problem after --upgrade.

vladmandic commented 1 year ago

yup. fixed. sorry :(