stable-diffusion-webui-docker
stable-diffusion-webui-docker copied to clipboard
I switch Model.ckpt,but ram continued overlay
run webui,I switch Model.ckpt,but ram continued overlay.its dont drop
Ubuntu 22.04.1 LTS Docker Compose version v2.14.1
i use aws to g5.2xlarge(gpu:24G ram:32G)
1.no docker: ram use 3609mb 2.start docker to webui :ram use:8583mb 3. fast switch Model(ckpt): ram use:22141mb 4. second switch : ram use:28738mb 5. three : ram use:30236mb
ram dont drop,so possible docker Out of memory
Memory leaks are somewhat normal in A1111. I don't know if this is a case in other webui's, but you have not specified which ui your bug report is refering to. Maybe it would be better if you fill in details in bug form, so we could help you better?
From my perspective, using ckpt leaks memory in A1111 greatly. This was main reason I switched to safetensor model format. Now I am happy. Models are loading much faster, and there are some minor leaks comparing to ckpt format.
i use https://github.com/AbdBarho/stable-diffusion-webui-docker/
how to use safetensor model
@horoabb: All of us here are using this repository. This is main reason we are discussing here. You have to use one of profiles:
- auto(-cpu)
- invoke
- sygil(-sl)
Which one of those? Also if you do not understand things in bug report form, then please ask first so there is no confusion later :-)
auto
So I can suggest installing this extension: https://github.com/arenatemp/stable-diffusion-webui-model-toolkit It will provide new tab with toolkit that converts models from ckpt to safetensor format and also removes data that do not contribute to model at all.
ok,i try it, thanks
Yeah, when u use the a11 webui in docker, there will be memory leak. But sometimes if u only use that on the original linux, it still there. I met this peoblem last week, and I back the version of gradio then fix it on the ori-linux. But in docker I failed, maybe safetensor can work, I'll try it later......
@Alfred-Duncan: any details of you fix? Maybe somebody else could find a way to fix memory leaks starting with your info.
Just create data/config/auto/startup.sh
as following.
# Workaround for memory leak
if [[ ! -L "/usr/lib/x86_64-linux-gnu/libtcmalloc.so" ]]; then
apt-get -y install libgoogle-perftools-dev
fi
export LD_PRELOAD=libtcmalloc.so
where in join export LD_PRELOAD=libtcmalloc.so
@nonnonstop Your solution works wonders! Probably it should be incorporated into image as memory leaks are very annoying thing in A1111 (@AbdBarho ?). Thanks one more time!
只需要創建
data/config/auto/startup.sh
如下。# Workaround for memory leak if [[ ! -L "/usr/lib/x86_64-linux-gnu/libtcmalloc.so" ]]; then apt-get -y install libgoogle-perftools-dev fi export LD_PRELOAD=libtcmalloc.so
this (data/config/auto/startup.sh) is to linux or stable-diffusion-webui
@horoabb the data
directory is in your stable-diffusion-webui-docker
directory
@horoabb該
data
目錄在您的stable-diffusion-webui-docker
目錄中
but ,i try to here (stable-diffusion-webui-docker/data/config/auto/startup.sh), no effect
no effect
I did not see any benefits on my side, but I will add this nonetheless, not sure if it has any side effects that we are not aware of.