---
title: "Goodbye cold boot - how we made LoRA Inference 300% faster"
description: "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."
url: "https://swe.quest/articles/goodbye-cold-boot-how-we-made-lora-inference-300-faster-d8d4cf4c16c22df2"
canonical: "https://huggingface.co/blog/lora-adapters-dynamic-loading"
source: "Hugging Face"
published: "2023-12-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["inference","ml-platform","computer-vision","python"]
---

# Goodbye cold boot - how we made LoRA Inference 300% faster

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-12-05, 9 min read, Case study. Original: [https://huggingface.co/blog/lora-adapters-dynamic-loading](https://huggingface.co/blog/lora-adapters-dynamic-loading)

## Summary

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. Requests carrying a base\_model attribute and a lora tag are routed to a shared backend that uses Diffusers' load\_lora\_weights/fuse\_lora and unfuse\_lora/unload\_lora\_weights to swap adapters in 2-4 seconds. Warm-up dropped from 25s to 3s and cold request latency from 35s to 13s, with hundreds of LoRAs served on fewer than 5 A10G GPUs. Fusing weights cuts inference time by 30%, and batched LoRA inference was skipped because diffusion throughput rose only 25% at batch size 8 while latency grew sixfold.

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)
- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LoRA fine-tuning basics ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- Stable Diffusion
- GPU model serving ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))

## Keywords

LoRA, Diffusers, Stable Diffusion XL, Hugging Face Inference API, PEFT, A10G

## 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.
- [Fast LoRA inference for Flux with Diffusers and PEFT](https://swe.quest/articles/fast-lora-inference-for-flux-with-diffusers-and-peft-adf61d95e12cb0a4.md): Hugging Face · 2025-07-23 · Hard · 9 min read · Inference & serving, Performance engineering, Computer vision, Python
  Combining Flash Attention 3, torch.compile and TorchAO FP8 quantization with PEFT's LoRA hotswapping speeds up Flux.1-Dev LoRA inference by 2.23x on an H100, and swapping adapters does not trigger recompilation.
- [SDXL in 4 steps with Latent Consistency LoRAs](https://swe.quest/articles/sdxl-in-4-steps-with-latent-consistency-loras-2dbb6e57c86cbe97.md): Hugging Face · 2023-11-09 · Medium · 10 min read · Inference & serving, Computer vision, Model training, Performance engineering
  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.
- [TGI Multi-LoRA: Deploy Once, Serve 30 Models](https://swe.quest/articles/tgi-multi-lora-deploy-once-serve-30-models-a0e1ef82f00c7a41.md): Hugging Face · 2024-07-18 · Medium · 12 min read · Inference & serving, LLMs, Cost optimization
  Text Generation Inference (TGI) v2.1.1 adds multi-LoRA serving: one base model such as Mistral-7B is deployed once, and many small LoRA adapters are loaded alongside it, with each request picking its adapter via an adapter\_id.
- [Remote VAEs for decoding with Inference Endpoints 🤗](https://swe.quest/articles/remote-vaes-for-decoding-with-inference-endpoints-c03a090742417e81.md): Hugging Face · 2025-02-24 · Medium · 8 min read · Inference & serving, Computer vision, Machine learning, Python
  Hugging Face's Diffusers team is piloting remote VAE decoding: a diffusion pipeline produces latents locally and sends them to a hosted Inference Endpoint for decoding, avoiding the VRAM spike that otherwise forces offloading (adding transfer latency) or tiling (which can hurt image quality and, for SD v1.5 at 1024x1024, raises decode time by roughly 60-100%).

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)
