/sd-webui-memory-release

An Extension for Automatic1111 Webui that releases the memory each generation

Primary LanguagePythonMIT LicenseMIT

SD Webui Memory Release

This is an Extension for the Automatic1111 Webui, that calls torch.cuda.empty_cache() after each generation.

But Why?

  • A few Reddit posts/comments mentioned that CUDA sometimes can cause memory issues/leaks. This Extension tries to mediate that by calling torch.cuda.empty_cache() after each generation.

"Features"

  • gc.collect() and torch.cuda.empty_cache() after every generation
  • A placebo™️ button to manually free the memory
  • Another button to reload the checkpoint
    • This is just the same built-in functions in the Actions section of the Settings tab


[0] Webui nowdays does a pretty good job cleaning the memory. The graph above is severely outdated.

[1] I'm 99.999% sure that this Extension helps nothing. You most likely do not need this.

[2] Shout out to @kgmkm_mkgm for sharing this Extension with tens of thousands of people.

[3] Seriously, why are people downloading this? Why do people even Star this? What does this actually help?

[4] Why do I still update this? Eh, it doesn't hurt to install anyway.