From 30ad3cf9361453a94b7103e8595988f667054959 Mon Sep 17 00:00:00 2001 From: bmaltais Date: Sat, 3 Jun 2023 06:44:04 -0400 Subject: [PATCH] Fix setup logic --- README.md | 2 ++ requirements.txt | 1 - setup.bat | 49 ++++++++++++++++++++++++------------------------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index e0ad40e04..55b144960 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,8 @@ This will store a backup file with your current locally installed pip packages a ## Change History +* 2023/06/02 (v21.6.2) +- Fix install issue with setup logic * 2023/06/02 (v21.6.2) - Fix install issue with torch version * 2023/06/02 (v21.6.1) diff --git a/requirements.txt b/requirements.txt index e2825007a..6f1fa8774 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,6 @@ toml==0.10.2 transformers==4.26.0 voluptuous==0.13.1 wandb==0.15.0 -xformers==0.0.20 # for BLIP captioning fairscale==0.4.13 requests==2.28.2 diff --git a/setup.bat b/setup.bat index 4d71e7518..3bec1156b 100644 --- a/setup.bat +++ b/setup.bat @@ -25,10 +25,31 @@ if defined pip_output ( echo pip freeze ^> uninstall.txt echo pip uninstall -y -r uninstall.txt echo %yellow_text%=============================================================%reset_text% + goto :PromptUser +) - goto PromptUser +:PromptUser +REM Ask the user if they want to quit or continue +echo. +echo Do you want to: +echo [1] - Quit +echo [2] - Continue with the setup +set /p "choice=Enter your choice (1 or 2): " +if /i "%choice%"=="1" ( + echo You chose to quit. + echo. + goto :Quit +) else if /i "%choice%"=="2" ( + echo You chose to continue. + echo. + goto :ContinueSetup +) else ( + echo Invalid choice. Please try again. + echo. + goto :PromptUser ) +:ContinueSetup endlocal set PYTHON_VER=3.10.9 @@ -63,7 +84,6 @@ echo [1] - v1 (torch 1.12.1) (Recommended) echo [2] - v2 (torch 2.0.0) (Experimental) set /p choice="Enter your choice (1 or 2): " - :: Only does this section to cleanup the old custom dll versions that we used to use. No longer needed now with the new bitsandbytes version pip uninstall -y bitsandbytes IF EXIST ".\venv\Lib\site-packages\bitsandbytes" ( @@ -78,7 +98,7 @@ if %choice%==1 ( ) else ( pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 pip install --use-pep517 --upgrade -r requirements.txt - rem pip install --upgrade xformers==0.0.20 + pip install --upgrade xformers==0.0.20 rem pip install -U -I --no-deps https://files.pythonhosted.org/packages/d6/f7/02662286419a2652c899e2b3d1913c47723fc164b4ac06a85f769c291013/xformers-0.0.17rc482-cp310-cp310-win_amd64.whl pip install https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl ) @@ -91,26 +111,5 @@ python.exe .\tools\update_bitsandbytes.py accelerate config +:Quit exit - -:PromptUser -REM Ask the user if they want to quit or continue -echo. -echo Do you want to: -echo [1] - Quit -echo [2] - Continue with the setup -set /p "choice=Enter your choice (1 or 2): " -if /i "%choice%"=="1" ( - echo You chose to quit. - echo. - goto :Quit -) else if /i "%choice%"=="2" ( - echo You chose to continue. - echo. -) else ( - echo Invalid choice. Please try again. - echo. - goto :PromptUser -) - -:Quit \ No newline at end of file