Skip to main content
Back

ByteDance's Hyper-SD Cuts Image Generation From 50 Steps to One

ByteDance's Hyper-SD collapses diffusion sampling from dozens of steps down to as few as one, and now covers FLUX.1-dev and SD3.

Pro

  • Hyper-SD is a family of LoRAs that cut diffusion sampling to 1-8 steps
  • Now supports FLUX.1-dev, SD3, SDXL and SD1.5 from one repo
  • Combines Trajectory Segmented Consistency Distillation with human feedback and score distillation
  • Beats SDXL-Lightning by +0.68 CLIP and +0.51 Aes at 1 step
  • FLUX recipe: LoRA scale 0.125, guidance 3.5, 8 or 16 steps
  • Paper accepted to NeurIPS 2024; works with ControlNet and ComfyUI

Diffusion models are famously slow because they iterate. Turning a text prompt into a picture normally takes 25 to 50 forward passes through a very large network. Hyper-SD, from ByteDance's research team, is a family of distilled LoRA adapters that push that cost down to 8, 4, 2 or even a single step, while keeping quality close to the original teacher model. The repository has quietly grown into one of the most widely used acceleration toolkits on Hugging Face, and now covers the full modern stack.

One repo, four backbones

Coverage is where things get interesting. Hyper-SD originally targeted SDXL and SD1.5 with 1 to 8 step inference, but the same repository now ships LoRAs for the newer transformer-based generators too. The FLUX.1-dev adapters run at 8 and 16 steps, and the SD3-Medium versions preserve classifier-free guidance at 4, 8 and 16 steps. That makes Hyper-SD one of the few distillation efforts that spans the U-Net era (SD1.5, SDXL) and the DiT era (SD3, FLUX) in a single package.

Comparison of Hyper-SDXL vs SDXL Base, SDXL-Lightning and SDXL-Turbo across different step counts

What the distillation actually does

Prior fast-sampling work generally falls into two camps. Trajectory preservation methods (like LCM or progressive distillation) try to compress the original denoising path, while trajectory reformulation methods (like adversarial distillation) replace it with a new one. The authors argue both camps suffer from severe performance degradation or domain shifts. Hyper-SD's answer is to combine them.

The paper introduces three ideas that stack:

  • Trajectory Segmented Consistency Distillation. Rather than enforcing consistency across the whole denoising trajectory at once, the paper splits time into pre-defined segments and performs consistency distillation within each one, so the student stays close to the teacher's ODE path piecewise rather than globally.
  • Human feedback learning. A reward-model stage recovers quality lost during distillation, particularly in the very-low-step regime.
  • Score distillation plus a unified LoRA. Score distillation sharpens low-step generation, and the authors ship a single LoRA that supports the full 1 to 8 step range instead of one adapter per step count.

On benchmarks the payoff is measurable. Hyper-SDXL beats SDXL-Lightning by +0.68 CLIP Score and +0.51 Aesthetic Score at 1-step inference. The paper was accepted to NeurIPS 2024.

Loading the adapters

Everything is a LoRA you load on top of the base model. For FLUX.1-dev the recommended recipe is small: LoRA scale around 0.125 and guidance scale kept at 3.5. A minimal call looks like:

from diffusers import FluxPipeline
from huggingface_hub import hf_hub_download
import torch
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", token="...")
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD",
    "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
pipe.fuse_lora(lora_scale=0.125)
pipe.to("cuda", dtype=torch.float16)
img = pipe("a photo of a cat", num_inference_steps=8, guidance_scale=3.5).images[0]

For SDXL and SD1.5 there are separate 2-step, 4-step and 8-step LoRAs, plus a unified 1-step adapter that pairs with the TCD scheduler and lets you dial num_inference_steps from 1 to 8 at inference time. A fully distilled 1-step SDXL U-Net checkpoint is also available for cases where you want to skip LoRA fusion entirely. The project page collects demos and the full model list.

Where it fits

The practical value is boring in the best way: the same ControlNet, IP-Adapter and community fine-tune ecosystem still works, because Hyper-SD is a plug-in adapter rather than a new architecture. That matters for a few concrete use cases:

  • Interactive image editing and scribble-to-image tools where sub-second latency changes the UX entirely.
  • Batch generation pipelines where cutting steps from 30 to 4 directly cuts GPU hours.
  • On-device or single-GPU inference for FLUX-class models that are otherwise painful to run in real time.

The known trade-offs are what you would expect from any distilled sampler. Very low step counts (1 or 2) lose fine detail and prompt adherence compared to the teacher, classifier-free guidance behaves differently (SDXL and SD1.5 LoRAs are typically used with guidance_scale=0), and the 8-step CFG LoRAs are a middle ground when you need real negative prompts. The repo's own guidance is to treat the 8-step CFG LoRA as a default, which is a reasonable starting point for most production workloads.