Move app reqs to separate file. Sort and sync existing deps. Update readme.

This commit is contained in:
kjerk 2022-12-06 11:28:15 -08:00
parent 4983241cba
commit 05096d4c51
4 changed files with 41 additions and 31 deletions

View file

@ -33,7 +33,7 @@ and [many others](#shout-outs).
Stable Diffusion is a latent text-to-image diffusion model.
________________________________
## Requirements
You can update an existing [latent diffusion](https://github.com/CompVis/latent-diffusion) environment by running
@ -43,6 +43,17 @@ conda install pytorch==1.12.1 torchvision==0.13.1 -c pytorch
pip install transformers==4.19.2 diffusers invisible-watermark
pip install -e .
```
#### App Requirements (Gradio, Streamlit)
Dependencies for the runtime apps are kept in a separate `requirements-app.txt` file.
```bash
# Pip
pip install -r requirements-app.txt
# or Conda
conda install --file requirements.txt
```
#### xformers efficient attention
For more efficiency and speed on GPUs,
we highly recommended installing the [xformers](https://github.com/facebookresearch/xformers)
@ -50,7 +61,7 @@ library.
Tested on A100 with CUDA 11.4.
Installation needs a somewhat recent version of nvcc and gcc/g++, obtain those, e.g., via
```commandline
```bash
export CUDA_HOME=/usr/local/cuda-11.4
conda install -c nvidia/label/cuda-11.4.0 cuda-nvcc
conda install -c conda-forge gcc
@ -59,7 +70,7 @@ conda install -c conda-forge gxx_linux-64=9.5.0
Then, run the following (compiling takes up to 30 min).
```commandline
```bash
cd ..
git clone https://github.com/facebookresearch/xformers.git
cd xformers

View file

@ -6,24 +6,23 @@ dependencies:
- python=3.8.5
- pip=20.3
- cudatoolkit=11.3
- numpy=1.23.1
- pytorch=1.12.1
- torchvision=0.13.1
- numpy=1.23.1
- pip:
- albumentations==1.3.0
- opencv-python==4.6.0.66
- imageio==2.9.0
- imageio-ffmpeg==0.4.2
- pytorch-lightning==1.4.2
- omegaconf==2.1.1
- test-tube>=0.7.5
- streamlit==1.12.1
- einops==0.3.0
- imageio-ffmpeg==0.4.2
- imageio==2.9.0
- invisible-watermark>=0.1.5
- kornia==0.6
- omegaconf==2.1.1
- open-clip-torch==2.7.0
- opencv-python==4.6.0.66
- pudb==2019.2
- pytorch-lightning==1.4.2
- test-tube>=0.7.5
- torchmetrics==0.6.0
- transformers==4.19.2
- webdataset==0.2.5
- kornia==0.6
- open_clip_torch==2.0.2
- invisible-watermark>=0.1.5
- streamlit-drawable-canvas==0.8.0
- torchmetrics==0.6.0
- -e .

3
requirements-app.txt Normal file
View file

@ -0,0 +1,3 @@
gradio==3.11
streamlit==1.12.1
streamlit-drawable-canvas==0.8.0

View file

@ -1,19 +1,16 @@
albumentations==0.4.3
opencv-python
pudb==2019.2
imageio==2.9.0
imageio-ffmpeg==0.4.2
pytorch-lightning==1.4.2
torchmetrics==0.6
omegaconf==2.1.1
test-tube>=0.7.5
streamlit>=0.73.1
albumentations==1.3.0
einops==0.3.0
imageio-ffmpeg==0.4.2
imageio==2.9.0
invisible-watermark>=0.1.5
kornia==0.6
omegaconf==2.1.1
open-clip-torch==2.7.0
opencv-python==4.6.0.66
pudb==2019.2
pytorch-lightning==1.4.2
test-tube>=0.7.5
torchmetrics==0.6.0
transformers==4.19.2
webdataset==0.2.5
open-clip-torch==2.7.0
gradio==3.11
kornia==0.6
invisible-watermark>=0.1.5
streamlit-drawable-canvas==0.8.0
-e .