Skip to content

Commit

Permalink
tweak setup and environment files for linux & pypatchmatch (#1580)
Browse files Browse the repository at this point in the history
* tweak setup and environment files for linux & pypatchmatch

- Downgrade python requirements to 3.9 because 3.10 is not supported
  on Ubuntu 20.04 LTS (widely-used distro)
- Use our github pypatchmatch 0.1.3 in order to install Makefile
  where it needs to be.
- Restored "-e ." as the last install step on pip installs. Hopefully
  this will not trigger the high-CPU hang we've previously experienced.

* keep windows on basicsr 1.4.1

* keep windows on basicsr 1.4.1

* bump pypatchmatch requirement to 0.1.4

- This brings in a version of pypatchmatch that will gracefully
  handle internet connection not available at startup time.
- Also refactors and simplifies the handling of gfpgan's basicsr requirement
  across various platforms.
  • Loading branch information
lstein authored Nov 29, 2022
1 parent 6cc5604 commit 8423be5
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions environments-and-requirements/environment-lin-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ dependencies:
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
- git+https://github.com/invoke-ai/GFPGAN#egg=gfpgan
- git+https://github.com/invoke-ai/[email protected].1#egg=pypatchmatch
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan
- -e git+https://github.com/invoke-ai/[email protected].4#egg=pypatchmatch
- -e .
4 changes: 2 additions & 2 deletions environments-and-requirements/environment-lin-amd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.9
- python=3.9.*
- pip=22.2.2
- numpy=1.23.3
- pip:
Expand Down Expand Up @@ -44,5 +44,5 @@ dependencies:
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
- git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
- git+https://github.com/invoke-ai/[email protected].1#egg=pypatchmatch
- -e git+https://github.com/invoke-ai/[email protected].4#egg=pypatchmatch
- -e .
4 changes: 2 additions & 2 deletions environments-and-requirements/environment-lin-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- python=3.9.*
- pip=22.2.2
- numpy=1.23.3
- torchvision=0.13.1
Expand Down Expand Up @@ -43,5 +43,5 @@ dependencies:
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
- git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
- git+https://github.com/invoke-ai/[email protected].1#egg=pypatchmatch
- -e git+https://github.com/invoke-ai/[email protected].4#egg=pypatchmatch
- -e .
2 changes: 1 addition & 1 deletion environments-and-requirements/environment-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies:
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
- git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
- git+https://github.com/invoke-ai/[email protected].1#egg=pypatchmatch
- -e git+https://github.com/invoke-ai/[email protected].4#egg=pypatchmatch
- -e .
variables:
PYTORCH_ENABLE_MPS_FALLBACK: 1
6 changes: 3 additions & 3 deletions environments-and-requirements/environment-win-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.9
- python=3.10.*
- pip=22.2.2
- numpy=1.23.3
- torchvision=0.13.1
Expand Down Expand Up @@ -43,6 +43,6 @@ dependencies:
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
- git+https://github.com/invoke-ai/GFPGAN#egg=gfpgan
- git+https://github.com/invoke-ai/[email protected].1#egg=pypatchmatch
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.1#egg=gfpgan
- -e git+https://github.com/invoke-ai/[email protected].4#egg=pypatchmatch
- -e .
4 changes: 3 additions & 1 deletion environments-and-requirements/requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ torch-fidelity
torchmetrics
transformers==4.21.*
picklescan
git+https://github.com/invoke-ai/[email protected]#egg=gfpgan ; platform_system == 'Windows'
git+https://github.com/invoke-ai/[email protected]#egg=gfpgan ; platform_system != 'Windows'
git+https://github.com/openai/CLIP.git@main#egg=clip
git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
git+https://github.com/invoke-ai/[email protected].1#egg=pypatchmatch
git+https://github.com/invoke-ai/[email protected].4#egg=pypatchmatch
3 changes: 0 additions & 3 deletions environments-and-requirements/requirements-lin-amd.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
-r environments-and-requirements/requirements-base.txt

git+https://github.com/invoke-ai/[email protected]#egg=gfpgan

# Get hardware-appropriate torch/torchvision
--extra-index-url https://download.pytorch.org/whl/rocm5.1.1 --trusted-host https://download.pytorch.org
torch
Expand Down
3 changes: 0 additions & 3 deletions environments-and-requirements/requirements-lin-arm64.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
--pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu

git+https://github.com/invoke-ai/[email protected]#egg=gfpgan

-r environments-and-requirements/requirements-base.txt
-e .
1 change: 0 additions & 1 deletion environments-and-requirements/requirements-lin-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-r environments-and-requirements/requirements-base.txt
git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
-e .
1 change: 0 additions & 1 deletion environments-and-requirements/requirements-mac-mps-cpu.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r environments-and-requirements/requirements-base.txt
git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
grpcio<1.51.0
protobuf==3.19.6
torch<1.13.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r environments-and-requirements/requirements-base.txt
git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
# Get hardware-appropriate torch/torchvision
--extra-index-url https://download.pytorch.org/whl/cu116 --trusted-host https://download.pytorch.org
basicsr==1.4.1
Expand Down
3 changes: 2 additions & 1 deletion installer/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ kornia
numpy
pyreadline3
realesrgan
requests==2.25.1
send2trash
streamlit
taming-transformers-rom1504
Expand All @@ -29,4 +30,4 @@ clip
clipseg
gfpgan
k-diffusion

pypatchmatch
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _get_requirements(path):
return packages


VERSION = '2.1.4'
VERSION = '2.2.0'
DESCRIPTION = ('An implementation of Stable Diffusion which provides various new features'
' and options to aid the image generation process')
LONG_DESCRIPTION = ('This version of Stable Diffusion features a slick WebGUI, an'
Expand Down

0 comments on commit 8423be5

Please sign in to comment.