AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Value for dynamo_backend not passed to accelerate launch after running accelerate config #8788

Closed Harvester62 closed 1 year ago

Harvester62 commented 1 year ago

Is there an existing issue for this?

What happened?

A warning about dynamo_backend is displayed in the console at startup of Web UI despite having run 'accelerate config' as reported in the Dreambooth repository instructions

Steps to reproduce the problem

  1. install Dreambooth from the SD Web UI interface
  2. close SD Web UI
  3. start a console and goto [SDWUI Install Directory]\venv\Scripts\, then run accelerate config and configure it
  4. the default_config.yaml file is created inside C:\Users\USERNAME\.cache\huggingface\accelerate
  5. start webui-user.bat
  6. a warning is displayed about accelerate

What should have happened?

No warning should be displayed if the entire accelerator's configuration is properly passed to the accelerator launch command

Commit where the problem happens

a9fed7c364061ae6efb37f797b6b522cb3cf7aa2

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

This is the content of the webui-user.bat file:

@echo off
REM git pull
pause

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--xformers --opt-split-attention --disable-safe-unpickle --api --allow-code --administrator --medvram --theme dark

SET XFORMERS_PACKAGE="xformers==0.0.17.dev447"
SET "REQS_FILE=.\extensions\sd_dreambooth_extension\requirements.txt"
SET DREAMBOOTH_SKIP_INSTALL=True
SET ACCELERATE="True"

call webui.bat

List of extensions

The list is too long to be included here

Console logs

Premere un tasto per continuare . . .
venv "C:\stable-diffusion-webui\venv\Scripts\Python.exe"
Checking for accelerate
Accelerating
[18:29:56] WARNING  The following values were not passed to `accelerate launch` and had defaults used      launch.py:887
                    instead:
                            `--dynamo_backend` was set to a value of `'no'`
                    To avoid this warning pass in values for each of the problematic parameters or run
                    `accelerate config`.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Installing requirements for Web UI

[auto-sd-paint-ext] Commit hash: 3b82fedf98f9fdb2b523f8d4eafe817e149383f2
[auto-sd-paint-ext] Auto-update disabled.

Installing requirements for Batch Face Swap

Fetching updates for midas...
Checking out commit for midas with hash: b845b78...

Installing requirements for scikit_learn

Installing requirements for Prompt Gallery

Installing sd-dynamic-prompts requirements.txt

Initializing Riffusion

Installing scikit-learn

Initializing Dreambooth
If submitting an issue on github, please provide the below text for debugging purposes:

Python revision: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Dreambooth revision: 78ca4dabe9b269b7dae25960121c58c41e6c39e1
SD-WebUI revision: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2

[+] torch version 1.13.1+cu117 installed.
[+] torchvision version 0.14.1+cu117 installed.
[+] xformers version 0.0.17.dev464 installed.
[+] accelerate version 0.17.1 installed.
[+] diffusers version 0.14.0 installed.
[+] transformers version 4.27.2 installed.
[+] bitsandbytes version 0.35.4 installed.

loading Smart Crop reqs from C:\stable-diffusion-webui\extensions\sd_smartprocess\requirements.txt
Checking Smart Crop requirements.

Installing requirements for Seed Travel

Installing imageio-ffmpeg requirement for depthmap script
Installing pyqt5 requirement for depthmap script

Launching Web UI with arguments: --xformers --opt-split-attention --disable-safe-unpickle --api --allow-code --administrator --medvram --theme dark
no config file: C:\stable-diffusion-webui\extensions\Stable-Diffusion-Webui-Prompt-Translator\prompt_translator.cfg
Scan MarianMT model
No MarianMT folder, no need scan
Loading booru2prompt settings
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Hypernetwork-MonkeyPatch-Extension found!
Installing pywin32
Loading weights [9012b038a9] from C:\stable-diffusion-webui\models\Stable-diffusion\sd-v1-5-pruned-emaonly_fp16.ckpt
Creating model from config: C:\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: C:\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.pt
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(9): bad_prompt_version2, midjourney-style, orientalist-art, Style-Autumn-neg, Style-Autumn, Style-Glorious-neg, Style-Glorious, Style-Winter-neg, Style-Winter
Textual inversion embeddings skipped(5): nartfixer, nfixer, nrealfixer, painted_landscape, retrofutur
Model loaded in 29.0s (load weights from disk: 26.2s, create model: 0.8s, apply weights to model: 0.5s, apply half(): 0.7s, load VAE: 0.4s, load textual inversion embeddings: 0.3s).
patched in extra network ui page: deltas
patched in extra network: deltas
1920 1080
1030
INFO:     Started server process [7196]
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:58108 - "GET / HTTP/1.1" 200 OK
add tab
*Deforum ControlNet support: enabled*
CUDA SETUP: Loading binary C:\stable-diffusion-webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cudaall.dll...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
auto-sd-paint-ext:INFO: Add --listen to COMMANDLINE_ARGS to enable usage as a remote backend.
Startup time: 289.9s (import gradio: 6.0s, import ldm: 2.4s, other imports: 9.2s, list extensions: 35.7s, list SD models: 54.8s, setup codeformer: 0.6s, load scripts: 87.3s, load SD checkpoint: 29.1s, create ui: 64.5s, gradio launch: 0.2s, scripts app_started_callback: 0.1s).

Additional information

This is the content of the accelerator's default_config.yaml file after running the 'accelerator config' command:

compute_environment: LOCAL_MACHINE deepspeed_config: {} distributed_type: 'NO' downcast_bf16: 'no' dynamo_config: {} fsdp_config: {} gpu_ids: all machine_rank: 0 main_training_function: main megatron_lm_config: {} mixed_precision: fp16 num_machines: 1 num_processes: 1 rdzv_backend: static same_network: true tpu_env: [] tpu_use_cluster: false tpu_use_sudo: false use_cpu: false

Harvester62 commented 1 year ago

After the latest updates to SD Web UI (Commit hash: 22bcc7be428c94e9408f589966c2040187245d81) and the installed extensions, including Accelerate module from v0.17.1 to v0.18.1 and reconfigure Accelerate, everything seems to work fine as per the console messages screenshot below (for reference):

immagine

I am therefore closing this bug report.