---
title: "SDXL in 4 steps with Latent Consistency LoRAs"
description: "LCM LoRAs apply latent consistency distillation as small LoRA adapters instead of distilling each full model, so any fine-tuned SDXL or Stable Diffusion 1.5 model can generate images in 4–8 steps instead of 25–50."
url: "https://swe.quest/articles/sdxl-in-4-steps-with-latent-consistency-loras-2dbb6e57c86cbe97"
canonical: "https://huggingface.co/blog/lcm_lora"
source: "Hugging Face"
published: "2023-11-09"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["inference","computer-vision","model-training","performance"]
---

# SDXL in 4 steps with Latent Consistency LoRAs

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-11-09, 10 min read, How-to. Original: [https://huggingface.co/blog/lcm\_lora](https://huggingface.co/blog/lcm_lora)

## Summary

LCM LoRAs apply latent consistency distillation as small LoRA adapters instead of distilling each full model, so any fine-tuned SDXL or Stable Diffusion 1.5 model can generate images in 4–8 steps instead of 25–50. Using diffusers, you load the LCM LoRA, swap in the LCMScheduler and run with guidance\_scale around 1. Values between 1 and 2 enable negative prompts, and larger values don't work. Benchmarks at batch size 1 show SDXL dropping from 7s to 1.4s on a 3090, 64s to 6.5s on an M1 Max and 3.4s to 0.7s on a 4090. The LoRAs can also be stacked with regular style LoRAs, and training scripts are released alongside them.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- Stable Diffusion basics
- LoRA fine-tuning ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- Python and PyTorch ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

Latent Consistency Models, LCM LoRA, SDXL, Stable Diffusion, diffusers, PEFT, LCMScheduler

## Related posts

- [Using LoRA for Efficient Stable Diffusion Fine-Tuning](https://swe.quest/articles/using-lora-for-efficient-stable-diffusion-fine-tuning-7bd5416d145ae531.md): Hugging Face · 2023-01-26 · Medium · 7 min read · Model training, Computer vision, Python
  LoRA freezes pretrained weights and trains small rank-decomposition matrices, and diffusers now supports applying it to Stable Diffusion's cross-attention layers for both full fine-tuning and Dreambooth.
- [Consistency diffusion language models: Up to 14x faster inference without sacrificing quality](https://swe.quest/articles/consistency-diffusion-language-models-up-to-14x-faster-inference-without-729cf6964ed22edf.md): Together AI · 2026-02-19 · Hard · 6 min read · Inference & serving, LLMs, Model training, Performance engineering
  Consistency diffusion language models (CDLM) speed up diffusion LLM inference by post-training a block-wise causal student that can finalize multiple tokens per step and use exact block-wise KV caching.
- [Goodbye cold boot - how we made LoRA Inference 300% faster](https://swe.quest/articles/goodbye-cold-boot-how-we-made-lora-inference-300-faster-d8d4cf4c16c22df2.md): Hugging Face · 2023-12-05 · Medium · 9 min read · Inference & serving, ML platforms, Computer vision, Python
  Hugging Face's Inference API now keeps Stable Diffusion base models warm and swaps LoRA adapters per request, so hundreds of distinct LoRAs share a few GPUs instead of each getting a dedicated deployment.
- [Open-sourcing Knowledge Distillation Code and Weights of SD-Small and SD-Tiny](https://swe.quest/articles/open-sourcing-knowledge-distillation-code-and-weights-of-sd-small-and-sd-tiny-053ea66ae7ff27cc.md): Hugging Face · 2023-08-01 · Medium · 5 min read · Computer vision, Model training, Inference & serving, Open source
  Segmind releases training code and weights for SD-Small and SD-Tiny, Stable Diffusion variants compressed by block-removal knowledge distillation that cut UNet parameters by 35% and 55% while keeping image fidelity close to the base model.
- [Stable Diffusion with 🧨 Diffusers](https://swe.quest/articles/stable-diffusion-with-diffusers-03ca8448e680e397.md): Hugging Face · 2022-08-22 · Medium · 15 min read · Computer vision, Inference & serving, Machine learning, Python
  Stable Diffusion is a latent diffusion model that denoises compressed 64×64 latents rather than pixels, combining a VAE, a text-conditioned U-Net with cross-attention, and a frozen CLIP text encoder.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
