Yihong Luo
commited on
Commit
•
3f523df
1
Parent(s):
ddd56e8
Update README.md
Browse files
README.md
CHANGED
@@ -2,8 +2,12 @@
|
|
2 |
|
3 |
## Usage
|
4 |
|
5 |
-
###
|
6 |
-
|
|
|
|
|
|
|
|
|
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)
|
@@ -16,4 +20,4 @@ imgs= pipeline(prompt="A photo of a man, XT3",
|
|
16 |
guidance_scale=1.5,
|
17 |
)[0]
|
18 |
imgs
|
19 |
-
|
|
|
2 |
|
3 |
## Usage
|
4 |
|
5 |
+
### 1-step inference
|
6 |
+
1-step inference is only allowed based on SD v1.5.
|
7 |
+
|
8 |
+
### 2-step inference
|
9 |
+
We note that a small CFG can be used to enhance the image quality.
|
10 |
+
```python
|
11 |
pipeline = DiffusionPipeline.from_pretrained("stablediffusionapi/realistic-vision-v51", torch_dtype = torch.float16)
|
12 |
pipeline = pipeline.to('cuda')
|
13 |
pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)
|
|
|
20 |
guidance_scale=1.5,
|
21 |
)[0]
|
22 |
imgs
|
23 |
+
```
|