Latent Consistency Model (LCM) LoRA: SDXL
Latent Consistency Model (LCM) LoRA was proposed in LCM-LoRA: A universal Stable-Diffusion Acceleration Module by Simian Luo, Yiqin Tan, Suraj Patil, Daniel Gu et al.
It is a distilled consistency adapter for stable-diffusion-xl-base-1.0
that allows
to reduce the number of inference steps to only between 2 - 8 steps.
Model | Params / M |
---|---|
lcm-lora-sdv1-5 | 67.5 |
lcm-lora-ssd-1b | 105 |
lcm-lora-sdxl | 197M |
Usage
LCM-LoRA is supported in ? Hugging Face Diffusers library from version v0.23.0 onwards. To run the model, first
install the latest version of the Diffusers library as well as peft
, accelerate
and transformers
.
audio dataset from the Hugging Face Hub:
pip install --upgrade pip
pip install --upgrade diffusers transformers accelerate peft
Note: For detailed usage examples we recommend you to check out our official LCM-LoRA docs
Text-to-Image
The adapter can be loaded with it's base model stabilityai/stable-diffusion-xl-base-1.0
. Next, the scheduler needs to be changed to LCMScheduler
and we can reduce the number of inference steps to just 2 to 8 steps.
Please make sure to either disable guidance_scale
or use values between 1.0 and 2.0.
Text-to-Image
The adapter can be loaded with it's base model stabilityai/stable-diffusion-xl-base-1.0
. Next, the scheduler needs to be changed to LCMScheduler
and we can reduce the number of inference steps to just 2 to 8 steps.
Please make sure to either disable guidance_scale
or use values between 1.0 and 2.0.### Text-to-Image
The adapter can be loaded with it's base model stabilityai/stable-diffusion-xl-base-1.0
. Next, the scheduler needs to be changed to LCMScheduler
and we can reduce the number of inference steps to just 2 to 8 steps.
Please make sure to either disable guidance_scale
or use values between 1.0 and 2.0.### Text-to-Image
The adapter can be loaded with it's base model stabilityai/stable-diffusion-xl-base-1.0
. Next, the scheduler needs to be changed to LCMScheduler
and we can reduce the number of inference steps to just 2 to 8 steps.
Please make sure to either disable guidance_scale
or use values between 1.0 and 2.0.
评论