patrickvonplaten
commited on
Commit
•
94db4f8
1
Parent(s):
33efdd4
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
```py
|
2 |
+
from diffusers import UNet2DConditionModel, DiffusionPipeline, LCMScheduler
|
3 |
+
|
4 |
+
unet = UNet2DConditionModel.from_pretrained("latent-consistency/lcm-ssd-1b", torch_dtype=torch.float16, variant="fp16")
|
5 |
+
pipe = DiffusionPipeline.from_pretrained("segmind/SSD-1B", unet=unet, torch_dtype=torch.float16, variant="fp16")
|
6 |
+
|
7 |
+
pipe.scheduler = LCMScheduler.from_config(sd_pipe.scheduler.config)
|
8 |
+
pipe.set_progress_bar_config(disable=None)
|
9 |
+
|
10 |
+
prompt = "a red car standing on the side of the street"
|
11 |
+
|
12 |
+
image = pipe(prompt, num_inference_steps=4, guidance_scale=8.0).images[0]
|
13 |
+
```
|