Skip to content

Commit

Permalink
Fix SD Alternative pipeline README to use demo_alt.py (#784)
Browse files Browse the repository at this point in the history
Summary:
Currently SD Alternative pipeline examples use `demo.py` script.
I think it should use `demo_alt.py` instead

Other minor fixes:
- made demo_alt.py example commands multiline
- fixed CompVis spelling and added href to it.

Pull Request resolved: #784

Reviewed By: chenyang78

Differential Revision: D47039823

Pulled By: ipiszy

fbshipit-source-id: 885cbcef4a7904936da66d817d0eb62e06f5335a
  • Loading branch information
apivovarov authored and facebook-github-bot committed Jun 29, 2023
1 parent eb4c375 commit b080f5c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions examples/05_stable_diffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ By default, `compile_alt.py` does not include model weights (constants) with the

#### Alternative pipeline

The original pipeline requires a diffusers model local dir, and relies directly on `StableDiffusionPipeline`. This pipeline builds similar functionality without directly using `StableDiffusionPipeline`, and is capable of loading model weights from either diffusers or compvis models to compiled aitemplate modules.
The original pipeline requires a diffusers model local dir, and relies directly on `StableDiffusionPipeline`. This pipeline builds similar functionality without directly using `StableDiffusionPipeline`, and is capable of loading model weights from either diffusers or [CompVis](https://huggingface.co/CompVis) models to compiled aitemplate modules.

* AITemplate modules are created
* Model weights are loaded, converted/mapped, then applied to AITemplate module
Expand All @@ -67,8 +67,13 @@ The original pipeline requires a diffusers model local dir, and relies directly
* Loading CLIPTextModel from `ckpt` requires the appropriate `hf-hub-or-path` to be specified i.e. `runwayml/stable-diffusion-v1-5` for SD1.x checkpoints, `stabilityai/stable-diffusion-2-1` for SD2.x checkpoints.

```
python3 scripts/demo.py --hf-hub-or-path runwayml/stable-diffusion-v1-5 --ckpt v1-5-pruned-emaonly.ckpt
python3 scripts/demo.py --hf-hub-or-path stabilityai/stable-diffusion-2-1 --ckpt v2-1_768-ema-pruned.ckpt
python3 scripts/demo_alt.py \
--hf-hub-or-path runwayml/stable-diffusion-v1-5 \
--ckpt v1-5-pruned-emaonly.ckpt
python3 scripts/demo_alt.py \
--hf-hub-or-path stabilityai/stable-diffusion-2-1 \
--ckpt v2-1_768-ema-pruned.ckpt
```

`--ckpt` takes preference over `--hf-hub-or-path` if both are specified
Expand Down

0 comments on commit b080f5c

Please sign in to comment.