常見問題
Memory leak in SD plotting
2026/07/3099408 次瀏覽
If you notice continuous memory growth while plotting or memory growth caused by switching models when using the SD WebUI in the AUTOMATIC1111 project, you can refer to the following methods to resolve the issue
# 先安装依赖
apt install libgoogle-perftools-dev
# 在启动webui之前,先添加环境变量。以下libtcmalloc.so.4文件可以使用ldconfig -p | grep libtcmalloc.so.4来确认是否存在
export LD_PRELOAD=libtcmalloc.so.4
# 执行export添加环变量后再启动webui(启动命令以您的为主,以下仅示例)
python launch.py --port 6006
Source of the above method: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/6722
