From 8f050d992e6faa78ca784b27f0a33a2da0f33100 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 1 Dec 2022 23:17:07 +0000 Subject: [PATCH] documentation fixes for release --- binary_installer/create_installers.sh | 6 +- docs/index.md | 4 ++ docs/installation/INSTALL_INVOKE.md | 6 +- docs/installation/INSTALL_PATCHMATCH.md | 86 +++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 docs/installation/INSTALL_PATCHMATCH.md diff --git a/binary_installer/create_installers.sh b/binary_installer/create_installers.sh index 479823881a..7267cffbf4 100755 --- a/binary_installer/create_installers.sh +++ b/binary_installer/create_installers.sh @@ -13,8 +13,8 @@ cp install.sh.in InvokeAI/install.sh chmod a+x InvokeAI/install.sh cp readme.txt InvokeAI -zip -r InvokeAI-linux.zip InvokeAI -zip -r InvokeAI-mac.zip InvokeAI +zip -r InvokeAI-binary-linux.zip InvokeAI +zip -r InvokeAI-binary-mac.zip InvokeAI # make the installer zip for windows rm -rf InvokeAI @@ -23,7 +23,7 @@ cp install.bat.in InvokeAI/install.bat cp readme.txt InvokeAI cp WinLongPathsEnabled.reg InvokeAI -zip -r InvokeAI-windows.zip InvokeAI +zip -r InvokeAI-binary-windows.zip InvokeAI rm -rf InvokeAI diff --git a/docs/index.md b/docs/index.md index 51087c1db0..40324094ce 100644 --- a/docs/index.md +++ b/docs/index.md @@ -86,6 +86,10 @@ AMD card (using the ROCm driver). For full installation and upgrade instructions, please see: [InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/) +Linux users who wish to make use of the PyPatchMatch inpainting +functions will need to perform a bit of extra work to enable this +module. Instructions can be found at [Installing PyPatchMatch](installation/INSTALL_PATCHMATCH.md). + ## :fontawesome-solid-computer: Hardware Requirements ### :octicons-cpu-24: System diff --git a/docs/installation/INSTALL_INVOKE.md b/docs/installation/INSTALL_INVOKE.md index f7a89fc2ed..3b2c2b103e 100644 --- a/docs/installation/INSTALL_INVOKE.md +++ b/docs/installation/INSTALL_INVOKE.md @@ -1,8 +1,8 @@ --- -title: InvokeAI Installer +title: InvokeAI Binary Installer --- -The InvokeAI installer is a shell script that will install InvokeAI onto a stock +The InvokeAI binary installer is a shell script that will install InvokeAI onto a stock computer running recent versions of Linux, MacOSX or Windows. It will leave you with a version that runs a stable version of InvokeAI. When a new version of InvokeAI is released, you will download and reinstall the new version. @@ -36,7 +36,7 @@ recommended model weights files. 1. Download the [latest release](https://github.com/invoke-ai/InvokeAI/releases/latest) of - InvokeAI's installer for your platform + InvokeAI's installer for your platform. Look for a file named InvokeAI-binary-.zip 2. Place the downloaded package someplace where you have plenty of HDD space, and have full permissions (i.e. `~/` on Lin/Mac; your home folder on Windows) diff --git a/docs/installation/INSTALL_PATCHMATCH.md b/docs/installation/INSTALL_PATCHMATCH.md new file mode 100644 index 0000000000..31afcdb1a3 --- /dev/null +++ b/docs/installation/INSTALL_PATCHMATCH.md @@ -0,0 +1,86 @@ +--- +title: Installing PyPatchMatch +--- + +# :octicons-paintbrush-16: Installing PyPatchMatch + +pypatchmatch is a Python module for inpainting images. It is not +needed to run InvokeAI, but it greatly improves the quality of +inpainting and outpainting and is recommended. + +Unfortunately, it is a C++ optimized module and installation +can be somewhat challenging. This guide leads you through the steps. + +## Windows + +You're in luck! On Windows platforms PyPatchMatch will install +automatically on Windows systems with no extra intervention. + +## Macintosh + +PyPatchMatch is not currently supported, but the team is working on +it. + +## Linux + +Prior to installing PyPatchMatch, you need to take the following +steps: + +1. Install the `build-essential` tools: + + ``` + sudo apt update + sudo apt install build-essential + ``` + +2. Install `opencv`: + + ``` + sudo apt install python3-opencv libopencv-dev + ``` + +3. Fix the naming of the `opencv` package configuration file: + + ``` + cd /usr/lib/x86_64-linux-gnu/pkgconfig/ + ln -sf opencv4.pc opencv.pc + +4. Activate the environment you use for invokeai, either with +`conda` or with a virtual environment. + +5. Do a "develop" install of pypatchmatch: + + ``` + pip install -e git+https://github.com/invoke-ai/PyPatchMatch@0.1.3#egg=pypatchmatch + ``` + +6. Confirm that pypatchmatch is installed. + At the command-line prompt enter `python`, and + then at the `>>>` line type `from patchmatch import patch_match`: + It should look like the follwing: + + ``` + Python 3.9.5 (default, Nov 23 2021, 15:27:38) + [GCC 9.3.0] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> from patchmatch import patch_match + Compiling and loading c extensions from "/home/lstein/Projects/InvokeAI/.invokeai-env/src/pypatchmatch/patchmatch". + rm -rf build/obj libpatchmatch.so + mkdir: created directory 'build/obj' + mkdir: created directory 'build/obj/csrc/' + [dep] csrc/masked_image.cpp ... + [dep] csrc/nnf.cpp ... + [dep] csrc/inpaint.cpp ... + [dep] csrc/pyinterface.cpp ... + [CC] csrc/pyinterface.cpp ... + [CC] csrc/inpaint.cpp ... + [CC] csrc/nnf.cpp ... + [CC] csrc/masked_image.cpp ... + [link] libpatchmatch.so ... + ``` + +If you see no errors, then you're ready to go! + + + +