Text-to-Image
Diffusers
Safetensors
PixArtAlphaPipeline
Pixart-α
yujincheng08 commited on
Commit
8e10ed6
1 Parent(s): b897ce0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -1,3 +1,15 @@
1
  ---
2
  license: cc-by-nc-4.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-nc-4.0
3
  ---
4
+ Usage:
5
+
6
+ ```python
7
+ from diffusers import PixArtAlphaPipeline
8
+ import torch
9
+ pipe = PixArtAlphaPipeline.from_pretrained("./PixArt-XL-2-1024x1024", torch_dtype=torch.float16)
10
+ pipe = pipe.to("cuda")
11
+ pipe.enable_attention_slicing()
12
+ prompt = "A alpaca made of colorful building blocks, cyberpunk"
13
+ images = pipe(prompt).images
14
+ images[0].save('test.png')
15
+ ```