Skip to main content

Steps to Resolve Memory Growth Issues

  1. Install Dependencies
apt install libgoogle-perftools-dev
  1. Set Environment Variable Before Launching WebUI Verify the existence of libtcmalloc.so.4 using:
ldconfig -p | grep libtcmalloc.so.4
If found, set the environment variable:
export LD_PRELOAD=libtcmalloc.so.4
  1. Launch WebUI
After setting the environment variable, start the WebUI:
python launch.py --port 6006
Source This solution is derived from Discussion “Linux - Use tcmalloc for memory management for slight speed boost and much, MUCH lower CPU memory leakage” #6722 on the AUTOMATIC1111 SD WebUI GitHub repository.