Distill to Loop: Turning Pretrained Diffusion Transformers into Looped Models with Adjustable Depth
Paper โข 2611.31977 โข Published โข 4
How to use ShimaRinC/Distill-to-Loop with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("ShimaRinC/Distill-to-Loop", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Looped students of SD3-medium from the paper "Distill to Loop: Turning Pretrained Diffusion Transformers into Looped Models with Adjustable Depth" (arXiv: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.
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.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.
These weights are Derivative Works of Stable Diffusion 3 Medium and are licensed under the Stability AI Non-Commercial Research Community License. See LICENSE and NOTICE.
@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}
}
Base model
byliutao/stable-diffusion-3-medium-turbo