AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: AttributError: module 'launch' has no attribute 'args' #12166

Open pkayze opened 1 year ago

pkayze commented 1 year ago

Is there an existing issue for this?

What happened?

on windows 10 using firefox I was trying to update as I haven't updated in quite a while and a controlnet I was trying to use wasn't opening as expected. so decided to update. It went on a for a long time downloading Gbs of stuff (over 15Gb now!) and after it was done this one error keeps coming up. I had done a git stash and git pop to reload settings, and when that didn't work I thought it could be that my modified launch.py didn't play well with the newer version, so I replaced it with older versions (one which I believe was the originally installed one) but that didn't help. Capture

Steps to reproduce the problem

  1. Go to .... git pull
  2. Press ....allow it to update
  3. ...error messages and it won't load anymore

What should have happened?

should have downloaed the latest version and opened as normal

Version or Commit where the problem happens

terminal screen doesn't appear to show a "version" but I did a git log -1 and it showed me this merge: a3ddf464 50973ec7 author: automatic1111 16777216c@gmail.com date: Thu Jul 27 09:02:22 2023 +0300 merge branch 'release candidate'

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 (GTX 16 below)

Cross attention optimization

Automatic

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:128

List of extensions

yes, a bunch of controlnet extensions mostly Captureextension

Console logs

venv "D:\Documents\misc_ai_test\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a

No module 'xformers'. Proceeding without it.
If submitting an issue on github, please provide the full startup log for debugging purposes.

Initializing Dreambooth
Dreambooth revision: 3324b6ab7fa661cf7d6b5ef186227dc5e8ad1878
[!] xformers NOT installed.
[!] torch version 1.12.1+cu113 installed.
[!] torchvision version 0.13.1+cu113 installed.
[+] accelerate version 0.17.1 installed.
[+] diffusers version 0.14.0 installed.
[+] transformers version 4.26.1 installed.
[+] bitsandbytes version 0.35.4 installed.

#######################################################################################################
#                                       LIBRARY ISSUE DETECTED                                        #
#######################################################################################################
#
# torch is below the required 1.13.1+cu116 version.
# torchvision is below the required 0.14.1+cu116 version.
#
# Dreambooth may not work properly.
#
# TROUBLESHOOTING
# 1. Fully restart your project (not just the webpage)
# 2. Update your A1111 project and extensions
# 3. Dreambooth requirements should have installed automatically, but you can manually install them
#    by running the following 4 commands from the A1111 project root:
cd venv/Scripts
activate
cd ../..
pip install -r ./extensions/sd_dreambooth_extension/requirements.txt
#######################################################################################################

Launching Web UI with arguments:
Warning: Stable Diffusion XL not found at path D:\Documents\misc_ai_test\stable-diffusion-webui\repositories\generative-models\sgm
No module 'xformers'. Proceeding without it.
Traceback (most recent call last):
  File "D:\Documents\misc_ai_test\stable-diffusion-webui\launch.py", line 361, in <module>
    start()
  File "D:\Documents\misc_ai_test\stable-diffusion-webui\launch.py", line 352, in start
    import webui
  File "D:\Documents\misc_ai_test\stable-diffusion-webui\webui.py", line 54, in <module>
    from modules.call_queue import wrap_gradio_gpu_call, wrap_queued_call, queue_lock  # noqa: F401
  File "D:\Documents\misc_ai_test\stable-diffusion-webui\modules\call_queue.py", line 6, in <module>
    from modules import shared, progress, errors
  File "D:\Documents\misc_ai_test\stable-diffusion-webui\modules\shared.py", line 30, in <module>
    script_loading.preload_extensions(extensions_dir, parser, extension_list=launch.list_extensions(launch.args.ui_settings_file))
AttributeError: module 'launch' has no attribute 'args'
Press any key to continue . . .

Additional information

No response

missionfloyd commented 1 year ago

Run git restore . to undo any changes (your settings and everything will be fine), delete the venv and repositories folders, and try again.

pkayze commented 1 year ago

Run git restore . to undo any changes (your settings and everything will be fine), delete the venv and repositories folders, and try again.

I just ended up deleting the whole folder and doing a new install from scratch. I can generate again, but the Posex feature I installed still isn't working even with a fresh install and following directions given here doesn't help as it just tells me it's up to date, yet it still doesn't work. https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9528#issuecomment-1657281833 BELOW is fixed I also noticed that it said new versions of auto don't need an extension to use a lycoris file, but supposing it's supposed to show up in "additional networks" with loras, I don't see it. I see mention of "extra networks" but I don't see any tabs for that either. EDIT I see the loras were saved in a different folder, instead of in models/lora, they were in extensions\sd-webui-additional-networks\models\lora, so that's all fine. I moved them into that folder. BUT now a new issue has come up! PNG info, which was just working a while ago, no long shows metadata and I can't send any of it to txt2img or img2img or anything. Why?!?! I new I shouldn't have played around updating this thing! All I wanted was to be able to use posex, but that still doesn't work after the update either, and all I've gotten are new problems. To boot, I'll be going on vacation but with no internet access, so I won't be able to fix things. :( EDIT again I saw I was getting a "ASGI" error and this reply https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/11855#issuecomment-1641584390 saying it was the depth lib extension was the problem seems to be right. I simply deleted the depth-lib folder from extensions and my PNG info is working fine now and my extensions tab is now visible showing all my loaded extensions. Weird stuff...