Luo-Yihong
commited on
Commit
•
bb3264f
1
Parent(s):
fb21dd2
Update README.md
Browse files
README.md
CHANGED
@@ -12,6 +12,8 @@ The YOSO was proposed in You Only Sample Once: Taming One-Step Text-To-Image Syn
|
|
12 |
### 1-step inference
|
13 |
1-step inference is only allowed based on SD v1.5 for now. And you should prepare the informative initialization according to the paper for better results.
|
14 |
```python
|
|
|
|
|
15 |
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype = torch.float16)
|
16 |
pipeline = pipeline.to('cuda')
|
17 |
pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)
|
|
|
12 |
### 1-step inference
|
13 |
1-step inference is only allowed based on SD v1.5 for now. And you should prepare the informative initialization according to the paper for better results.
|
14 |
```python
|
15 |
+
import torch
|
16 |
+
from diffusers import DiffusionPipeline, LCMScheduler
|
17 |
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype = torch.float16)
|
18 |
pipeline = pipeline.to('cuda')
|
19 |
pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)
|