Update webui.py to instruct python to install binary packages; this should prevent errors people are getting with lacking C++ compilers

This commit is contained in:
AUTOMATIC 2022-09-05 10:41:01 +03:00
parent e45e1862ad
commit 811725d3aa
3 changed files with 11 additions and 7 deletions

View File

@ -146,7 +146,7 @@ Running on local URL: http://127.0.0.1:7860/
Open the URL in browser, and you are good to go. Open the URL in browser, and you are good to go.
### What options to use for low VRAM videocardsd? ### What options to use for low VRAM videocards?
- If you have 4GB VRAM and want to make 512x512 (or maybe up to 640x640) images, use `--medvram`. - If you have 4GB VRAM and want to make 512x512 (or maybe up to 640x640) images, use `--medvram`.
- If you have 4GB VRAM and want to make 512x512 images, but you get an out of memory error with `--medvram`, use `--opt-split-attention` instead. - If you have 4GB VRAM and want to make 512x512 images, but you get an out of memory error with `--medvram`, use `--opt-split-attention` instead.
- If you have 4GB VRAM and want to make 512x512 images, and you still get an out of memory error, use `--lowvram --always-batch-cond-uncond` instead. - If you have 4GB VRAM and want to make 512x512 images, and you still get an out of memory error, use `--lowvram --always-batch-cond-uncond` instead.

View File

@ -40,6 +40,10 @@ titles = {
"Custom code": "Run python code. Advanced user only. Must run program with --allow-code for this to work", "Custom code": "Run python code. Advanced user only. Must run program with --allow-code for this to work",
"Prompt S/R": "Separate a list of words with commas, and the first word will be used as a keyword: script will search for this word in the prompt, and replace it with others", "Prompt S/R": "Separate a list of words with commas, and the first word will be used as a keyword: script will search for this word in the prompt, and replace it with others",
"Tiling": "Produce an image that can be tiled.",
"Tile overlap": "For SD upscale, how much overlap in pixels should there be between tiles. Tils overlap so that when they are merged back into one oicture, there is no clearly visible seam.",
} }
function gradioApp(){ function gradioApp(){

View File

@ -61,10 +61,10 @@ echo Torch is not able to use GPU
goto :show_stdout_stderr goto :show_stdout_stderr
:install_sd_reqs :install_sd_reqs
%PYTHON% -c "import transformers" >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -c "import transformers; import wheel" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :install_k_diff if %ERRORLEVEL% == 0 goto :install_k_diff
echo Installing SD requirements... echo Installing SD requirements...
%PYTHON% -m pip install transformers==4.19.2 diffusers invisible-watermark >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -m pip install wheel transformers==4.19.2 diffusers invisible-watermark --prefer-binary >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :install_k_diff if %ERRORLEVEL% == 0 goto :install_k_diff
goto :show_stdout_stderr goto :show_stdout_stderr
@ -72,7 +72,7 @@ goto :show_stdout_stderr
%PYTHON% -c "import k_diffusion.sampling" >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -c "import k_diffusion.sampling" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :install_GFPGAN if %ERRORLEVEL% == 0 goto :install_GFPGAN
echo Installing K-Diffusion... echo Installing K-Diffusion...
%PYTHON% -m pip install git+https://github.com/crowsonkb/k-diffusion.git >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -m pip install git+https://github.com/crowsonkb/k-diffusion.git --prefer-binary --only-binary=psutil >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :install_GFPGAN if %ERRORLEVEL% == 0 goto :install_GFPGAN
goto :show_stdout_stderr goto :show_stdout_stderr
@ -81,7 +81,7 @@ goto :show_stdout_stderr
%PYTHON% -c "import gfpgan" >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -c "import gfpgan" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :install_reqs if %ERRORLEVEL% == 0 goto :install_reqs
echo Installing GFPGAN echo Installing GFPGAN
%PYTHON% -m pip install git+https://github.com/TencentARC/GFPGAN.git >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -m pip install git+https://github.com/TencentARC/GFPGAN.git --prefer-binary >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :install_reqs if %ERRORLEVEL% == 0 goto :install_reqs
goto :show_stdout_stderr goto :show_stdout_stderr
@ -89,11 +89,11 @@ goto :show_stdout_stderr
%PYTHON% -c "import omegaconf" >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -c "import omegaconf" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :make_dirs if %ERRORLEVEL% == 0 goto :make_dirs
echo Installing requirements... echo Installing requirements...
%PYTHON% -m pip install -r %REQS_FILE% >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -m pip install -r %REQS_FILE% --prefer-binary >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :update_numpy if %ERRORLEVEL% == 0 goto :update_numpy
goto :show_stdout_stderr goto :show_stdout_stderr
:update_numpy :update_numpy
%PYTHON% -m pip install -U numpy >tmp/stdout.txt 2>tmp/stderr.txt %PYTHON% -m pip install -U numpy --prefer-binary >tmp/stdout.txt 2>tmp/stderr.txt
:make_dirs :make_dirs
mkdir repositories 2>NUL mkdir repositories 2>NUL