Compare commits

...

19 Commits

Author SHA1 Message Date
339aa94cf3 add locales to frontend dist package
- bump to patchlevel 6
2022-12-31 15:46:57 +00:00
5057beddf5 bump rc# 2022-12-30 12:53:25 +00:00
ade9bbe185 rebuild frontend 2022-12-30 12:52:43 +00:00
83df5c211c create_installer now adds version number 2022-12-29 14:37:01 +00:00
75f07dd22e Merge branch 'main' into lstein-release-candidate-2-2-5 2022-12-29 09:01:08 -05:00
060eff5dad bump rc version 2022-12-28 20:37:36 -05:00
5d00831f71 Merge branch 'main' into lstein-release-candidate-2-2-5 2022-12-28 20:33:39 -05:00
d74ed7e974 bring installers up to date with 2.2.5-rc2 2022-12-29 01:21:55 +00:00
451750229d model_cache applies rootdir to config path 2022-12-28 17:59:53 +00:00
080fe48106 Merge branch 'lstein-release-candidate-2-2-5' of github.com:invoke-ai/InvokeAI into lstein-release-candidate-2-2-5 2022-12-28 17:59:15 +00:00
ff0eb56c96 remove extraneous whitespace 2022-12-28 13:44:29 +00:00
006123aa32 rc2.2.5 (install.sh) relative path fixes (#2155)
* (installer) fix bug in resolution of relative paths in linux install script

point installer at 2.2.5-rc1

selecting ~/Data/myapps/ as location  would create a ./~/Data/myapps
instead of expanding the ~/ to the value of ${HOME}

also, squash the trailing slash in path, if it was entered by the user

* (installer) add option to automatically start the app after install

also: when exiting, print the command to get back into the app
2022-12-28 08:00:35 -05:00
540da32bd5 give Linux user option of installing ROCm or CUDA 2022-12-26 02:37:16 +00:00
aa084b205f Merge branch 'main' into lstein-release-candidate-2-2-5 2022-12-25 19:02:01 -05:00
49f97f994a fix permissions on create_installer.sh 2022-12-25 19:00:41 -05:00
211d7be03d bump version number 2022-12-25 18:28:06 -05:00
7d99416cc9 update pulls from "latest" now 2022-12-25 23:11:35 +00:00
f60bf9e1e6 update.bat.in debugged and working 2022-12-25 18:13:06 +00:00
fce7b5466a installer tweaks in preparation for v2.2.5
- pin numpy to 1.23.* to avoid requirements conflict with numba
- update.sh and update.bat now accept a tag or branch string, not a URL
- update scripts download latest requirements-base before updating.
2022-12-25 17:36:59 +00:00
23 changed files with 260 additions and 80 deletions

View File

@ -14,7 +14,7 @@ huggingface-hub
imageio imageio
imageio-ffmpeg imageio-ffmpeg
kornia kornia
numpy numpy==1.23.*
omegaconf omegaconf
opencv-python opencv-python
picklescan picklescan

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>InvokeAI - A Stable Diffusion Toolkit</title> <title>InvokeAI - A Stable Diffusion Toolkit</title>
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" /> <link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
<script type="module" crossorigin src="./assets/index.21ff81eb.js"></script> <script type="module" crossorigin src="./assets/index.8ab082b4.js"></script>
<link rel="stylesheet" href="./assets/index.0dadf5d0.css"> <link rel="stylesheet" href="./assets/index.0dadf5d0.css">
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script> <script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script> <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
@ -18,6 +18,6 @@
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script> <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-dde3a68a.js"></script> <script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-dde3a68a.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-b741077f.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script> <script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-a125eeb7.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>

View File

@ -1 +1,50 @@
{} {
"modelManager": "模型管理器",
"model": "模型",
"modelAdded": "模型已添加",
"modelUpdated": "模型已更新",
"modelEntryDeleted": "模型已删除",
"cannotUseSpaces": "不能使用空格",
"addNew": "添加",
"addNewModel": "添加新模型",
"addManually": "手动添加",
"manual": "手动",
"name": "名称",
"nameValidationMsg": "输入模型的名称",
"description": "描述",
"descriptionValidationMsg": "添加模型的描述",
"config": "配置",
"configValidationMsg": "模型配置文件的路径",
"modelLocation": "模型位置",
"modelLocationValidationMsg": "模型文件的路径",
"vaeLocation": "VAE 位置",
"vaeLocationValidationMsg": "VAE 文件的路径",
"width": "宽度",
"widthValidationMsg": "模型的默认宽度",
"height": "高度",
"heightValidationMsg": "模型的默认高度",
"addModel": "添加模型",
"updateModel": "更新模型",
"availableModels": "可用模型",
"search": "搜索",
"load": "加载",
"active": "活跃",
"notLoaded": "未加载",
"cached": "缓存",
"checkpointFolder": "模型检查点文件夹",
"clearCheckpointFolder": "清除模型检查点文件夹",
"findModels": "寻找模型",
"modelsFound": "找到的模型",
"selectFolder": "选择文件夹",
"selected": "已选择",
"selectAll": "选择所有",
"deselectAll": "取消选择所有",
"showExisting": "显示已存在",
"addSelected": "添加选择",
"modelExists": "模型已存在",
"delete": "删除",
"deleteModel": "删除模型",
"deleteConfig": "删除配置",
"deleteMsg1": "您确定要将这个模型从 InvokeAI 删除吗?",
"deleteMsg2": "这不会从磁盘中删除模型检查点文件。如果您愿意,可以重新添加它们。"
}

View File

@ -5,7 +5,7 @@
"width": "Ширина", "width": "Ширина",
"height": "Высота", "height": "Высота",
"sampler": "Семплер", "sampler": "Семплер",
"seed": "Сид (Seed)", "seed": "Сид",
"randomizeSeed": "Случайный сид", "randomizeSeed": "Случайный сид",
"shuffle": "Обновить", "shuffle": "Обновить",
"noiseThreshold": "Порог шума", "noiseThreshold": "Порог шума",

View File

@ -4,7 +4,7 @@
"saveSteps": "Zapisuj obrazy co X kroków", "saveSteps": "Zapisuj obrazy co X kroków",
"confirmOnDelete": "Potwierdzaj usuwanie", "confirmOnDelete": "Potwierdzaj usuwanie",
"displayHelpIcons": "Wyświetlaj ikony pomocy", "displayHelpIcons": "Wyświetlaj ikony pomocy",
"useCanvasBeta": "Nowego układ trybu uniwersalnego", "useCanvasBeta": "Nowy układ trybu uniwersalnego",
"enableImageDebugging": "Włącz debugowanie obrazu", "enableImageDebugging": "Włącz debugowanie obrazu",
"resetWebUI": "Zresetuj interfejs", "resetWebUI": "Zresetuj interfejs",
"resetWebUIDesc1": "Resetowanie interfejsu wyczyści jedynie dane i ustawienia zapisane w pamięci przeglądarki. Nie usunie żadnych obrazów z dysku.", "resetWebUIDesc1": "Resetowanie interfejsu wyczyści jedynie dane i ustawienia zapisane w pamięci przeglądarki. Nie usunie żadnych obrazów z dysku.",

1
frontend/dist/locales/tooltip/de.json vendored Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,15 @@
{
"feature": {
"prompt": "This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",
"gallery": "As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",
"other": "These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition.",
"seed": "Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs.",
"variations": "Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",
"upscale": "Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",
"faceCorrection": "Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",
"imageToImage": "Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended.",
"boundingBox": "The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",
"seamCorrection": "Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",
"infillAndScaling": "Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes)."
}
}

15
frontend/dist/locales/tooltip/en.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"feature": {
"prompt": "This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",
"gallery": "As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",
"other": "These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition.",
"seed": "Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs.",
"variations": "Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",
"upscale": "Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",
"faceCorrection": "Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",
"imageToImage": "Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended.",
"boundingBox": "The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",
"seamCorrection": "Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",
"infillAndScaling": "Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes)."
}
}

1
frontend/dist/locales/tooltip/it.json vendored Normal file
View File

@ -0,0 +1 @@
{}

15
frontend/dist/locales/tooltip/pl.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"feature": {
"prompt": "To pole musi zawierać cały tekst sugestii, w tym zarówno opis oczekiwanej zawartości, jak i terminy stylistyczne. Chociaż wagi mogą być zawarte w sugestiach, inne parametry znane z linii poleceń nie będą działać.",
"gallery": "W miarę generowania nowych wywołań w tym miejscu będą wyświetlane pliki z katalogu wyjściowego. Obrazy mają dodatkowo opcje konfiguracji nowych wywołań.",
"other": "Opcje umożliwią alternatywne tryby przetwarzania. Płynne scalanie będzie pomocne przy generowaniu powtarzających się wzorów. Optymalizacja wysokiej rozdzielczości wykonuje dwuetapowy cykl generowania i powinna być używana przy wyższych rozdzielczościach, gdy potrzebny jest bardziej spójny obraz/kompozycja.",
"seed": "Inicjator określa początkowy zestaw szumów, który kieruje procesem odszumiania i może być losowy lub pobrany z poprzedniego wywołania. Funkcja \"Poziom szumu\" może być użyta do złagodzenia saturacji przy wyższych wartościach CFG (spróbuj między 0-10), a Perlin może być użyty w celu dodania wariacji do twoich wyników.",
"variations": "Poziom zróżnicowania przyjmuje wartości od 0 do 1 i pozwala zmienić obraz wyjściowy dla ustawionego inicjatora. Interesujące wyniki uzyskuje się zwykle między 0,1 a 0,3.",
"upscale": "Korzystając z ESRGAN, możesz zwiększyć rozdzielczość obrazu wyjściowego bez konieczności zwiększania szerokości/wysokości w ustawieniach początkowych.",
"faceCorrection": "Poprawianie twarzy próbuje identyfikować twarze na obrazie wyjściowym i korygować wszelkie defekty/nieprawidłowości. W GFPGAN im większa siła, tym mocniejszy efekt. W metodzie Codeformer wyższa wartość oznacza bardziej wierne odtworzenie oryginalnej twarzy, nawet kosztem siły korekcji.",
"imageToImage": "Tryb \"Obraz na obraz\" pozwala na załadowanie obrazu wzorca, który obok wprowadzonych sugestii zostanie użyty porzez InvokeAI do wygenerowania nowego obrazu. Niższa wartość tego ustawienia będzie bardziej przypominać oryginalny obraz. Akceptowane są wartości od 0 do 1, a zalecany jest zakres od 0,25 do 0,75.",
"boundingBox": "Zaznaczony obszar odpowiada ustawieniom wysokości i szerokości w trybach Tekst na obraz i Obraz na obraz. Jedynie piksele znajdujące się w obszarze zaznaczenia zostaną uwzględnione podczas wywoływania nowego obrazu.",
"seamCorrection": "Opcje wpływające na poziom widoczności szwów, które mogą wystąpić, gdy wygenerowany obraz jest ponownie wklejany na płótno.",
"infillAndScaling": "Zarządzaj metodami wypełniania (używanymi na zamaskowanych lub wymazanych obszarach płótna) i skalowaniem (przydatne w przypadku zaznaczonego obszaru o b. małych rozmiarach)."
}
}

View File

@ -0,0 +1 @@
{}

1
frontend/dist/locales/tooltip/ru.json vendored Normal file
View File

@ -0,0 +1 @@
{}

29
installer/create_installer.sh Normal file → Executable file
View File

@ -3,11 +3,22 @@
cd "$(dirname "$0")" cd "$(dirname "$0")"
VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" ) VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" )
VERSION="$VERSION-p5" PATCH="-rc6"
VERSION="${VERSION}${PATCH}"
echo "Be certain that you're in the 'installer' directory before continuing." echo "Be certain that you're in the 'installer' directory before continuing."
read -p "Press any key to continue, or CTRL-C to exit..." read -p "Press any key to continue, or CTRL-C to exit..."
git commit -a
if ! git tag $VERSION ; then
echo "Existing/invalid tag"
exit -1
fi
git push origin :refs/tags/latest
git tag -fa latest
echo Building installer zip fles for InvokeAI v$VERSION echo Building installer zip fles for InvokeAI v$VERSION
# get rid of any old ones # get rid of any old ones
@ -23,7 +34,7 @@ cp -pr ../configs InvokeAI-Installer/templates/rootdir/
mkdir InvokeAI-Installer/templates/rootdir/{outputs,embeddings,models} mkdir InvokeAI-Installer/templates/rootdir/{outputs,embeddings,models}
cp install.sh.in InvokeAI-Installer/install.sh perl -p -e "s/^INVOKEAI_VERSION=.*/INVOKEAI_VERSION=\"$VERSION\"/" install.sh.in > InvokeAI-Installer/install.sh
chmod a+rx InvokeAI-Installer/install.sh chmod a+rx InvokeAI-Installer/install.sh
zip -r InvokeAI-installer-$VERSION-linux.zip InvokeAI-Installer zip -r InvokeAI-installer-$VERSION-linux.zip InvokeAI-Installer
@ -31,7 +42,7 @@ zip -r InvokeAI-installer-$VERSION-mac.zip InvokeAI-Installer
# now do the windows installer # now do the windows installer
rm InvokeAI-Installer/install.sh rm InvokeAI-Installer/install.sh
cp install.bat.in InvokeAI-Installer/install.bat perl -p -e "s/^set INVOKEAI_VERSION=.*/set INVOKEAI_VERSION=$VERSION/" install.bat.in > InvokeAI-Installer/install.bat
cp WinLongPathsEnabled.reg InvokeAI-Installer/ cp WinLongPathsEnabled.reg InvokeAI-Installer/
# this gets rid of the "-e ." at the end of the windows requirements file # this gets rid of the "-e ." at the end of the windows requirements file
@ -40,8 +51,18 @@ egrep -v '^-e .' InvokeAI-Installer/environments-and-requirements/requirements-w
cp InvokeAI-Installer/requirements.txt InvokeAI-Installer/environments-and-requirements/requirements-win-colab-cuda.txt cp InvokeAI-Installer/requirements.txt InvokeAI-Installer/environments-and-requirements/requirements-win-colab-cuda.txt
zip -r InvokeAI-installer-$VERSION-windows.zip InvokeAI-Installer zip -r InvokeAI-installer-$VERSION-windows.zip InvokeAI-Installer
mkdir tmp
cp templates/update.sh.in tmp/update.sh
cp templates/update.bat.in tmp/update.bat
chmod +x tmp/update.sh
chmod +x tmp/update.bat
cd tmp
zip InvokeAI-updater-$VERSION.zip update.sh update.bat
cd ..
mv tmp/InvokeAI-updater-$VERSION.zip .
# clean up # clean up
rm -rf InvokeAI-Installer rm -rf InvokeAI-Installer tmp
exit 0 exit 0

View File

@ -13,9 +13,10 @@ if "%1" == "use-cache" (
) )
@rem Config @rem Config
@rem this should be changed to the tagged release! @rem The version in the next line is replaced by an up to date release number
@rem set INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/main.zip @rem when create_installer.sh is run. Change the release number there.
set INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/refs/tags/v2.2.4.zip set INVOKEAI_VERSION=latest
set INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/refs/tags/%INVOKEAI_VERSION%.zip
set INSTRUCTIONS=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/ set INSTRUCTIONS=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/
set TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting set TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting
set PYTHON_URL=https://www.python.org/downloads/windows/ set PYTHON_URL=https://www.python.org/downloads/windows/

View File

@ -4,13 +4,15 @@
scriptdir=$(dirname "$0") scriptdir=$(dirname "$0")
cd "$scriptdir" cd "$scriptdir"
# This version number will be replaced by the one supplied to create_installers.sh.
# Do not change it here - change it in create_installers.sh.
INVOKEAI_VERSION="latest"
# make sure we are not already in a venv # make sure we are not already in a venv
# (don't need to check status) # (don't need to check status)
deactivate >/dev/null 2>&1 deactivate >/dev/null 2>&1
# this should be changed to the tagged release! INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/refs/tags/${INVOKEAI_VERSION}.zip
# INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/main.zip
INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/refs/tags/v2.2.4.zip
INSTRUCTIONS=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/ INSTRUCTIONS=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/
TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting TROUBLESHOOTING=https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting
MINIMUM_PYTHON_VERSION=3.9.0 MINIMUM_PYTHON_VERSION=3.9.0
@ -117,6 +119,10 @@ do
echo echo
readinput -e -p "Select your preferred location for the 'invokeai' directory [$HOME]: " -i $HOME input readinput -e -p "Select your preferred location for the 'invokeai' directory [$HOME]: " -i $HOME input
ROOTDIR=${input:=$HOME}/invokeai ROOTDIR=${input:=$HOME}/invokeai
# This is surprisingly hard to do in plain Bash; easier in ZSH. Just running python in subshell is easiest.
ROOTDIR=$(python -c "from pathlib import Path; print(Path('${ROOTDIR}').expanduser().resolve())")
read -e -p "InvokeAI will be installed into $ROOTDIR. OK? [y]: " input read -e -p "InvokeAI will be installed into $ROOTDIR. OK? [y]: " input
RESPONSE=${input:='y'} RESPONSE=${input:='y'}
if [ "$RESPONSE" == 'y' ]; then if [ "$RESPONSE" == 'y' ]; then
@ -166,8 +172,15 @@ if [ "$OS_NAME" == "osx" ]; then
egrep -v '^-e .' environments-and-requirements/requirements-mac-mps-cpu.txt >requirements.txt egrep -v '^-e .' environments-and-requirements/requirements-mac-mps-cpu.txt >requirements.txt
else else
if (lsmod | grep amdgpu) &>/dev/null ; then if (lsmod | grep amdgpu) &>/dev/null ; then
echo "Linux system with AMD GPU driver detected. Installing ROCm and CPU support" readinput -e -p "Linux system with AMD GPU driver detected. Install ROCm AMD accelerated support? (Otherwise, CUDA support will be installed) [n]: " input
RESPONSE=${input:='n'}
if [ "$RESPONSE" != "n" ]; then
echo "Installing ROCm (AMD) support"
egrep -v '^-e .' environments-and-requirements/requirements-lin-amd.txt >requirements.txt egrep -v '^-e .' environments-and-requirements/requirements-lin-amd.txt >requirements.txt
else
echo "Installing CUDA support"
egrep -v '^-e .' environments-and-requirements/requirements-lin-cuda.txt >requirements.txt
fi
else else
echo "Linux system detected. Installing CUDA and CPU support." echo "Linux system detected. Installing CUDA and CPU support."
egrep -v '^-e .' environments-and-requirements/requirements-lin-cuda.txt >requirements.txt egrep -v '^-e .' environments-and-requirements/requirements-lin-cuda.txt >requirements.txt
@ -209,4 +222,13 @@ chmod a+rx "$ROOTDIR"/invoke.sh
cp templates/update.sh.in "$ROOTDIR"/update.sh cp templates/update.sh.in "$ROOTDIR"/update.sh
chmod a+rx "$ROOTDIR"/update.sh chmod a+rx "$ROOTDIR"/update.sh
echo "You may now run InvokeAI by entering the directory $ROOTDIR and running invoke.sh" echo "You may now run InvokeAI by entering the directory $ROOTDIR and running invoke.sh:"
echo
echo " ${ROOTDIR}/invoke.sh"
echo
read -e -p "Run InvokeAI now? [y]:" input
RESPONSE=${input:='y'}
if [ "$RESPONSE" == 'y' ]; then
exec ${ROOTDIR}/invoke.sh
fi

View File

@ -11,9 +11,9 @@ cd "$scriptdir"
export INVOKEAI_ROOT="$scriptdir" export INVOKEAI_ROOT="$scriptdir"
# set required env var for torch on mac MPS # set required env var for torch on mac MPS
if [ "$(uname -s)" == "Darwin" ]; then if [ "$(uname -s)" == "Darwin" ]; then
export PYTORCH_ENABLE_MPS_FALLBACK=1 export PYTORCH_ENABLE_MPS_FALLBACK=1
fi fi
if [ "$0" != "bash" ]; then if [ "$0" != "bash" ]; then
echo "Do you want to generate images using the" echo "Do you want to generate images using the"

View File

@ -3,48 +3,66 @@ setlocal EnableExtensions EnableDelayedExpansion
PUSHD "%~dp0" PUSHD "%~dp0"
set INVOKE_AI_SRC=https://github.com/invoke-ai/InvokeAI/archive/main.zip set INVOKE_AI_VERSION=latest
set arg=%1 set arg=%1
if "%arg%" neq "" ( if "%arg%" neq "" (
if "%arg:~0,4%" neq "http" ( if "%arg:~0,2%" equ "/?" (
echo Usage: update.bat ^<release URL^>.zip echo Usage: update.bat ^<release name or branch^>
echo Updates InvokeAI to use the indicated version of the code base. 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 Find the version or branch 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 For example '.\update.bat v2.2.5' for release 2.2.5.
echo '.\update.bat main' for the latest development version
echo. echo.
echo If no argument provided then will install the most recent development version, equivalent to echo If no argument provided then will install the most recent release, equivalent to
echo update.bat https://github.com/invoke-ai/InvokeAI/archive/main.zip echo '.\update.bat latest'
exit /b exit /b
) else ( ) else (
set INVOKE_AI_SRC=%arg% set INVOKE_AI_VERSION=%arg%
) )
) )
set INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/!INVOKE_AI_VERSION!.zip"
set INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/!INVOKE_AI_VERSION!/environments-and-requirements/requirements-base.txt
call .venv\Scripts\activate.bat call curl -I "%INVOKE_AI_DEP%" -fs >.tmp.out
if %errorlevel% neq 0 (
echo '!INVOKE_AI_VERSION!' is not a known branch name or tag. Please check the version and try again.
echo "Press any key to continue"
pause
exit /b
)
del .tmp.out
echo This script will update InvokeAI and all its dependencies to !INVOKE_AI_SRC!. 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! echo If you do not want to do this, press control-C now!
pause pause
call curl -L "%INVOKE_AI_DEP%" > environments-and-requirements/requirements-base.txt
call .venv\Scripts\activate.bat
call .venv\Scripts\python -mpip install -r requirements.txt call .venv\Scripts\python -mpip install -r requirements.txt
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo Installation of requirements failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions. echo Installation of requirements failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
pause
exit /b exit /b
) )
call .venv\Scripts\python -mpip install !INVOKE_AI_SRC! call .venv\Scripts\python -mpip install !INVOKE_AI_SRC!
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo Installation of InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions. echo Installation of InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
pause
exit /b exit /b
) )
call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root=. @rem call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root=.
if %errorlevel% neq 0 ( @rem if %errorlevel% neq 0 (
echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions. @rem echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
exit /b @rem pause
) @rem exit /b
@rem )
echo InvokeAI has been updated to '%INVOKE_AI_VERSION%'
echo "Press any key to continue" echo "Press any key to continue"
pause pause

View File

@ -2,18 +2,22 @@
set -eu set -eu
if [ $# -ge 1 ] && [ "${1:0:4}" != "http" ]; then if [ $# -ge 1 ] && [ "${1:0:2}" == "-h" ]; then
echo "Usage: update.sh <release URL>.zip" echo "Usage: update.sh <release>"
echo "Updates InvokeAI to use the indicated version of the code base." 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 "Find the version or branch 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.3.zip" echo "For example: update.sh v2.2.5 for release 2.2.5."
echo " update.sh main for the current development version."
echo "" echo ""
echo "If no argument provided then will install the most recent development version, equivalent to" echo "If no argument provided then will install the version tagged with 'latest', equivalent to"
echo "update.sh https://github.com/invoke-ai/InvokeAI/archive/main.zip" echo "update.sh latest"
exit -1 exit -1
fi fi
INVOKE_AI_SRC=${1:-https://github.com/invoke-ai/InvokeAI/archive/main.zip} INVOKE_AI_VERSION=${1:-latest}
INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/$INVOKE_AI_VERSION.zip"
INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/environments-and-requirements/requirements-base.txt
# ensure we're in the correct folder in case user's CWD is somewhere else # ensure we're in the correct folder in case user's CWD is somewhere else
scriptdir=$(dirname "$0") scriptdir=$(dirname "$0")
@ -30,10 +34,17 @@ function _err_exit {
fi fi
} }
echo This script will update InvokeAI and all its dependencies from $INVOKE_AI_SRC. if ! curl -I "$INVOKE_AI_DEP" -fs >/dev/null; then
echo \'$INVOKE_AI_VERSION\' is not a known branch name or tag. Please check the version and try again.
exit
fi
echo This script will update InvokeAI and all its dependencies to version \'$INVOKE_AI_VERSION\'.
echo If you do not want to do this, press control-C now! echo If you do not want to do this, press control-C now!
read -p "Press any key to continue, or CTRL-C to exit..." read -p "Press any key to continue, or CTRL-C to exit..."
curl -L "$INVOKE_AI_DEP" > environments-and-requirements/requirements-base.txt
. .venv/bin/activate . .venv/bin/activate
./.venv/bin/python -mpip install -r requirements.txt ./.venv/bin/python -mpip install -r requirements.txt
@ -42,11 +53,7 @@ _err_exit $? "The pip program failed to install InvokeAI's requirements."
./.venv/bin/python -mpip install $INVOKE_AI_SRC ./.venv/bin/python -mpip install $INVOKE_AI_SRC
_err_exit $? "The pip program failed to install InvokeAI." _err_exit $? "The pip program failed to install InvokeAI."
./.venv/bin/python .venv/bin/configure_invokeai.py --root . echo InvokeAI updated to \'$INVOKE_AI_VERSION\'
_err_exit $? "The configure script failed to run successfully."
# ./.venv/bin/python .venv/bin/configure_invokeai.py --root .
# _err_exit $? "The configure script failed to run successfully."

View File

@ -135,7 +135,7 @@ def main():
try: try:
main_loop(gen, opt) main_loop(gen, opt)
except KeyboardInterrupt: except KeyboardInterrupt:
print("\ngoodbye!") print(f'\nGoodbye!\nYou can start InvokeAI again by running the "invoke.bat" (or "invoke.sh") script from {Globals.root}')
# TODO: main_loop() has gotten busy. Needs to be refactored. # TODO: main_loop() has gotten busy. Needs to be refactored.
def main_loop(gen, opt): def main_loop(gen, opt):
@ -410,7 +410,8 @@ def main_loop(gen, opt):
output_cntr = write_log(results, log_path ,('txt', 'md'), output_cntr) output_cntr = write_log(results, log_path ,('txt', 'md'), output_cntr)
print() print()
print('goodbye!')
print(f'\nGoodbye!\nYou can start InvokeAI again by running the "invoke.bat" (or "invoke.sh") script from {Globals.root}')
# TO DO: remove repetitive code and the awkward command.replace() trope # TO DO: remove repetitive code and the awkward command.replace() trope
# Just do a simple parse of the command! # Just do a simple parse of the command!

View File

@ -361,6 +361,8 @@ class ModelCache(object):
Write current configuration out to the indicated file. Write current configuration out to the indicated file.
''' '''
yaml_str = OmegaConf.to_yaml(self.config) yaml_str = OmegaConf.to_yaml(self.config)
if not os.path.isabs(config_file_path):
config_file_path = os.path.normpath(os.path.join(Globals.root,opt.conf))
tmpfile = os.path.join(os.path.dirname(config_file_path),'new_config.tmp') tmpfile = os.path.join(os.path.dirname(config_file_path),'new_config.tmp')
with open(tmpfile, 'w') as outfile: with open(tmpfile, 'w') as outfile:
outfile.write(self.preamble()) outfile.write(self.preamble())

View File

@ -5,7 +5,7 @@ from setuptools import setup, find_packages
def list_files(directory): def list_files(directory):
return [os.path.join(directory,x) for x in os.listdir(directory) if os.path.isfile(os.path.join(directory,x))] return [os.path.join(directory,x) for x in os.listdir(directory) if os.path.isfile(os.path.join(directory,x))]
VERSION = '2.2.4' VERSION = '2.2.5'
DESCRIPTION = ('An implementation of Stable Diffusion which provides various new features' DESCRIPTION = ('An implementation of Stable Diffusion which provides various new features'
' and options to aid the image generation process') ' and options to aid the image generation process')
LONG_DESCRIPTION = ('This version of Stable Diffusion features a slick WebGUI, an' LONG_DESCRIPTION = ('This version of Stable Diffusion features a slick WebGUI, an'
@ -81,6 +81,16 @@ setup(
], ],
data_files=[('frontend/dist',list_files('frontend/dist')), data_files=[('frontend/dist',list_files('frontend/dist')),
('frontend/dist/assets',list_files('frontend/dist/assets')), ('frontend/dist/assets',list_files('frontend/dist/assets')),
('frontend/dist/locales',list_files('frontend/dist/locales')),
('frontend/dist/locales/common',list_files('frontend/dist/locales/common')),
('frontend/dist/locales/gallery',list_files('frontend/dist/locales/gallery')),
('frontend/dist/locales/hotkeys',list_files('frontend/dist/locales/hotkeys')),
('frontend/dist/locales/modelmanager',list_files('frontend/dist/locales/modelmanager')),
('frontend/dist/locales/options',list_files('frontend/dist/locales/options')),
('frontend/dist/locales/settings',list_files('frontend/dist/locales/settings')),
('frontend/dist/locales/toast',list_files('frontend/dist/locales/toast')),
('frontend/dist/locales/tooltip',list_files('frontend/dist/locales/tooltip')),
('frontend/dist/locales/unifiedcanvas',list_files('frontend/dist/locales/unifiedcanvas')),
('assets',['assets/caution.png']), ('assets',['assets/caution.png']),
], ],
) )