InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

adds installation instructions for pypatchmatch on Linux

Open lstein opened this issue 3 years ago • 5 comments

This PR adds installation instructions for pypatchmatch on Ubuntu Linux. We need instructions for Macintosh and non-debian Linux as well.

lstein avatar Nov 27 '22 19:11 lstein

I'm confused here...

I have compiled libpatchmatch.so against macOS arm-64 and it appears that this is sufficient to use patchmatch. @mauwii copied it to their system and it worked. Did we decide not to just ship the compiled libraries? The actual installation instruction (to set up the environment and compile it) were pretty tedious.

psychedelicious avatar Nov 28 '22 05:11 psychedelicious

I'm confused here...

I have compiled libpatchmatch.so against macOS arm-64 and it appears that this is sufficient to use patchmatch. @mauwii copied it to their system and it worked. Did we decide not to just ship the compiled libraries? The actual installation instruction (to set up the environment and compile it) were pretty tedious.

Perfect! Let's ship it and then we won't need the installation instructions. Can you confirm that libpatchmatch.so has no dependencies on external libraries that need to be installed on the Mac? On my Ubuntu system, the same file needs various opencv .so files.

Do you know how to add libpatchmatch.so to the pypatchmatch package so that it is correctly identified and downloaded?

lstein avatar Nov 29 '22 14:11 lstein

FWIW, I added patchmatch to the Docker image in https://github.com/invoke-ai/InvokeAI/pull/1544/files using the Linux installation instructions, and it seems to have worked as expected. But that does add ~900MB of largely unnecessary opencv dependencies, so having a compiled library would be beneficial.

ebr avatar Nov 30 '22 08:11 ebr

FWIW, I added patchmatch to the Docker image in https://github.com/invoke-ai/InvokeAI/pull/1544/files using the Linux installation instructions, and it seems to have worked as expected. But that does add ~900MB of largely unnecessary opencv dependencies, so having a compiled library would be beneficial.

Wouldn't it work to create the library in a separate stage and just copy over the compiled version of it?

mauwii avatar Nov 30 '22 09:11 mauwii

Wouldn't it work to create the library in a separate stage and just copy over the compiled version of it?

See my response in the other PR - I tried a few ways to attempt that approach, but couldn't quite nail it down. I'll come back to optimize it another time, unless we build and distribute the compiled library as discussed above.

ebr avatar Nov 30 '22 15:11 ebr

superseded

lstein avatar Dec 03 '22 18:12 lstein