lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.35k stars 813 forks source link

[Bug]: "Installing requirements" every time program starts #580

Closed Gyramuur closed 7 months ago

Gyramuur commented 7 months ago

Checklist

What happened?

Forge has to "install requirements" every time it starts, which makes it fail to load if not connected to the internet. This process of "installing requirements" that should already be installed also causes the program to take 20-30 seconds longer to load than it should.

This wasn't a problem in main A1111 but now that I switched to Forge it has to do this requirement check/installation every time.

Steps to reproduce the problem

Launch Forge WebUI.

What should have happened?

Just launch without installing or trying to install anything.

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2024-03-19-07-49.json

Console logs

venv "E:\waifu\webui2\new\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Version: f0.0.17v1.8.0rc-latest-273-gb9705c58
Commit hash: b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3
Installing requirements
Installing diffusers@wuerstchen-v3
Launching Web UI with arguments: --opt-sdp-attention --opt-channelslast --xformers
Total VRAM 24576 MB, total RAM 32694 MB
WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
xformers version: 0.0.20
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : native
Hint: your device supports --pin-shared-memory for potential speed improvements.
Hint: your device supports --cuda-malloc for potential speed improvements.
Hint: your device supports --cuda-stream for potential speed improvements.
VAE dtype: torch.bfloat16
CUDA Stream Activated:  False
Using xformers cross attention
==============================================================================
You are running torch 2.0.1+cu118.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
=================================================================================
You are running xformers 0.0.20.
The program is tested to work with xformers 0.0.23.post1.
To reinstall the desired version, run with commandline flag --reinstall-xformers.

Use --skip-version-check commandline argument to disable this check.
=================================================================================
ControlNet preprocessor location: E:\waifu\webui2\new\stable-diffusion-webui\models\ControlNetPreprocessor
[-] ADetailer initialized. version: 24.1.2, num models: 10
[sd-webui-freeu] Controlnet support: *enabled*
2024-03-19 18:53:43,642 - AnimateDiff - INFO - Injecting LCM to UI.
Loading weights [67ab2fd8ec] from E:\waifu\webui2\new\stable-diffusion-webui\models\Stable-diffusion\ponyDiffusionV6XL_v6StartWithThisOne.safetensors
2024-03-19 18:53:43,959 - AnimateDiff - INFO - Hacking i2i-batch.
2024-03-19 18:53:44,031 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
model_type EPS
UNet ADM Dimension 2816
Startup time: 66.4s (prepare environment: 45.3s, import torch: 4.6s, import gradio: 2.3s, setup paths: 2.4s, initialize shared: 0.2s, other imports: 1.4s, list SD models: 2.5s, load scripts: 6.0s, create ui: 1.1s, gradio launch: 0.4s).
Using xformers attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using xformers attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection'}
loaded straight to GPU
To load target model SDXL
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  18274.2353515625
[Memory Management] Model Memory (MB) =  0.03814697265625
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  17250.197204589844
Moving model(s) has taken 0.04 seconds
Loading VAE weights specified in settings: E:\waifu\webui2\new\stable-diffusion-webui\models\VAE\sdxl_vae.safetensors
model loaded.
To load target model SDXLClipModel
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  18273.01953125
[Memory Management] Model Memory (MB) =  2144.3546981811523
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  15104.664833068848
Moving model(s) has taken 0.61 seconds
Model loaded in 8.1s (load weights from disk: 0.8s, forge load real models: 6.1s, load VAE: 0.2s, load textual inversion embeddings: 0.2s, calculate empty prompt: 0.7s).

Additional information

I'm on an earlier commit to fix another issue I was having with Regional Prompter, but this issue happens regardless of commit.

catboxanon commented 7 months ago

The sysinfo indicates the https://github.com/blue-pen5805/sdweb-easy-stablecascade-diffusers extension takes over 30 seconds to install each time. That indicates it's an issue that should be reported to that repo, and is not an issue with Forge.

"prepare environment/run extensions installers/a1111-mini-paint": 0.006005287170410156, "prepare environment/run extensions installers/adetailer": 0.1691570281982422, "prepare environment/run extensions installers/CFG_Rescale_webui": 0.0, "prepare environment/run extensions installers/Hotshot-XL-Automatic1111": 0.4424264430999756, "prepare environment/run extensions installers/posex": 0.0, "prepare environment/run extensions installers/sd-webui-3d-open-pose-editor": 0.27626657485961914, "prepare environment/run extensions installers/sd-webui-animatediff": 0.0010006427764892578, "prepare environment/run extensions installers/sd-webui-freeu": 0.0, "prepare environment/run extensions installers/sd-webui-infinite-image-browsing": 0.35732483863830566, "prepare environment/run extensions installers/sd-webui-regional-prompter": 0.0, "prepare environment/run extensions installers/sdweb-easy-stablecascade-diffusers": 33.34433889389038, "prepare environment/run extensions installers/stable-diffusion-webui-wildcards": 0.0, "prepare environment/run extensions installers/test_my_prompt": 0.001001596450805664, "prepare environment/run extensions installers": 34.59752130508423,

Edit: Seems they also intentionally don't provide support for that extension, as the repo has issues disabled, and this notice contained in the readme. I'd personally recommend just removing it.

Please have someone remake this extension.