lllyasviel / lllyasviel/stable-diffusion-webui-forge

Sudden increase in move model time, freezing PC

Open
#2,735 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hi, I've generating 100's on images fine for the last couple of month using ForgeUI and some SDXL models; but now its just breaking...

For last 2 days, my move models time has just exploaded to ~ 300secs. A typical run goes like this now:

Run 1024x1024 with 2 loras, no adetailer

Loading models ~ 10 seconds

Moving models ~ 8 seconds

Generate image ~ 16seconds

Freezes at 100% for a couple minutes; PC becomes unusable during this time

Finally finishes with moving models claiming to take 300 or so seconds.

During this time, my RAM seemed to be maxed out, I have 16GB DDR4, 3000Mhz. I've heard this can be a bit low but its been working fine for the last couple months. Apart from that, I've got a 3070Ti, I'm running on Windows 10 and my forge is saved on a M.2 Drive.

Seems odd, I've generated high res images, with more loras & adetailer, all fine. Not suddenly these issues. Any ideas on a fix?

Thanks!!

CMD Copy and paste on the run time:
```

To create a public link, set \share=True` in `launch()`.`

Startup time: 53.6s (prepare environment: 22.0s, launcher: 0.8s, import torch: 14.3s, initialize shared: 0.4s, other imports: 0.6s, load scripts: 7.0s, create ui: 5.1s, gradio launch: 3.3s).

Environment vars changed: {'stream': False, 'inference_memory': 1024.0, 'pin_shared_memory': False}

[GPU Setting] You will use 87.50% GPU memory (7167.00 MB) to load weights, and use 12.50% GPU memory (1024.00 MB) to do matrix computation.

[Unload] Trying to free all memory for cuda:0 with 0 models keep loaded ... Done.

StateDict Keys: {'unet': 1680, 'vae': 250, 'text_encoder': 197, 'text_encoder_2': 518, 'ignore': 0}

Working with z of shape (1, 4, 32, 32) = 4096 dimensions.

IntegratedAutoencoderKL Unexpected: ['model_ema.decay', 'model_ema.num_updates']

K-Model Created: {'storage_dtype': torch.float16, 'computation_dtype': torch.float16}

Model loaded in 10.8s (unload existing model: 0.3s, forge model load: 10.6s).

[Unload] Trying to free 3051.58 MB for cuda:0 with 0 models keep loaded ... Done.

[Memory Management] Target: JointTextEncoder, Free GPU: 1738.05 MB, Model Require: 1559.68 MB, Previously Loaded: 0.00 MB, Inference Require: 1024.00 MB, Remaining: -845.63 MB, CPU Swap Loaded (blocked method): 1204.12 MB, GPU Loaded: 548.55 MB

Moving model(s) has taken 7.23 seconds

[Unload] Trying to free 1024.00 MB for cuda:0 with 1 models keep loaded ... Current free memory is 1182.03 MB ... Done.

[Unload] Trying to free 2902.26 MB for cuda:0 with 0 models keep loaded ... Current free memory is 1168.46 MB ... Unload model JointTextEncoder Done.

[Memory Management] Target: KModel, Free GPU: 2010.22 MB, Model Require: 0.00 MB, Previously Loaded: 4897.05 MB, Inference Require: 1024.00 MB, Remaining: 986.22 MB, All loaded to GPU.

Moving model(s) has taken 13.94 seconds

100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:16<00:00, 1.21it/s]

[Unload] Trying to free 4563.42 MB for cuda:0 with 0 models keep loaded ... Current free memory is 1841.41 MB ... Unload model KModel Done.

[Memory Management] Target: IntegratedAutoencoderKL, Free GPU: 6990.30 MB, Model Require: 159.56 MB, Previously Loaded: 0.00 MB, Inference Require: 1024.00 MB, Remaining: 5806.74 MB, All loaded to GPU.

Moving model(s) has taken 331.09 seconds

Environment vars changed: {'stream': False, 'inference_memory': 1024.0, 'pin_shared_memory': False}

[GPU Setting] You will use 87.50% GPU memory (7167.00 MB) to load weights, and use 12.50% GPU memory (1024.00 MB) to do matrix computation.

```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided startup log and memory-management output, focusing on the 331-second model move after a 1024x1024 run with two LoRAs. Reproduce the freeze on Windows 10 with the reported GPU and RAM configuration, then determine whether the regression is resolved when model movement returns to normal without exhausting system memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.