Commit
·
811b8a1
1
Parent(s):
eff8291
up
Browse files
README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
# VQ Diffusion
|
| 5 |
+
|
| 6 |
+
* [Paper](https://arxiv.org/abs/2205.16007.pdf)
|
| 7 |
+
|
| 8 |
+
* [Original Repo](https://github.com/microsoft/VQ-Diffusion)
|
| 9 |
+
|
| 10 |
+
* **Authors**: Shuyang Gu, Dong Chen, et al.
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
```python
|
| 14 |
+
#!pip install diffusers[torch]==0.7.0 transformers
|
| 15 |
+
import torch
|
| 16 |
+
from diffusers import VQDiffusionPipeline
|
| 17 |
+
|
| 18 |
+
pipeline = VQDiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq", torch_dtype=torch.float16, revision="fp16")
|
| 19 |
+
pipeline = pipeline.to("cuda")
|
| 20 |
+
|
| 21 |
+
output = pipeline("teddy bear playing in the pool", truncation_rate=0.86)
|
| 22 |
+
|
| 23 |
+
image = output.images[0]
|
| 24 |
+
image.save("./teddy_bear.png")
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
|
| 29 |
+
**Contribution**: This model was contribution by [williamberman](https://huggingface.co/williamberman) in [VQ-diffusion](https://github.com/huggingface/diffusers/pull/658).
|