Open azi52 opened 1 year ago
I'm having a similar problem. I have a 4090 and it seems to just want all of it.
found it eats most of the VRAM after loading the model. idk but you can try launch with argument '--medvram', which may help reduce the VRAM consume at the beginning.
this is happening to me too, making it so i am unable to use the webui at all. i have an rtx 2060 that worked just fine before and now its entirely useless.
@azi52 remove --precision full --no-half Using these arguments does drastically increase the memory usage as the models are loaded as fp32 Also remove --no-half-vae and use fp16 fixed VAE (if you want to use SDXL) Forget about --disable-nan-check
@dhwz thx I'll try it next time before I use SD and see how it goes
I also updated my cuda drivers since someone recommended it to me but it didn't work.
@azi52 remove --precision full --no-half Using these arguments does drastically increase the memory usage as the models are loaded as fp32 Also remove --no-half-vae and use fp16 fixed VAE (if you want to use SDXL) Forget about --disable-nan-check
I basically took off all my argument and sad to report it didn't fix anything
i am using an rtx 2060 6gb as well, till sunday everything worked fine. After git pull and updating some stuff, it seems there is no unloading the module from vram after generating anything again. Can't tell you what was updated since i can't find any log. While monitoring gpu performance after generating image is still a max size (before monday vram was getting free after generating was finished). I think it is a bug bc there was an update on monday (or sunday) after it there was this behaviour...
There is a workaround: "unload the module to free vram" in settings -> actions but this should be only a temp solution from my pov
@Combine101 not a bug model is now kept in VRAM, change settings > Stable Diffusion if you don't like it
Is there an existing issue for this?
What happened?
started to use all Vram when generating for no apparent reasons (maybe IDK).
I installed a new game on the computer around the same time the problem started and uninstalled it after seeing the problem arise and deleted any left over files, but the problem persisted even after that.
game: tower of fantasy (installed on epic luncher)
Steps to reproduce the problem
generate and image and you'll get all your Gpu's dedicated memory at 100%, even if you make a 512x512 image
What should have happened?
normally generating a 512x768 image would never get to more than 9~10 Gb being used
Version or Commit where the problem happens
a9fed7c3
What Python version are you running on ?
Python 3.10.x
What platforms do you use to access the UI ?
Windows
What device are you running WebUI on?
Nvidia GPUs (RTX 20 above)
Cross attention optimization
Automatic
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
List of extensions
I didn't install extensions until today trying to figure out the problem, I will delete them after the problem is solve (or not reinstall them if I need a fresh installation)
-a1111-stable-diffusion-webui-vram-estimator -sd-extension-system-info -sd-webui-additional-networks
Console logs
Additional information
found this in webui bat (not webui-user) I have no clue if this is normal;
@echo off
if not defined PYTHON (set PYTHON=python) if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")
set ERROR_REPORTING=FALSE
mkdir tmp 2>NUL
%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt if %ERRORLEVEL% == 0 goto :check_pip echo Couldn't launch python goto :show_stdout_stderr
:check_pip %PYTHON% -mpip --help >tmp/stdout.txt 2>tmp/stderr.txt if %ERRORLEVEL% == 0 goto :start_venv if "%PIP_INSTALLER_LOCATION%" == "" goto :show_stdout_stderr %PYTHON% "%PIP_INSTALLER_LOCATION%" >tmp/stdout.txt 2>tmp/stderr.txt if %ERRORLEVEL% == 0 goto :start_venv echo Couldn't install pip goto :show_stdout_stderr
:start_venv if ["%VENV_DIR%"] == ["-"] goto :skip_venv if ["%SKIP_VENV%"] == ["1"] goto :skip_venv
dir "%VENV_DIR%\Scripts\Python.exe" >tmp/stdout.txt 2>tmp/stderr.txt if %ERRORLEVEL% == 0 goto :activate_venv
for /f "delims=" %%i in ('CALL %PYTHON% -c "import sys; print(sys.executable)"') do set PYTHON_FULLNAME="%%i" echo Creating venv in directory %VENV_DIR% using python %PYTHON_FULLNAME% %PYTHON_FULLNAME% -m venv "%VENV_DIR%" >tmp/stdout.txt 2>tmp/stderr.txt if %ERRORLEVEL% == 0 goto :activate_venv echo Unable to create venv in directory "%VENV_DIR%" goto :show_stdout_stderr
:activate_venv set PYTHON="%VENV_DIR%\Scripts\Python.exe" echo venv %PYTHON%
:skip_venv if [%ACCELERATE%] == ["True"] goto :accelerate goto :launch
:accelerate echo Checking for accelerate set ACCELERATE="%VENV_DIR%\Scripts\accelerate.exe" if EXIST %ACCELERATE% goto :accelerate_launch
:launch %PYTHON% launch.py %* pause exit /b
:accelerate_launch echo Accelerating %ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py pause exit /b
:show_stdout_stderr
echo. echo exit code: %errorlevel%
for /f %%i in ("tmp\stdout.txt") do set size=%%~zi if %size% equ 0 goto :show_stderr echo. echo stdout: type tmp\stdout.txt
:show_stderr for /f %%i in ("tmp\stderr.txt") do set size=%%~zi if %size% equ 0 goto :show_stderr echo. echo stderr: type tmp\stderr.txt
:endofscript
echo. echo Launch unsuccessful. Exiting. pause