Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
limonspb committed Dec 13, 2022
2 parents 86025f1 + 2836976 commit 016b449
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 125 deletions.
125 changes: 69 additions & 56 deletions docs/features/WEBUIHOTKEYS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,72 @@ title: WebUI Hotkey List

# :material-keyboard: **WebUI Hotkey List**

## General

| Setting | Hotkey |
| ----------------- | ---------------------- |
| ++a++ | Set All Parameters |
| ++s++ | Set Seed |
| ++u++ | Upscale |
| ++r++ | Restoration |
| ++i++ | Show Metadata |
| ++d++ ++d++ ++l++ | Delete Image |
| ++alt+a++ | Focus prompt input |
| ++shift+i++ | Send To Image to Image |
| ++ctrl+enter++ | Start processing |
| ++shift+x++ | cancel Processing |
| ++shift+d++ | Toggle Dark Mode |
| ++"`"++ | Toggle console |

## Tabs

| Setting | Hotkey |
| ------- | ------------------------- |
| ++1++ | Go to Text To Image Tab |
| ++2++ | Go to Image to Image Tab |
| ++3++ | Go to Inpainting Tab |
| ++4++ | Go to Outpainting Tab |
| ++5++ | Go to Nodes Tab |
| ++6++ | Go to Post Processing Tab |

## Gallery

| Setting | Hotkey |
| -------------- | ------------------------------- |
| ++g++ | Toggle Gallery |
| ++left++ | Go to previous image in gallery |
| ++right++ | Go to next image in gallery |
| ++shift+p++ | Pin gallery |
| ++shift+up++ | Increase gallery image size |
| ++shift+down++ | Decrease gallery image size |
| ++shift+r++ | Reset image gallery size |

## Inpainting

| Setting | Hotkey |
| ---------------------------- | --------------------- |
| ++"["++ | Decrease brush size |
| ++"]"++ | Increase brush size |
| ++alt+"["++ | Decrease mask opacity |
| ++alt+"]"++ | Increase mask opacity |
| ++b++ | Select brush |
| ++e++ | Select eraser |
| ++ctrl+z++ | Undo brush stroke |
| ++ctrl+shift+z++, ++ctrl+y++ | Redo brush stroke |
| ++h++ | Hide mask |
| ++shift+m++ | Invert mask |
| ++shift+c++ | Clear mask |
| ++shift+j++ | Expand canvas |
## App Hotkeys

| Setting | Hotkey |
| -------------- | ------------------ |
| ++Ctrl+Enter++ | Invoke |
| ++Shift+X++ | Cancel |
| ++Alt+A++ | Focus Prompt |
| ++O++ | Toggle Options |
| ++Shift+O++ | Pin Options |
| ++Z++ | Toggle Viewer |
| ++G++ | Toggle Gallery |
| ++F++ | Maximize Workspace |
| ++1-5++ | Change Tabs |
| ++"`"++ | Toggle Console |

## General Hotkeys

| Setting | Hotkey |
| ----------- | ---------------------- |
| ++P++ | Set Prompt |
| ++S++ | Set Seed |
| ++A++ | Set Parameters |
| ++Shift+R++ | Restore Faces |
| ++Shift+U++ | Upscale |
| ++I++ | Show Info |
| ++Shift+I++ | Send To Image To Image |
| ++Del++ | Delete Image |
| ++Esc++ | Close Panels |

## Gallery Hotkeys

| Setting | Hotkey |
| --------------- | --------------------------- |
| ++Arrow Left++ | Previous Image |
| ++Arrow Right++ | Next Image |
| ++Shift+G++ | Toggle Gallery Pin |
| ++Shift+Up++ | Increase Gallery Image Size |
| ++Shift+Down++ | Decrease Gallery Image Size |

## Unified Canvas Hotkeys

| Setting | Hotkey |
| ------------------------- | ---------------------- |
| ++B++ | Select Brush |
| ++E++ | Select Eraser |
| ++[++ | Decrease Brush Size |
| ++]++ | Increase Brush Size |
| ++Shift+[++ | Decrease Brush Opacity |
| ++Shift+]++ | Increase Brush Opacity |
| ++V++ | Move Tool |
| ++Shift+F++ | Fill Bounding Box |
| ++Delete/Backspace++ | Erase Bounding Box |
| ++C++ | Select Color Picker |
| ++N++ | Toggle Snap |
| ++Hold Space++ | Quick Toggle Move |
| ++Q++ | Toggle Layer |
| ++Shift+C++ | Clear Mask |
| ++H++ | Hide Mask |
| ++Shift+H++ | Show/Hide Bounding Box |
| ++Shift+M++ | Merge Visible |
| ++Shift+S++ | Save To Gallery |
| ++Ctrl+C++ | Copy To Clipboard |
| ++Shift+D++ | Download Image |
| ++Ctrl+Z++ | Undo |
| ++Ctrl+Y / Ctrl+Shift+Z++ | Redo |
| ++R++ | Reset View |
| ++Arrow Left++ | Previous Staging Image |
| ++Arrow Right++ | Next Staging Image |
| ++Enter++ | Accept Staging Image |

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions frontend/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>InvokeAI - A Stable Diffusion Toolkit</title>
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
<script type="module" crossorigin src="./assets/index.d8f54146.js"></script>
<script type="module" crossorigin src="./assets/index.4a434b56.js"></script>
<link rel="stylesheet" href="./assets/index.8ee30fa0.css">
<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>
Expand All @@ -19,7 +19,7 @@

<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-entry" data-src="./assets/index-legacy-f27062cd.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-1d92538f.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>

</html>
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const CurrentImageButtons = () => {
};

useHotkeys(
'u',
'Shift+U',
() => {
if (
isESRGANAvailable &&
Expand Down Expand Up @@ -290,7 +290,7 @@ const CurrentImageButtons = () => {
};

useHotkeys(
'r',
'Shift+R',
() => {
if (
isGFPGANAvailable &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
desc: 'Use all parameters of the current image',
hotkey: 'A',
},
{ title: 'Restore Faces', desc: 'Restore the current image', hotkey: 'R' },
{ title: 'Upscale', desc: 'Upscale the current image', hotkey: 'U' },
{
title: 'Restore Faces',
desc: 'Restore the current image',
hotkey: 'Shift+R',
},
{ title: 'Upscale', desc: 'Upscale the current image', hotkey: 'Shift+U' },
{
title: 'Show Info',
desc: 'Show metadata info of the current image',
Expand Down Expand Up @@ -254,17 +258,17 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
hotkey: 'R',
},
{
title: 'Previous Image',
title: 'Previous Staging Image',
desc: 'Previous Staging Area Image',
hotkey: 'Arrow Left',
},
{
title: 'Next Image',
title: 'Next Staging Image',
desc: 'Next Staging Area Image',
hotkey: 'Arrow Right',
},
{
title: 'Accept Image',
title: 'Accept Staging Image',
desc: 'Accept Current Staging Area Image',
hotkey: 'Enter',
},
Expand Down
1 change: 1 addition & 0 deletions installer/create_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
cd "$(dirname "$0")"

VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" )
VERSION="$VERSION-p1"

echo "Be certain that you're in the 'installer' directory before continuing."
read -p "Press any key to continue, or CTRL-C to exit..."
Expand Down
56 changes: 31 additions & 25 deletions installer/install.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ set PYTHON_URL=https://www.python.org/downloads/windows/
set MINIMUM_PYTHON_VERSION=3.9.0
set PYTHON_URL=https://www.python.org/downloads/release/python-3109/


set err_msg=An error has occurred and the script could not continue.

@rem --------------------------- Intro -------------------------------
Expand Down Expand Up @@ -65,23 +64,21 @@ if %errorlevel% == 1 (
@rem Cleanup
del /q .tmp1 .tmp2

echo Updating PIP...
call python -m pip install --no-warn-script-location -q --upgrade pip

@rem --------------------- Get the requirements file ------------
echo.
echo Setting up requirements file for your system.
copy /y environments-and-requirements\requirements-win-colab-cuda.txt .\requirements.txt

@rem --------------------- Get the root directory for installation ------------
set rootdir=""
set response=""
set selection=""
set "rootdir="
set "response="
set "selection="
:pick_rootdir
if %rootdir% neq "" goto :done
if defined rootdir goto :done
set /p selection=Select the path to install InvokeAI's directory into [%UserProfile%]:
if %selection% == "" set selection=%UserProfile%
set dest=%selection%\invokeai
if not defined selection set selection=%UserProfile%
set selection=%selection:"=%
set dest="%selection%\invokeai"
if exist %dest% (
set response=y
set /p response=The directory %dest% exists. Do you wish to resume install from a previous attempt? [Y/n]:
Expand All @@ -93,16 +90,18 @@ set selection=""
set response=y
set /p response="You have chosen to install InvokeAI into %rootdir%. OK? [Y/n]: "
if !response! == "" set response=y
if /I !response! neq y set rootdir=""
if /I !response! neq y set "rootdir="
goto :pick_rootdir
:done

set rootdir=%rootdir:"=%

@rem ---------------------- Initialize the runtime directory ---------------------
echo.
echo *** Creating Runtime Directory %rootdir% ***
if not exist %rootdir% mkdir %rootdir%
if not exist "%rootdir%" mkdir "%rootdir%"
@rem for unknown reasons the mkdir works but returns an error code
if not exist %rootdir% (
if not exist "%rootdir%" (
set err_msg=Could not create the directory %rootdir%. Please check the directory's permissions and try again.
goto :err_exit
)
Expand All @@ -111,7 +110,7 @@ echo Successful.
@rem --------------------------- Create and populate .venv ---------------------------
echo.
echo ** Creating Virtual Environment for InvokeAI **
call python -mvenv %rootdir%\.venv
call python -mvenv "%rootdir%\.venv"
if %errorlevel% neq 0 (
set err_msg=Could not create virtual environment %rootdir%\.venv. Please check the directory's permissions and try again.
goto :err_exit
Expand All @@ -120,40 +119,46 @@ echo Successful.

echo.
echo *** Installing InvokeAI Requirements ***
call %rootdir%\.venv\Scripts\activate.bat
echo Activating environment
call "%rootdir%\.venv\Scripts\activate.bat"

set PYTHON=%rootdir%\.venv\Scripts\python
echo updating pip with "%PYTHON%"
call "%PYTHON%" -mensurepip --upgrade

copy environments-and-requirements\requirements-win-colab-cuda.txt .\requirements.txt
call python -mpip install -r requirements.txt
call "%PYTHON%" -mpip install --prefer-binary -r requirements.txt
if %errorlevel% neq 0 (
set err_msg=Installation of requirements failed. See above for errors and check %TROUBLESHOOTING% for potential solutions.
set err_msg=Requirements installation failed. See above for errors and check %TROUBLESHOOTING% for potential solutions.
goto :err_exit
)
echo Installation successful.

echo.
echo *** Installing InvokeAI Modules and Executables ***
call python -mpip install %INVOKE_AI_SRC%
call "%PYTHON%" -mpip install %INVOKE_AI_SRC%
if %errorlevel% neq 0 (
set err_msg=Installation of InvokeAI failed. See above for errors and check %TROUBLESHOOTING% for potential solutions.
goto :err_exit
)
echo Installation successful.

@rem --------------------------- Set up the root directory ---------------------------
xcopy /E /Y .\templates\rootdir %rootdir%
xcopy /E /Y .\templates\rootdir "%rootdir%"
PUSHD "%rootdir%"
call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root="%rootdir%"
call "%PYTHON%" .venv\Scripts\configure_invokeai.py "--root=%rootdir%"
if %errorlevel% neq 0 (
set err_msg=Configuration failed. See above for error messages and check %TROUBLESHOOTING% for potential solutions.
goto :err_exit
)
POPD
copy .\templates\invoke.bat.in %rootdir%\invoke.bat
copy .\templates\update.bat.in %rootdir%\update.bat
copy .\templates\invoke.bat.in "%rootdir%\invoke.bat"
copy .\templates\update.bat.in "%rootdir%\update.bat"

@rem so that update.bat works
mkdir %rootdir%\environments-and-requirements
xcopy /I /Y .\environments-and-requirements %rootdir%\environments-and-requirements
copy .\requirements.txt %rootdir%\requirements.txt
mkdir "%rootdir%\environments-and-requirements"
xcopy /I /Y .\environments-and-requirements "%rootdir%\environments-and-requirements"
copy .\requirements.txt "%rootdir%\requirements.txt"


echo.
Expand Down Expand Up @@ -213,3 +218,4 @@ echo The installer will exit now.
pause
exit /b

pause
Loading

0 comments on commit 016b449

Please sign in to comment.