Skip to content

Commit

Permalink
Remove repetitive pip install commands (#1367)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohitIntel authored Sep 26, 2024
1 parent 29d8604 commit b6a2f68
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions examples/stable-diffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ This directory contains a script that showcases how to perform text-to-image gen
Stable Diffusion was proposed in [Stable Diffusion Announcement](https://stability.ai/blog/stable-diffusion-announcement) by Patrick Esser and Robin Rombach and the Stability AI team.


## Requirements

First, you should install the requirements:
```bash
pip install -r requirements.txt
```


## Text-to-image Generation

### Single Prompt
Expand Down Expand Up @@ -298,7 +306,6 @@ It is a type of model for controlling StableDiffusion by conditioning the model

Here is how to generate images conditioned by canny edge model:
```bash
pip install -r requirements.txt
python text_to_image_generation.py \
--model_name_or_path CompVis/stable-diffusion-v1-4 \
--controlnet_model_name_or_path lllyasviel/sd-controlnet-canny \
Expand All @@ -315,7 +322,6 @@ python text_to_image_generation.py \

Here is how to generate images conditioned by canny edge model and with multiple prompts:
```bash
pip install -r requirements.txt
python text_to_image_generation.py \
--model_name_or_path CompVis/stable-diffusion-v1-4 \
--controlnet_model_name_or_path lllyasviel/sd-controlnet-canny \
Expand All @@ -332,7 +338,6 @@ python text_to_image_generation.py \

Here is how to generate images conditioned by canny edge model and with two prompts on two HPUs:
```bash
pip install -r requirements.txt
python ../gaudi_spawn.py \
--world_size 2 text_to_image_generation.py \
--model_name_or_path CompVis/stable-diffusion-v1-4 \
Expand All @@ -351,7 +356,6 @@ python ../gaudi_spawn.py \

Here is how to generate images conditioned by open pose model:
```bash
pip install -r requirements.txt
python text_to_image_generation.py \
--model_name_or_path CompVis/stable-diffusion-v1-4 \
--controlnet_model_name_or_path lllyasviel/sd-controlnet-openpose \
Expand All @@ -369,7 +373,6 @@ python text_to_image_generation.py \

Here is how to generate images with conditioned by canny edge model using Stable Diffusion 2
```bash
pip install -r requirements.txt
python text_to_image_generation.py \
--model_name_or_path stabilityai/stable-diffusion-2-1 \
--controlnet_model_name_or_path thibaud/controlnet-sd21-canny-diffusers \
Expand Down Expand Up @@ -434,7 +437,6 @@ Here is how to generate images with one prompt and one image.
Take instruct-pix2pix as an example.

```bash
pip install -r requirements.txt
python image_to_image_generation.py \
--model_name_or_path "timbrooks/instruct-pix2pix" \
--src_image_path "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg" \
Expand All @@ -460,7 +462,6 @@ python image_to_image_generation.py \

Here is how to generate images with several prompts and one image.
```bash
pip install -r requirements.txt
python image_to_image_generation.py \
--model_name_or_path "timbrooks/instruct-pix2pix" \
--src_image_path "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg" \
Expand All @@ -486,7 +487,6 @@ python image_to_image_generation.py \

Here is how to generate SDXL images with a single prompt and one image:
```bash
pip install -r requirements.txt
python image_to_image_generation.py \
--model_name_or_path "stabilityai/stable-diffusion-xl-refiner-1.0" \
--src_image_path "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg" \
Expand All @@ -506,7 +506,6 @@ python image_to_image_generation.py \

Here is how to generate images with one image, it does not accept prompt input
```bash
pip install -r requirements.txt
python image_to_image_generation.py \
--model_name_or_path "lambdalabs/sd-image-variations-diffusers" \
--src_image_path "https://github.com/SHI-Labs/Versatile-Diffusion/blob/master/assets/demo/reg_example/ghibli.jpg?raw=true" \
Expand Down

0 comments on commit b6a2f68

Please sign in to comment.