Skip to content

Commit 34f8117

Browse files
mauwiilstein
andauthored
Fix patchmatch-docs (invoke-ai#2111)
* use `uname -m` instead of `arch` addressing invoke-ai#2105 * fix install patchmatch formating * fix 2 broken links * remove instruction to do develop install of patchmatch Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
1 parent c3f82d4 commit 34f8117

3 files changed

Lines changed: 76 additions & 79 deletions

File tree

docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ the desired release's zip file, which you can find by clicking on the green
9494
This point release removes references to the binary installer from the
9595
installation guide. The binary installer is not stable at the current
9696
time. First time users are encouraged to use the "source" installer as
97-
described in [Installing InvokeAI with the Source Installer](installation/INSTALL_SOURCE.md)
97+
described in [Installing InvokeAI with the Source Installer](installation/deprecated_documentation/INSTALL_SOURCE.md)
9898

9999
With InvokeAI 2.2, this project now provides enthusiasts and professionals a
100100
robust workflow solution for creating AI-generated and human facilitated

docs/installation/060_INSTALL_PATCHMATCH.md

Lines changed: 74 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,114 +2,111 @@
22
title: Installing PyPatchMatch
33
---
44

5-
# :octicons-paintbrush-16: Installing PyPatchMatch
5+
# :material-image-size-select-large: Installing PyPatchMatch
66

7-
pypatchmatch is a Python module for inpainting images. It is not
8-
needed to run InvokeAI, but it greatly improves the quality of
9-
inpainting and outpainting and is recommended.
7+
pypatchmatch is a Python module for inpainting images. It is not needed to run
8+
InvokeAI, but it greatly improves the quality of inpainting and outpainting and
9+
is recommended.
1010

11-
Unfortunately, it is a C++ optimized module and installation
12-
can be somewhat challenging. This guide leads you through the steps.
11+
Unfortunately, it is a C++ optimized module and installation can be somewhat
12+
challenging. This guide leads you through the steps.
1313

1414
## Windows
1515

16-
You're in luck! On Windows platforms PyPatchMatch will install
17-
automatically on Windows systems with no extra intervention.
16+
You're in luck! On Windows platforms PyPatchMatch will install automatically on
17+
Windows systems with no extra intervention.
1818

1919
## Macintosh
2020

21-
PyPatchMatch is not currently supported, but the team is working on
22-
it.
21+
PyPatchMatch is not currently supported, but the team is working on it.
2322

2423
## Linux
2524

26-
Prior to installing PyPatchMatch, you need to take the following
27-
steps:
25+
Prior to installing PyPatchMatch, you need to take the following steps:
2826

2927
### Debian Based Distros
3028

31-
3229
1. Install the `build-essential` tools:
3330

34-
```
35-
sudo apt update
36-
sudo apt install build-essential
37-
```
31+
```sh
32+
sudo apt update
33+
sudo apt install build-essential
34+
```
3835

3936
2. Install `opencv`:
4037

41-
```
42-
sudo apt install python3-opencv libopencv-dev
43-
```
38+
```sh
39+
sudo apt install python3-opencv libopencv-dev
40+
```
4441

4542
3. Fix the naming of the `opencv` package configuration file:
4643

47-
```
48-
cd /usr/lib/x86_64-linux-gnu/pkgconfig/
49-
ln -sf opencv4.pc opencv.pc
50-
```
51-
52-
4. Activate the environment you use for invokeai, either with
53-
`conda` or with a virtual environment.
54-
55-
5. Do a "develop" install of pypatchmatch:
56-
57-
```
58-
pip install "git+https://github.com/invoke-ai/PyPatchMatch@0.1.3#egg=pypatchmatch"
59-
```
60-
61-
6. Confirm that pypatchmatch is installed.
62-
At the command-line prompt enter `python`, and
63-
then at the `>>>` line type `from patchmatch import patch_match`:
64-
It should look like the follwing:
65-
66-
```
67-
Python 3.9.5 (default, Nov 23 2021, 15:27:38)
68-
[GCC 9.3.0] on linux
69-
Type "help", "copyright", "credits" or "license" for more information.
70-
>>> from patchmatch import patch_match
71-
Compiling and loading c extensions from "/home/lstein/Projects/InvokeAI/.invokeai-env/src/pypatchmatch/patchmatch".
72-
rm -rf build/obj libpatchmatch.so
73-
mkdir: created directory 'build/obj'
74-
mkdir: created directory 'build/obj/csrc/'
75-
[dep] csrc/masked_image.cpp ...
76-
[dep] csrc/nnf.cpp ...
77-
[dep] csrc/inpaint.cpp ...
78-
[dep] csrc/pyinterface.cpp ...
79-
[CC] csrc/pyinterface.cpp ...
80-
[CC] csrc/inpaint.cpp ...
81-
[CC] csrc/nnf.cpp ...
82-
[CC] csrc/masked_image.cpp ...
83-
[link] libpatchmatch.so ...
84-
```
85-
44+
```sh
45+
cd /usr/lib/x86_64-linux-gnu/pkgconfig/
46+
ln -sf opencv4.pc opencv.pc
47+
```
48+
49+
4. Activate the environment you use for invokeai, either with `conda` or with a
50+
virtual environment.
51+
52+
5. Install pypatchmatch:
53+
54+
```sh
55+
pip install "git+https://github.com/invoke-ai/PyPatchMatch@0.1.3#egg=pypatchmatch"
56+
```
57+
58+
6. Confirm that pypatchmatch is installed. At the command-line prompt enter
59+
`python`, and then at the `>>>` line type
60+
`from patchmatch import patch_match`: It should look like the follwing:
61+
62+
```py
63+
Python 3.9.5 (default, Nov 23 2021, 15:27:38)
64+
[GCC 9.3.0] on linux
65+
Type "help", "copyright", "credits" or "license" for more information.
66+
>>> from patchmatch import patch_match
67+
Compiling and loading c extensions from "/home/lstein/Projects/InvokeAI/.invokeai-env/src/pypatchmatch/patchmatch".
68+
rm -rf build/obj libpatchmatch.so
69+
mkdir: created directory 'build/obj'
70+
mkdir: created directory 'build/obj/csrc/'
71+
[dep] csrc/masked_image.cpp ...
72+
[dep] csrc/nnf.cpp ...
73+
[dep] csrc/inpaint.cpp ...
74+
[dep] csrc/pyinterface.cpp ...
75+
[CC] csrc/pyinterface.cpp ...
76+
[CC] csrc/inpaint.cpp ...
77+
[CC] csrc/nnf.cpp ...
78+
[CC] csrc/masked_image.cpp ...
79+
[link] libpatchmatch.so ...
80+
```
8681

8782
### Arch Based Distros
8883

8984
1. Install the `base-devel` package:
90-
```
91-
sudo pacman -Syu
92-
sudo pacman -S --needed base-devel
93-
```
85+
86+
```sh
87+
sudo pacman -Syu
88+
sudo pacman -S --needed base-devel
89+
```
9490

9591
2. Install `opencv`:
96-
```
97-
sudo pacman -S opencv
98-
```
99-
or for CUDA support
100-
```
101-
sudo pacman -S opencv-cuda
102-
```
10392

104-
3. Fix the naming of the `opencv` package configuration file:
105-
```
106-
cd /usr/lib/pkgconfig/
107-
ln -sf opencv4.pc opencv.pc
108-
```
93+
```sh
94+
sudo pacman -S opencv
95+
```
10996

110-
**Next, Follow Steps 4-6 from the Debian Section above**
97+
or for CUDA support
11198

99+
```sh
100+
sudo pacman -S opencv-cuda
101+
```
112102

113-
If you see no errors, then you're ready to go!
103+
3. Fix the naming of the `opencv` package configuration file:
114104

105+
```sh
106+
cd /usr/lib/pkgconfig/
107+
ln -sf opencv4.pc opencv.pc
108+
```
115109

110+
[**Next, Follow Steps 4-6 from the Debian Section above**](#linux)
111+
112+
If you see no errors, then you're ready to go!

docs/installation/INSTALL_MANUAL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ command-line completion.
152152
If you have already downloaded the weights file(s) for another Stable
153153
Diffusion distribution, you may skip this step (by selecting "skip" when
154154
prompted) and configure InvokeAI to use the previously-downloaded files. The
155-
process for this is described in [here](INSTALLING_MODELS.md).
155+
process for this is described in [here](050_INSTALLING_MODELS.md).
156156
157157
```bash
158158
python scripts/configure_invokeai.py

0 commit comments

Comments
 (0)