AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.66k stars 26.77k forks source link

[Bug]: Blocks.launch() got an unexpected argument 'allowed_paths' #10758

Closed cooperdk closed 1 year ago

cooperdk commented 1 year ago

Is there an existing issue for this?

What happened?

This error occurs after configuration of extensions, right before opening the socket for HTTP access.

Steps to reproduce the problem

  1. Just run webui-user.bat

What should have happened?

The UI should have started.

Commit where the problem happens

20ae71f

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--api --listen --cors-allow-origins * --server-name 127.0.0.1 --port 7860 --opt-sdp-attention --opt-split-attention --xformers --precision full --enable-insecure-extension-access --gradio-img2img-tool color-sketch --no-half --theme dark --disable-safe-unpickle --deepdanbooru --deepdanbooru-projects-path "X:\\stablediffusion\\webui\\models\\deepdanbooru" --disable-nan-check

List of extensions

27-05-2023  01:58    <DIR>          a1111-sd-webui-locon
27-05-2023  01:58    <DIR>          a1111-sd-webui-tagcomplete
03-05-2023  01:31    <DIR>          ABG_extension
15-02-2023  12:52    <DIR>          auto-sd-paint-ext
27-05-2023  01:58    <DIR>          batch-face-swap
08-12-2022  16:24    <DIR>          booru2prompt
27-05-2023  01:58    <DIR>          Config-Presets
15-02-2023  14:05    <DIR>          custom-diffusion-webui
27-05-2023  01:58    <DIR>          deforum-for-automatic1111-webui
25-04-2023  02:02    <DIR>          depthmap2mask
25-04-2023  02:02    <DIR>          DreamArtist-sd-webui-extension
17-02-2023  01:42    <DIR>          embedding-inspector
25-04-2023  02:27    <DIR>          Hypernetwork-MonkeyPatch-Extension
27-05-2023  02:56    <DIR>          model-keyword
25-04-2023  02:02    <DIR>          multi-subject-render
08-12-2022  16:47    <DIR>          novelai-2-local-prompt
25-04-2023  02:02    <DIR>          openOutpaint-webUI-extension
04-05-2023  23:52    <DIR>          openpose-editor
04-05-2023  23:51    <DIR>          posex
15-02-2023  13:52    <DIR>          PromptGallery-stable-diffusion-webui
27-05-2023  02:03    <DIR>          sd-dynamic-prompts
27-05-2023  01:58    <DIR>          sd-extension-steps-animation
27-05-2023  22:14    <DIR>          sd-webui-additional-networks
25-04-2023  02:23    <DIR>          sd-webui-ar
25-12-2022  06:29    <DIR>          sd-webui-gelbooru-prompt
15-02-2023  14:03    <DIR>          sd-webui-riffusion
04-05-2023  23:50    <DIR>          sd-webui-text2video
27-05-2023  02:56    <DIR>          sd-webui-tome
25-04-2023  02:02    <DIR>          sd_dreambooth_extension
27-05-2023  01:58    <DIR>          sd_grid_add_image_number
15-02-2023  13:53    <DIR>          sd_save_intermediate_images
17-02-2023  01:42    <DIR>          sd_smartprocess
15-02-2023  14:06    <DIR>          sd_web_ui_preset_utils
03-05-2023  01:31    <DIR>          seed_travel
08-12-2022  16:47    <DIR>          shift-attention
25-04-2023  02:02    <DIR>          stable-diffusion-webui
08-12-2022  16:47    <DIR>          stable-diffusion-webui-aesthetic-gradients
08-12-2022  16:47    <DIR>          stable-diffusion-webui-aesthetic-image-scorer
25-04-2023  02:02    <DIR>          stable-diffusion-webui-artists-to-study
15-02-2023  13:08    <DIR>          stable-diffusion-webui-cafe-aesthetic
27-05-2023  01:58    <DIR>          Stable-Diffusion-Webui-Civitai-Helper
08-12-2022  16:48    <DIR>          stable-diffusion-webui-conditioning-highres-fix
15-02-2023  13:56    <DIR>          stable-diffusion-webui-daam
03-05-2023  01:31    <DIR>          stable-diffusion-webui-dataset-tag-editor
25-04-2023  02:02    <DIR>          stable-diffusion-webui-depthmap-script
08-12-2022  16:48    <DIR>          stable-diffusion-webui-embedding-editor
13-12-2022  05:22    <DIR>          stable-diffusion-webui-images-browser
25-12-2022  05:52    <DIR>          stable-diffusion-webui-inspiration
25-04-2023  02:03    <DIR>          Stable-Diffusion-Webui-Prompt-Translator
03-05-2023  01:31    <DIR>          stable-diffusion-webui-prompt-travel
25-04-2023  02:54    <DIR>          stable-diffusion-webui-promptgen
03-05-2023  01:31    <DIR>          stable-diffusion-webui-Prompt_Generator
25-04-2023  02:26    <DIR>          stable-diffusion-webui-state
15-02-2023  13:06    <DIR>          stable-diffusion-webui-text2prompt
08-12-2022  16:49    <DIR>          stable-diffusion-webui-tokenizer
08-12-2022  16:49    <DIR>          stable-diffusion-webui-visualize-cross-attention-extension
10-05-2023  00:13    <DIR>          stable-diffusion-webui-wd14-tagger
25-04-2023  02:03    <DIR>          StylePile
13-12-2022  03:57    <DIR>          test_my_prompt
25-12-2022  06:28    <DIR>          training-picker
03-05-2023  01:31    <DIR>          ultimate-upscale-for-automatic1111
25-12-2022  06:05    <DIR>          unprompted

Console logs

...
Textual inversion embeddings skipped(1): 21charturnerv2
Model loaded in 4.1s (load weights from disk: 0.1s, create model: 2.0s, move model to device: 1.0s, load textual inversion embeddings: 0.9s).
[text2prompt] Following databases are available:
    all-mpnet-base-v2 : danbooru_strict
Applying optimization: xformers... done.
extension Mikubill/sd-webui-controlnet not found, ControlNet Travel ignored
extension Mikubill/sd-webui-controlnet not found, ControlNet Travel ignored
INFO:     Started server process [30696]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:5173 (Press CTRL+C to quit)
INFO:     127.0.0.1:59988 - "GET / HTTP/1.1" 200 OK
CUDA SETUP: Loading binary X:\StableDiffusion\webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cudaall.dll...
[tag-editor] Settings has been read from config.json
[text2prompt] Loading database with name "all-mpnet-base-v2 : danbooru_strict"...
[text2prompt] Database loaded
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ X:\StableDiffusion\webui\launch.py:38 in <module>                                                │
│                                                                                                  │
│   35                                                                                             │
│   36                                                                                             │
│   37 if __name__ == "__main__":                                                                  │
│ ❱ 38 │   main()                                                                                  │
│   39                                                                                             │
│                                                                                                  │
│ X:\StableDiffusion\webui\launch.py:34 in main                                                    │
│                                                                                                  │
│   31 │   if args.test_server:                                                                    │
│   32 │   │   configure_for_tests()                                                               │
│   33 │                                                                                           │
│ ❱ 34 │   start()                                                                                 │
│   35                                                                                             │
│   36                                                                                             │
│   37 if __name__ == "__main__":                                                                  │
│                                                                                                  │
│ X:\StableDiffusion\webui\modules\launch_utils.py:334 in start                                    │
│                                                                                                  │
│   331 │   if '--nowebui' in sys.argv:                                                            │
│   332 │   │   webui.api_only()                                                                   │
│   333 │   else:                                                                                  │
│ ❱ 334 │   │   webui.webui()                                                                      │
│   335                                                                                            │
│                                                                                                  │
│ X:\StableDiffusion\webui\webui.py:395 in webui                                                   │
│                                                                                                  │
│   392 │   │   │   FastAPI.original_setup = FastAPI.setup                                         │
│   393 │   │   │   FastAPI.setup = fastapi_setup                                                  │
│   394 │   │                                                                                      │
│ ❱ 395 │   │   app, local_url, share_url = shared.demo.launch(                                    │
│   396 │   │   │   share=cmd_opts.share,                                                          │
│   397 │   │   │   server_name=server_name,                                                       │
│   398 │   │   │   server_port=cmd_opts.port,                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Blocks.launch() got an unexpected keyword argument 'allowed_paths'

Additional information

This error did NOT occur right before updating to the 1.3.0 release.

cooperdk commented 1 year ago

FIX:

It seems that the Web UI did not upgrade requirements from requirements.txt when starting up. Gradio, among others, have been upgraded to 3.31.0 while it used to be 3.28.x.

So doing a pip install --upgrade -r requirements.txt from venv solved the issue.

PurpleStarChild commented 1 year ago

I am also getting this error. Are you sure the command you ran from the venv was pip upgrade ?

EDIT: confirmed the command is pip install --upgrade -r requirements.txt

cooperdk commented 1 year ago

I am also getting this error. Are you sure the command you ran from the venv was pip upgrade ?

Sorry, I changed it just above. It's of course pip install --upgrade -r requirements.txt

cooperdk commented 1 year ago

BTW, the issue is really, why doesn't the webui match the current releases with the requirements file? There are even Python modules to handle this.

akx commented 1 year ago

@cooperdk

cooperdk commented 1 year ago

There was no information on any kind of completed updated for the main webui.

But to put it short, upgrading gradio did work. There must therefore be a mistake in the upgrade test function.

⁣Hent BlueMail til Android ​

Den 28. maj 2023 15.03, fra 15.03, Aarni Koskela @.***> skrev:

@cooperdk

  • requirements_versions.txt is the locked-version requirements file this repo uses; if you install everything from requirements.txt, you may get incorrect (untested) versions of dependencies.
  • launch.py does normally attempt to install versions from requirements_versions.txt. You're not showing the entire log, so I can't tell why it's not doing that for you.

-- Reply to this email directly or view it on GitHub: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/10758#issuecomment-1566134758 You are receiving this because you were mentioned.

Message ID: @.***>

akx commented 1 year ago

Glad you found a workaround, anyhow. Closing.