mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
4fd97ceddd
* remove redundant code line install.bat was copying the requirements file into the install folder twice, causing an error message on the second try. This fixes the issue. * add further improvements to installer - Windows version will unzip to have requirements.txt already in the right location, to prevent problems when users try to run the .bat script from within a mounted read-only zip file manager. - Do not assume that "pip" is on the path in either the .bat or shell versions of the update script.
53 lines
1.7 KiB
Batchfile
53 lines
1.7 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions EnableDelayedExpansion
|
|
|
|
PUSHD "%~dp0"
|
|
|
|
set INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/main.zip
|
|
set arg=%1
|
|
if "%arg%" neq "" (
|
|
if "%arg:~0,4%" neq "http" (
|
|
echo Usage: update.bat ^<release URL^>.zip
|
|
echo Updates InvokeAI to use the indicated version of the code base.
|
|
echo Find the zip file for the release you want, and pass it as the argument.
|
|
echo For example update.sh https://github.com/invoke-ai/InvokeAI/archive/refs/tags/v2.2.4.zip
|
|
echo.
|
|
echo If no argument provided then will install the most recent development version, equivalent to
|
|
echo update.bat https://github.com/invoke-ai/InvokeAI/archive/main.zip
|
|
exit /b
|
|
) else (
|
|
set INVOKE_AI_SRC=%arg%
|
|
)
|
|
)
|
|
|
|
|
|
call .venv\Scripts\activate.bat
|
|
|
|
echo This script will update InvokeAI and all its dependencies to !INVOKE_AI_SRC!.
|
|
echo If you do not want to do this, press control-C now!
|
|
pause
|
|
|
|
call .venv\Scripts\python -mpip install -r requirements.txt
|
|
if %errorlevel% neq 0 (
|
|
echo Installation of requirements failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
|
exit /b
|
|
)
|
|
|
|
call .venv\Scripts\python -mpip install !INVOKE_AI_SRC!
|
|
if %errorlevel% neq 0 (
|
|
echo Installation of InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
|
exit /b
|
|
)
|
|
|
|
call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root=.
|
|
|
|
if %errorlevel% neq 0 (
|
|
echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
|
exit /b
|
|
)
|
|
|
|
echo "Press any key to continue"
|
|
pause
|
|
endlocal
|
|
|