lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
6.97k stars 682 forks source link

[Bug]: Forge Crashes on Model Change #650

Open Mohsyn opened 4 months ago

Mohsyn commented 4 months ago

Checklist

What happened?

Forge Crashes almost always on model change.

Steps to reproduce the problem

Start Change Model Crashes

What should have happened?

Not Crash

What browsers do you use to access the UI ?

MS Edge

Sysinfo

sysinfo.txt

Console logs

c:\forge>run
error: Could not read cf2772fab0af5573da775e7437e6acdca424f26e
error: Could not read cf2772fab0af5573da775e7437e6acdca424f26e
error: Could not read 01e610f2ece1ee9efa5af2c2749bd78cf3194dbf
error: Could not read cf2772fab0af5573da775e7437e6acdca424f26e
error: Could not read 321b2db06710cb11f7087f72aa5fee3544a596fc
error: Could not read 321b2db06710cb11f7087f72aa5fee3544a596fc
error: Could not read 94d4b3c8e78df41eea431069475e1d35f75d02ff
error: Could not read 049020f3c52910181d87ea8f4bd5043aacf9d606
error: Could not read 5e80d9ee99c5899e5e2b130408ffb65a0585a62a
error: Could not read 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.17v1.8.0rc-latest-282-g29be1da
Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7
Launching Web UI with arguments: --cuda-stream --pin-shared-memory --cuda-malloc
Using cudaMallocAsync backend.
Total VRAM 6140 MB, total RAM 16104 MB
Set vram state to: NORMAL_VRAM
Always pin shared GPU memory
Device: cuda:0 NVIDIA GeForce RTX 4050 Laptop GPU : cudaMallocAsync
VAE dtype: torch.bfloat16
CUDA Stream Activated:  True
Using pytorch cross attention
Civitai Helper: Get Custom Model Folder
[-] ADetailer initialized. version: 24.3.0, num models: 10
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [b24a67fa46] from C:\forge\webui\models\Stable-diffusion\sdxl\main\DigitalLife\digitalLife_v131.safetensors
Civitai Helper: Set Proxy:
Running on local URL:  http://127.0.0.1:7860
model_type EPS
UNet ADM Dimension 2816

To create a public link, set `share=True` in `launch()`.
Startup time: 20.6s (prepare environment: 5.0s, import torch: 2.7s, import gradio: 0.7s, setup paths: 0.6s, initialize shared: 0.1s, other imports: 0.5s, load scripts: 5.5s, create ui: 2.1s, gradio launch: 2.8s, app_started_callback: 0.6s).
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
Press any key to continue . . .

Additional information

No response

Nova-lotus commented 4 months ago

I had this exact same issue, what I did was set my page file size to automatic and restarted my pc.

https://github.com/lllyasviel/Fooocus/blob/main/troubleshoot.md#system-swap

Mohsyn commented 4 months ago

I had this exact same issue, what I did was set my page file size to automatic and restarted my pc.

https://github.com/lllyasviel/Fooocus/blob/main/troubleshoot.md#system-swap

That helped at the cost of overall performance ! No more crash but loading a model / generation takes ages now.