https://github.com/haoming02/sd-webui-memory-release
An Extension for Automatic1111 Webui that releases the memory each generation
https://github.com/haoming02/sd-webui-memory-release
stable-diffusion-webui stable-diffusion-webui-plugin
Last synced: 6 months ago
JSON representation
An Extension for Automatic1111 Webui that releases the memory each generation
- Host: GitHub
- URL: https://github.com/haoming02/sd-webui-memory-release
- Owner: Haoming02
- License: mit
- Created: 2023-05-10T07:24:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-25T03:39:02.000Z (about 2 years ago)
- Last Synced: 2024-01-25T04:29:22.715Z (about 2 years ago)
- Topics: stable-diffusion-webui, stable-diffusion-webui-plugin
- Language: Python
- Homepage:
- Size: 101 KB
- Stars: 56
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SD Webui Memory Release
This is an Extension for the [Automatic1111 Webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui), which *attempts to* clean up memory after each generation.
### But Why?
- A few Reddit posts/comments mentioned that CUDA sometimes can cause memory issues/leaks. This Extension *tries to* solve that by calling `torch.cuda.empty_cache()` after each generation.
### Features
- Perform `torch.cuda.empty_cache()` and `gc.collect()` after every generation automatically
- Add a `🧹` button that triggers the cleanup manually
[1] Shout out to [@kgmkm_mkgm](https://twitter.com/kgmkm_mkgm/status/1658760768958140418) for sharing this Extension with tens of thousands of people
[2] Apparently, this indeed does help in [certain situations](https://github.com/Haoming02/sd-webui-memory-release/issues/3)