candidate install scripts for testing

This commit is contained in:
Lincoln Stein 2022-11-01 13:54:42 -04:00
parent ce298d32b5
commit 408cf5e092
3 changed files with 12 additions and 7 deletions

View File

@ -82,7 +82,7 @@ call conda activate
@rem create the environment @rem create the environment
call conda env remove -n invokeai call conda env remove -n invokeai
call conda env create call conda env create
if "%ERRORLEVEL%" NE "0" ( if "%ERRORLEVEL%" NEQ "0" (
echo "" echo ""
echo "Something went wrong while installing Python libraries and cannot continue. echo "Something went wrong while installing Python libraries and cannot continue.
echo "Please visit https://invoke-ai.github.io/InvokeAI/#installation for alternative" echo "Please visit https://invoke-ai.github.io/InvokeAI/#installation for alternative"
@ -95,7 +95,7 @@ if "%ERRORLEVEL%" NE "0" (
call conda activate invokeai call conda activate invokeai
@rem preload the models @rem preload the models
call python scripts\preload_models.py call python scripts\preload_models.py
if "%ERRORLEVEL%" NE "0" ( if "%ERRORLEVEL%" NEQ "0" (
echo "" echo ""
echo "The preload_models.py script crashed or was cancelled." echo "The preload_models.py script crashed or was cancelled."
echo "InvokeAI is not ready to run. To run preload_models.py again," echo "InvokeAI is not ready to run. To run preload_models.py again,"
@ -107,6 +107,7 @@ if "%ERRORLEVEL%" NE "0" (
@rem tell the user their next steps @rem tell the user their next steps
echo "" echo ""
echo "* InvokeAI installed successfully *"
echo "You can now start generating images by double-clicking the 'invoke.bat' file (inside this folder) echo "You can now start generating images by double-clicking the 'invoke.bat' file (inside this folder)
echo "Press any key to continue" echo "Press any key to continue"
pause pause

View File

@ -103,20 +103,20 @@ else
conda env create -f environment.yml conda env create -f environment.yml
fi fi
status = $? status=$?
if test $status -ne 0 if test $status -ne 0
then then
echo "Something went wrong while installing Python libraries and cannot continue. echo "Something went wrong while installing Python libraries and cannot continue."
echo "Please visit https://invoke-ai.github.io/InvokeAI/#installation for alternative" echo "Please visit https://invoke-ai.github.io/InvokeAI/#installation for alternative"
echo "installation methods" echo "installation methods"
else else
conda activate invokeai conda activate invokeai
# preload the models # preload the models
echo "Calling the preload_models.py script" echo "Calling the preload_models.py script"
python scripts/preload_models.py python scripts/preload_models.py
if test $? -ne 0 status=$?
if test $status -ne 0
then then
echo "The preload_models.py script crashed or was cancelled." echo "The preload_models.py script crashed or was cancelled."
echo "InvokeAI is not ready to run. To run preload_models.py again," echo "InvokeAI is not ready to run. To run preload_models.py again,"
@ -124,4 +124,7 @@ else
else else
# tell the user their next steps # tell the user their next steps
echo "You can now start generating images by running invoke.sh (inside this folder), using ./invoke.sh" echo "You can now start generating images by running invoke.sh (inside this folder), using ./invoke.sh"
fi
fi fi
conda activate invokeai

View File

@ -104,7 +104,7 @@ this program and resume later.\n'''
#-------------------------------------------- #--------------------------------------------
def postscript(): def postscript():
print( print(
'''You're all set! You may now launch InvokeAI using one of these two commands: '''\n** Model Installation Successful **\nYou're all set! You may now launch InvokeAI using one of these two commands:
Web version: Web version:
python scripts/invoke.py --web (connect to http://localhost:9090) python scripts/invoke.py --web (connect to http://localhost:9090)
@ -277,6 +277,7 @@ def download_weight_datasets(models:dict, access_token:str):
if len(successful) < len(models): if len(successful) < len(models):
print(f'\n* There were errors downloading one or more files.') print(f'\n* There were errors downloading one or more files.')
print('Please double-check your license agreements, and your access token. Type ^C to quit.\n') print('Please double-check your license agreements, and your access token. Type ^C to quit.\n')
hfFolder.delete_token()
return None return None
HfFolder.save_token(access_token) HfFolder.save_token(access_token)