Diffusers
VQDiffusionPipeline
patrickvonplaten commited on
Commit
d9901f3
1 Parent(s): 8ac1cd1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -4,3 +4,18 @@
4
 
5
  TODO: Make nice model readme
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  TODO: Make nice model readme
6
 
7
+ ```python
8
+ #!pip install diffusers[torch]==0.7.0 transformers
9
+ import torch
10
+ from diffusers import VQDiffusionPipeline
11
+
12
+ pipeline = VQDiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq", torch_dtype=torch.float16, revision="fp16")
13
+ pipeline = pipeline.to("cuda")
14
+
15
+ output = pipeline("teddy bear playing in the pool", truncation_rate=0.86)
16
+
17
+ image = output.images[0]
18
+ image.save("./teddy_bear.png")
19
+ ```
20
+
21
+ ![img](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/vq_diffusion_fp16.png)