Instructions to use ShimaRinC/Distill-to-Loop with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
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] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from ShimaRinC/Distill-to-Loop: direct link, hf CLI and curl.
- Browser
- Download file 2.01 kB
-
https://huggingface.co/ShimaRinC/Distill-to-Loop/resolve/main/README.md
- Command line
-
hf download hf://ShimaRinC/Distill-to-Loop/README.md
-
curl -L -o README.md https://huggingface.co/ShimaRinC/Distill-to-Loop/resolve/main/README.md
2.01 kB
metadata
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). 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
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 and NOTICE.
Citation
@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}
}