diff --git a/README.md b/README.md index 061c15b..a646c24 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/environment.yaml b/environment.yaml index 4687b30..3e8491e 100644 --- a/environment.yaml +++ b/environment.yaml @@ -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 . diff --git a/requirements-app.txt b/requirements-app.txt new file mode 100644 index 0000000..43ef703 --- /dev/null +++ b/requirements-app.txt @@ -0,0 +1,3 @@ +gradio==3.11 +streamlit==1.12.1 +streamlit-drawable-canvas==0.8.0 diff --git a/requirements.txt b/requirements.txt index 0cd8b07..a59e98d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 .