Yihong Luo commited on
Commit
ddd56e8
1 Parent(s): 68f9e6b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -0
README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # You Only Sample Once (YOSO)
2
+
3
+ ## Usage
4
+
5
+ ### 2 step inference
6
+ '''python
7
+ pipeline = DiffusionPipeline.from_pretrained("stablediffusionapi/realistic-vision-v51", torch_dtype = torch.float16)
8
+ pipeline = pipeline.to('cuda')
9
+ pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)
10
+ generator = torch.manual_seed(318)
11
+ steps = 2
12
+ imgs= pipeline(prompt="A photo of a man, XT3",
13
+ num_inference_steps=steps,
14
+ num_images_per_prompt = 1,
15
+ generator = generator,
16
+ guidance_scale=1.5,
17
+ )[0]
18
+ imgs
19
+ '''