lllyasviel / lllyasviel/stable-diffusion-webui-forge
[Bug]: Unload SD checkpoint to RAM not working
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
### What happened?
"Settings/Actions/Unload SD checkpoint to RAM" cause no effect.
Complemmetar API call sdapi/v1/unload-checkpoint not working too.
In the original A1111 this works and free VRAM.
### Steps to reproduce the problem
1. Generate some image
2. note VRAM used by running nvidia-smi
3. Go to Settings/Actions, press "Unload SD checkpoint to RAM"
4. Rerun nvidia-smi: VRAM still filled.
### What should have happened?
Expected: VRAM mostly cleared after "Unload..."
### What browsers do you use to access the UI ?
Apple Safari
### Sysinfo
[sysinfo-2024-05-14-11-01.json](https://github.com/lllyasviel/stable-diffusion-webui-forge/files/15307436/sysinfo-2024-05-14-11-01.json)
### Console logs
```Shell
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) = 14367.57470703125
[Memory Management] Model Memory (MB) = 159.55708122253418
[Memory Management] Minimal Inference Memory (MB) = 1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) = 13184.017625808716
Moving model(s) has taken 0.03 seconds
Total progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00, 3.63it/s]
Total progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00, 3.97it/s]
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue through Settings/Actions and the sdapi/v1/unload-checkpoint endpoint while monitoring VRAM with nvidia-smi. Trace the handler for that action and compare its behavior with the original A1111 implementation; done means the checkpoint unloads and VRAM is mostly cleared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100