From 2dee638550da45f40355a90970202da6bf965816 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Thu, 28 Dec 2023 10:55:13 -0500 Subject: [PATCH 1/2] fix: Re-add memory leak fix Looks like this was lost in a merge at some point grokuku/stable-diffusion#2 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1a5b8e8..b55402a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,8 @@ RUN apt-get update -y -q=2 && \ python3-opencv \ libopencv-dev \ dotnet-sdk-7.0 \ - git && \ + git \ + libgoogle-perftools-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From ada4ee74badd1ec2be7a8f84881e34b132b7a18c Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Thu, 28 Dec 2023 12:38:28 -0500 Subject: [PATCH 2/2] fix(sdnext): Use more robust memory fix solution * Use libtcmalloc-minimal4 since its already installed (no additional dependencies * Export only if dependency is found * Export in startup script so we don't have to modify user files ie webui-user.sh --- 04.sh | 13 ++++++++----- Dockerfile | 3 +-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/04.sh b/04.sh index 5ef7d4f..992488c 100755 --- a/04.sh +++ b/04.sh @@ -45,11 +45,14 @@ if [ ! -f "$SD04_DIR/parameters.txt" ]; then fi # Load updated malloc to fix memory leak # https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/6850#issuecomment-1432435503 -if [ ! -f "$SD04_DIR/webui/webui-user.sh" ]; then -cat >"$SD04_DIR/webui/webui-user.sh" <