SyncAI.news, a Varaisys broadcasting
SDXL in 4 steps with Latent Consistency LoRAs
HF

Hugging Face Blog

· 2 min read

AI LabsHugging Face Blog

SDXL in 4 steps with Latent Consistency LoRAs

Latent Consistency Models (LCM) are a way to decrease the number of steps required to generate an image with Stable Diffusion (or SDXL) by distilling the original model into another version that requires fewer steps (4 to 8 instead of the original 25 to 50). Distillation is a type of training procedure that attempts to replicate the outputs from a source model using a new one. The distilled model may be designed to be smaller (that’s the case of DistilBERT or the recently-released Distil-Whisper) or, in this case, require fewer steps to run. It’s usually a lengthy and costly process that requires huge amounts of data, patience, and a few GPUs.

Well, that was the status quo before today!

We are delighted to announce a new method that can essentially make Stable Diffusion and SDXL faster, as if they had been distilled using the LCM process! How does it sound to run any SDXL model in about 1 second instead of 7 on a 3090, or 10x faster on Mac? Read on for details!

Contents

  • Method Overview
  • Why does this matter
  • Fast Inference with SDXL LCM LoRAs
    • Quality Comparison
    • Guidance Scale and Negative Prompts
    • Quality vs base SDXL
    • LCM LoRAs with other Models
    • Full Diffusers Integration
  • Benchmarks
  • LCM LoRAs and Models Released Today
  • Bonus: Combine LCM LoRAs with regular SDXL LoRAs
  • How to train LCM LoRAs
  • Resources
  • Credits

Method Overview

So, what’s the trick? For latent consistency distillation, each model needs to be distilled separately. The core idea with LCM LoRA is to train just a small number of adapters, known as LoRA layers, instead of the full model. The resulting LoRAs can then be applied to any fine-tuned version of the model without having to distil them separately. If you are itching to see how this looks in practice, just jump to the next section to play with the inference code. If you want to train your own LoRAs, this is the process you’d use:

For more details on the process, please download our paper.

Original source

This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.

Read the full story on huggingface.co

Similar News