Open-sourcing Knowledge Distillation Code and Weights of SD-Small and SD-Tiny
Segmind releases training code and weights for SD-Small and SD-Tiny, Stable Diffusion variants compressed by block-removal knowledge distillation that cut UNet parameters by 35% and 55% while keeping image fidelity close to the base model. The student is trained with three losses: the standard latent diffusion loss, an output-matching loss against the teacher (Realistic-Vision 4.0), and a per-block feature-level loss. Training used 1M LAION Art Aesthetic images scoring above 7.5. The distilled models run up to 2x faster at inference but are early-stage and weak at composition, so they work best fine-tuned or LoRA-trained on specific styles. A portrait fine-tune of SD-Tiny is included with its hyperparameters.
Related posts
- Using LoRA for Efficient Stable Diffusion Fine-Tuning
Hugging Face mediumAdeptLoRA freezes pretrained weights and trains small rank-decomposition matrices, and diffusers now supports applying it to Stable Diffusion's cross-attention layers for both full fine-tuning and Dreambooth. Training fits in 11 GB of VRAM (a 2080 Ti) without 8-bit optimizers, uses a much higher learning rate (1e-4 vs ~1e-6), and produces ~3 MB weight files, roughly 1000x smaller than the UNet. A walkthrough covers the training script on a Pokémon dataset, looking up the base model from Hub metadata, and loading LoRA weights at inference with load_attn_procs. LoRA is also compared with Textual Inversion and Pivotal Tuning.
- Diffusers welcomes Stable Diffusion 3.5 Large
Hugging Face mediumAdeptStable Diffusion 3.5 Large (8B) and a timestep-distilled Turbo variant are now usable in Diffusers. The architecture matches SD3 Medium except for QK normalization and dual attention layers in the MMDiT blocks. Code covers bf16 inference, few-step (4-8 step) Turbo generation without classifier-free guidance, NF4 quantization via bitsandbytes with CPU offload for consumer GPUs, and single-file checkpoint loading. LoRA fine-tuning on 24GB GPUs works with the existing SD3 DreamBooth script, combined with peft's k-bit training preparation.
- Open Preference Dataset for Text-to-Image Generation by the 🤗 Community
Hugging Face easyNoviceData is Better Together released an Apache 2.0 text-to-image preference dataset of 10K pairs, with over 30K annotations from more than 250 community members collected in under two weeks. Imgsys prompts were deduplicated, filtered for NSFW content with text and image classifiers plus manual review, and rewritten with distilabel across style categories and simple versus complex variants. Images came from FLUX.1-dev and Stable Diffusion 3.5 Large. Annotators found FLUX better for anime, manga and 3D, and SD3.5 better for cinematic and art styles. A LoRA fine-tune of FLUX-dev on the chosen samples improved its weaker art and cinematic outputs.
- Diffusers welcomes Stable Diffusion 3
Hugging Face mediumAdeptStable Diffusion 3 Medium (2B parameters) is now usable through Diffusers. Its architecture pairs three text encoders (two CLIP models and T5-XXL) with a Multimodal Diffusion Transformer that runs joint attention over text and image-patch sequences, and it is trained with rectified flow matching, served by a new FlowMatchEulerDiscreteScheduler (shift=3.0 recommended). Benchmarks on an A100 show the memory tradeoffs: CPU offloading cuts VRAM from 18.8GB to 12GB at roughly 6.8x latency, dropping T5 brings it to 4.3GB, and 8-bit T5 reaches 10.6GB with almost no slowdown. torch.compile delivers about a 4x speedup (0.585s), and a DreamBooth LoRA fine-tuning script is included.
- SDXL in 4 steps with Latent Consistency LoRAs
Hugging Face mediumAdeptLCM LoRAs apply latent consistency distillation as small LoRA adapters instead of distilling each full model, so any fine-tuned SDXL or Stable Diffusion 1.5 model can generate images in 4–8 steps instead of 25–50. Using diffusers, you load the LCM LoRA, swap in the LCMScheduler and run with guidance_scale around 1. Values between 1 and 2 enable negative prompts, and larger values don't work. Benchmarks at batch size 1 show SDXL dropping from 7s to 1.4s on a 3090, 64s to 6.5s on an M1 Max and 3.4s to 0.7s on a 4090. The LoRAs can also be stacked with regular style LoRAs, and training scripts are released alongside them.