Text-to-Image
Diffusers
Safetensors
looped-transformer
distillation
sd3
File size: 2,012 Bytes
e79714b
 
d32dcaf
e79714b
 
 
 
 
 
 
 
 
 
 
 
7faa44c
e79714b
7254b17
e79714b
7faa44c
e79714b
ee4a8a4
 
e79714b
 
 
 
 
7faa44c
a0f093b
e79714b
ee4a8a4
7faa44c
e79714b
7faa44c
 
 
e79714b
 
ee4a8a4
e79714b
 
 
7faa44c
e79714b
 
 
 
ee4a8a4
7254b17
e79714b
7254b17
 
e79714b
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
license: other
license_name: stabilityai-nc-research-community
license_link: LICENSE
base_model:
- stabilityai/stable-diffusion-3-medium-diffusers
- byliutao/stable-diffusion-3-medium-turbo
pipeline_tag: text-to-image
tags:
- text-to-image
- looped-transformer
- distillation
- sd3
---

# Distill to Loop (SD3-medium)

Looped students of SD3-medium from the paper "Distill to Loop: Turning Pretrained Diffusion Transformers into Looped Models with Adjustable Depth" ([arXiv:2611.31977](https://arxiv.org/abs/2611.31977)). The loop count is chosen at sampling time. Load the weights with the code at https://github.com/WinterCCC/Distill-to-Loop. The VAE, text encoders and scheduler come from `stabilityai/stable-diffusion-3-medium-diffusers`.

## Files

- `dooop-sd3-medium/`: distilled from SD3-medium.
- `dooop-sd3-medium-turbo/`: distilled from the four-step CDM SD3-medium, `byliutao/stable-diffusion-3-medium-turbo`.

## Usage

```python
import torch
from huggingface_hub import snapshot_download
from dooop import load_pipeline

student_dir = snapshot_download("ShimaRinC/Distill-to-Loop") + "/dooop-sd3-medium"
pipe = load_pipeline(student_dir, device="cuda")
pipe.transformer.loop_rounds = 4
image = pipe("a lighthouse on a cliff at sunset", num_inference_steps=28, guidance_scale=7.0, height=512, width=512,
             generator=torch.Generator("cuda").manual_seed(0)).images[0]
image.save("out.png")
```

`dooop-sd3-medium-turbo` samples in four steps with `sigmas=[1.0, 0.75, 0.5, 0.25]` and `guidance_scale=1.0`.

## License

These weights are Derivative Works of Stable Diffusion 3 Medium and are licensed under the Stability AI Non-Commercial Research Community License. See [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE).

## Citation

```bibtex
@article{dooop,
  author  = {Wang, Chenru and An, Shengwei},
  title   = {Distill to Loop: Turning Pretrained Diffusion Transformers into Looped Models with Adjustable Depth},
  journal = {arXiv preprint arXiv:2611.31977},
  year    = {2026}
}
```