# sdxl_lightning_4step_lora.safetensors

> SDXL-Lightning 4-step LoRA · 4-step speed LoRA for SDXL models

This is ByteDance’s SDXL-Lightning LoRA for 4-step generation. Add it to an SDXL fine-tune and you get a full image in 4 steps instead of 25 to 40. Put it in ComfyUI/models/loras, load it with LoraLoaderModelOnly, and sample with Euler, sgm_uniform, 4 steps, CFG 1.

For the plain SDXL base model, ByteDance recommends the full 4-step checkpoint instead. Use this LoRA on other SDXL models.

## Facts

- **Type:** LoRA (step distillation)
- **Format:** Safetensors
- **Size:** 394 MB (393,854,592 bytes)
- **SHA256:** bf56cf2657efb15e465d81402ed481d1e11c4677e4bcce1bc11fe71ad8506b79
- **ComfyUI folder:** ComfyUI/models/loras/
- **Loader node:** LoraLoaderModelOnly
- **License:** CreativeML Open RAIL++-M
- **Released:** Feb 20, 2024

## What is sdxl_lightning_4step_lora.safetensors?

SDXL-Lightning is ByteDance’s progressive adversarial distillation of SDXL. It comes in 1, 2, 4 and 8-step versions, each as a full UNet checkpoint and as a LoRA. This file is the 4-step LoRA, the most common balance of speed and quality.

Because it is a LoRA, it can turn any SDXL fine-tune (Juggernaut, RealVis, anime models) into a 4-step model. The step count must match: this LoRA at 8 steps, or the 8-step LoRA at 4, gives worse results.

## Download and install

- [Hugging Face · ByteDance/SDXL-Lightning](https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_4step_lora.safetensors) · saves as `sdxl_lightning_4step_lora.safetensors` · Official release. Recommended.
- [Civitai · SDXL Lightning LoRAs](https://civitai.com/models/350450) · saves as `sdxl_lightning_4step_lora.safetensors` · Same SHA256. May ask you to sign in.

```sh
cd ComfyUI/models/loras
wget -O sdxl_lightning_4step_lora.safetensors \
  https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_4step_lora.safetensors
sha256sum sdxl_lightning_4step_lora.safetensors
# bf56cf2657efb15e465d81402ed481d1e11c4677e4bcce1bc11fe71ad8506b79
```

Safetensors files hold tensors only and cannot run code. Still compare the SHA256: a failed download often leaves an HTML error page saved under the model’s filename.

## How to load it in ComfyUI

LoraLoaderModelOnly patches the base model with this LoRA. Put it between the model loader and the sampler.

- **Sampler settings:** Euler sampler, sgm_uniform scheduler, 4 steps, CFG 1. Match the steps to the LoRA.
- **Strength:** Start at 1.0. Lower it a little if a fine-tune loses its style.

## Workflows: Built for fast sampling

These workflows load another fast sampling model in the same folder, or they are fast sampling workflows that already have a LoraLoaderModelOnly node. Select sdxl_lightning_4step_lora.safetensors there.

- [IPAdapter V1 FaceID Plus | Consistent Characters](https://www.runcomfy.com/comfyui-workflows/create-consistent-characters-in-comfyui-with-ipadapter-faceid-plus)

## Same file, other names, and alternatives

- `sdxl_lightning_4step_lora.safetensors` · This page · 4-step LoRA · 394 MB · SDXL fine-tunes, 4 steps
- `sdxl_lightning_8step_lora.safetensors` · Same family · 8-step LoRA · 394 MB · More detail, 8 steps
- `sdxl_lightning_2step_lora.safetensors` · Same family · 2-step LoRA · 394 MB · Fastest previews
- `sdxl_lightning_4step.safetensors` · Full 4-step checkpoint · 6.94 GB · Plain SDXL base, best quality

## Common errors and fixes

### Value not in list: lora_name: 'sdxl_lightning_4step_lora.safetensors' not in [...]

Why: The workflow asks for this exact filename, but ComfyUI cannot find it in models/loras. Usually the file is missing, sits in a different folder.

Fix: Move the file into ComfyUI/models/loras/, rename it to match the workflow (or pick it again in the dropdown), then refresh the node list or restart ComfyUI.

### SafetensorError: Error while deserializing header

Why: The download is incomplete, or the browser saved an HTML sign-in or error page under the model’s filename.

Fix: Check that the file is exactly 393,854,592 bytes and that its SHA256 matches the value above. Download it again from Hugging Face · ByteDance/SDXL-Lightning if not.

## FAQ

### What sampler and scheduler should I use?

ByteDance’s ComfyUI instructions: Euler sampler with the sgm_uniform scheduler, 4 steps, CFG 1.

### LoRA or full checkpoint?

Use the full `sdxl_lightning_4step.safetensors` checkpoint for the plain SDXL base model; it looks better. Use this LoRA to speed up any other SDXL model.

### Where do I put sdxl_lightning_4step_lora.safetensors in ComfyUI?

In `ComfyUI/models/loras/`. Then refresh the node list or restart ComfyUI so LoraLoaderModelOnly lists the file.

### Which ComfyUI node loads sdxl_lightning_4step_lora.safetensors?

[LoraLoaderModelOnly](/comfyui-nodes/ComfyUI/lora-loader-model-only). It is built into ComfyUI, so no custom nodes are needed.

### Can I use sdxl_lightning_4step_lora.safetensors commercially?

Yes. SDXL-Lightning is released under CreativeML Open RAIL++-M, the same license as SDXL, which allows commercial use within its use restrictions.

## Sources

- [ByteDance/SDXL-Lightning](https://huggingface.co/ByteDance/SDXL-Lightning)
- [SDXL-Lightning paper (arXiv 2402.13929)](https://arxiv.org/abs/2402.13929)
- [Civitai model 350450](https://civitai.com/models/350450)

Canonical page: https://www.runcomfy.com/comfyui-workflows/model-files/sdxl_lightning_4step_lora.safetensors
