Commit
·
592fb83
1
Parent(s):
56f5cfa
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,14 +11,14 @@ license: mit
|
|
| 11 |
|
| 12 |
|
| 13 |
```python
|
| 14 |
-
#!pip install diffusers[torch]
|
| 15 |
import torch
|
| 16 |
from diffusers import VQDiffusionPipeline
|
| 17 |
|
| 18 |
pipeline = VQDiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq", torch_dtype=torch.float16)
|
| 19 |
pipeline = pipeline.to("cuda")
|
| 20 |
|
| 21 |
-
output = pipeline("teddy bear playing in the pool", truncation_rate=0
|
| 22 |
|
| 23 |
image = output.images[0]
|
| 24 |
image.save("./teddy_bear.png")
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
```python
|
| 14 |
+
#!pip install diffusers[torch] transformers
|
| 15 |
import torch
|
| 16 |
from diffusers import VQDiffusionPipeline
|
| 17 |
|
| 18 |
pipeline = VQDiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq", torch_dtype=torch.float16)
|
| 19 |
pipeline = pipeline.to("cuda")
|
| 20 |
|
| 21 |
+
output = pipeline("teddy bear playing in the pool", truncation_rate=1.0)
|
| 22 |
|
| 23 |
image = output.images[0]
|
| 24 |
image.save("./teddy_bear.png")
|