Datasets:

Modalities:
Text
Formats:
text
ArXiv:
Libraries:
Datasets
License:
ppriyank commited on
Commit
9796ff4
·
verified ·
1 Parent(s): 0adac73

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -3
README.md CHANGED
@@ -1,3 +1,19 @@
1
- ---
2
- license: cc
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```
2
+ import torch
3
+ from diffusers import PixArtAlphaPipeline
4
+ pipe = PixArtAlphaPipeline.from_pretrained("PixArt-alpha/PixArt-XL-2-1024-MS", torch_dtype=torch.float16)
5
+ pipe = pipe.to('cuda')
6
+
7
+
8
+ line = line.strip() ## caption line from either `caption_2k.txt' or `caption_5k.txt'
9
+
10
+ offset = 0
11
+ for fold in range(7):
12
+ images =pipe(line, num_images_per_prompt=10, ).images
13
+ [img.save(f"{ROOT}/{offset + k}.png") for k,img in enumerate(images)]
14
+ offset += 10
15
+ ```
16
+
17
+ ---
18
+ license: cc
19
+ ---