Views
No views yet

pip install -U diffusers
pip install -U peft1import torch
2from diffusers import StableDiffusion3Pipeline
3from peft import PeftModel
4
5pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium",
6 torch_dtype=torch.float16,
7 custom_pipeline="quickjkee/swd_pipeline").to("cuda")
8lora_path = "yresearch/swd-medium-6-steps"
9pipe.transformer = PeftModel.from_pretrained(
10 pipe.transformer,
11 lora_path,
12)
13
14prompt = "Cute winter dragon baby, kawaii, Pixar, ultra detailed, glacial background, extremely realistic."
15sigmas = [1.0000, 0.9454, 0.8959, 0.7904, 0.7371, 0.6022, 0.0000]
16scales = [32, 48, 64, 80, 96, 128]
17
18image = pipe(
19 prompt,
20 sigmas=sigmas,
21 timesteps=torch.tensor(sigmas[:-1], device="cuda") * 1000,
22 scales=scales,
23 guidance_scale=1.0,
24 height=int(scales[0] * 8),
25 width=int(scales[0] * 8),
26 max_sequence_length=512,
27).images[0]
1@inproceedings{
2 starodubcev2026scalewise,
3 title={Scale-wise Distillation of Diffusion Models},
4 author={Nikita Starodubcev and Ilya Drobyshevskiy and Denis Kuznedelev and Artem Babenko and Dmitry Baranchuk},
5 booktitle={The Fourteenth International Conference on Learning Representations},
6 year={2026},
7 url={https://openreview.net/forum?id=Z06LNjqU1g}
8}