Commit
·
3439518
1
Parent(s):
ef7c178
Faster diffusers demo
Browse files
README.md
CHANGED
|
@@ -74,7 +74,7 @@ The following example will use the fast DPM scheduler to generate an image in ca
|
|
| 74 |
|
| 75 |
First you should install diffusers main branch and some dependencies:
|
| 76 |
```
|
| 77 |
-
pip install git+https://github.com/huggingface/diffusers.git torch transformers sentencepiece
|
| 78 |
```
|
| 79 |
|
| 80 |
then you can run the following example:
|
|
@@ -83,7 +83,7 @@ then you can run the following example:
|
|
| 83 |
from diffusers import AltDiffusionPipeline, DPMSolverMultistepScheduler
|
| 84 |
import torch
|
| 85 |
|
| 86 |
-
pipe = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion", torch_dtype=torch.float16)
|
| 87 |
pipe = pipe.to("cuda")
|
| 88 |
|
| 89 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
|
|
|
| 74 |
|
| 75 |
First you should install diffusers main branch and some dependencies:
|
| 76 |
```
|
| 77 |
+
pip install git+https://github.com/huggingface/diffusers.git torch transformers accelerate sentencepiece
|
| 78 |
```
|
| 79 |
|
| 80 |
then you can run the following example:
|
|
|
|
| 83 |
from diffusers import AltDiffusionPipeline, DPMSolverMultistepScheduler
|
| 84 |
import torch
|
| 85 |
|
| 86 |
+
pipe = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion", torch_dtype=torch.float16, revision="fp16")
|
| 87 |
pipe = pipe.to("cuda")
|
| 88 |
|
| 89 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|