Skip to content

Commit

Permalink
Merge pull request #891 from bmaltais/dev2
Browse files Browse the repository at this point in the history
Fix issue with torch version
  • Loading branch information
bmaltais authored Jun 3, 2023
2 parents ffd6179 + ed5bf88 commit 5560714
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 torch version
* 2023/06/02 (v21.6.1)
- Add detection of files outside the venv to scripts
* 2023/06/02 (v21.6.0)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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
Expand Down
47 changes: 27 additions & 20 deletions setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,8 @@ if defined pip_output (
echo pip freeze ^> uninstall.txt
echo pip uninstall -y -r uninstall.txt
echo %yellow_text%=============================================================%reset_text%
)

: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
goto PromptUser
)

endlocal
Expand All @@ -64,6 +46,9 @@ IF NOT EXIST venv (
)
call .\venv\Scripts\activate.bat

REM Upgrade pip if needed
python.exe -m pip install --upgrade pip

echo Do you want to uninstall previous versions of torch and associated files before installing? Usefull if you are upgrading from torch 1.12.1 to torch 2.0.0 or if you are downgrading from torch 2.0.0 to torch 1.12.1.
echo [1] - Yes
echo [2] - No (recommanded for most)
Expand Down Expand Up @@ -93,7 +78,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
pip install --upgrade xformers==0.0.19
rem 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
)
Expand All @@ -106,4 +91,26 @@ python.exe .\tools\update_bitsandbytes.py

accelerate config

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
2 changes: 0 additions & 2 deletions uninstall.txt

This file was deleted.

0 comments on commit 5560714

Please sign in to comment.