Text-to-Image
Diffusers
Safetensors
patrickvonplaten commited on
Commit
2b181d1
1 Parent(s): 453ec3d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -7
README.md CHANGED
@@ -7,13 +7,13 @@ license: openrail++
7
  inference: false
8
  ---
9
 
10
- # Latent Consistency Model (LCM): SDXL
11
 
12
  Latent Consistency Model (LCM) was proposed in [Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference](https://arxiv.org/abs/2310.04378)
13
  by *Simian Luo, Yiqin Tan et al.* and [Simian Luo](https://huggingface.co/SimianLuo), [Suraj Patil](https://huggingface.co/valhalla), and [Daniel Gu](https://huggingface.co/dg845)
14
  succesfully applied the same approach to create LCM for SDXL.
15
 
16
- This checkpoint is a LCM distilled version of [`stable-diffusion-xl-base-1.0`](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) that allows
17
  to reduce the number of inference steps to only between **2 - 8 steps**.
18
 
19
 
@@ -30,16 +30,15 @@ pip install --upgrade diffusers transformers accelerate peft
30
 
31
  ### Text-to-Image
32
 
33
- The model can be loaded with it's base pipeline `stabilityai/stable-diffusion-xl-base-1.0`. Next, the scheduler needs to be changed to [`LCMScheduler`](https://huggingface.co/docs/diffusers/v0.22.3/en/api/schedulers/lcm#diffusers.LCMScheduler) and we can reduce the number of inference steps to just 2 to 8 steps.
34
- Please make sure to either disable `guidance_scale` or use values between 1.0 and 2.0.
35
 
36
  ```python
37
  from diffusers import UNet2DConditionModel, DiffusionPipeline, LCMScheduler
38
 
39
- unet = UNet2DConditionModel.from_pretrained("latent-consistency/lcm-sdxl", torch_dtype=torch.float16, variant="fp16")
40
- pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", unet=unet, torch_dtype=torch.float16, variant="fp16")
41
 
42
- pipe.scheduler = LCMScheduler.from_config(sd_pipe.scheduler.config)
43
  pipe.to("cuda")
44
 
45
  prompt = "a red car standing on the side of the street"
 
7
  inference: false
8
  ---
9
 
10
+ # Latent Consistency Model (LCM): SSD-1B
11
 
12
  Latent Consistency Model (LCM) was proposed in [Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference](https://arxiv.org/abs/2310.04378)
13
  by *Simian Luo, Yiqin Tan et al.* and [Simian Luo](https://huggingface.co/SimianLuo), [Suraj Patil](https://huggingface.co/valhalla), and [Daniel Gu](https://huggingface.co/dg845)
14
  succesfully applied the same approach to create LCM for SDXL.
15
 
16
+ This checkpoint is a LCM distilled version of [`segmind/SSD-1B`](https://huggingface.co/segmind/SSD-1B) that allows
17
  to reduce the number of inference steps to only between **2 - 8 steps**.
18
 
19
 
 
30
 
31
  ### Text-to-Image
32
 
33
+ The model can be loaded with it's base pipeline `segmind/SSD-1B`. Next, the scheduler needs to be changed to [`LCMScheduler`](https://huggingface.co/docs/diffusers/v0.22.3/en/api/schedulers/lcm#diffusers.LCMScheduler) and we can reduce the number of inference steps to just 2 to 8 steps.
 
34
 
35
  ```python
36
  from diffusers import UNet2DConditionModel, DiffusionPipeline, LCMScheduler
37
 
38
+ unet = UNet2DConditionModel.from_pretrained("latent-consistency/lcm-ssd-1b", torch_dtype=torch.float16, variant="fp16")
39
+ pipe = DiffusionPipeline.from_pretrained("segmind/SSD-1B", unet=unet, torch_dtype=torch.float16, variant="fp16")
40
 
41
+ pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
42
  pipe.to("cuda")
43
 
44
  prompt = "a red car standing on the side of the street"