Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 5 min read How-to mediumAdept

Efficient Controllable Generation for SDXL with T2I-Adapters

T2I-Adapter-SDXL drives the 2.6B-parameter SDXL model with a 79M-parameter adapter that runs once per generation, unlike ControlNet, which runs alongside the UNet at every denoising step. That makes it about 94% smaller than ControlNet-SDXL (158 MB vs 2.5 GB in fp16). Checkpoints for sketch, canny, lineart, depth and openpose conditioning were trained on 3M LAION-Aesthetics pairs at batch size 128, learning rate 1e-5, for 20k–35k steps. They are usable through the diffusers StableDiffusionXLAdapterPipeline, with adapter_conditioning_scale and adapter_conditioning_factor controlling how strongly and for how many steps the condition applies.

Assumes: diffusion models basicsPyTorchStable Diffusion pipelines

Related posts

  • SDXL in 4 steps with Latent Consistency LoRAs

    Hugging Face mediumAdept

    LCM 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.

  • Open-sourcing Knowledge Distillation Code and Weights of SD-Small and SD-Tiny

    Hugging Face mediumAdept

    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.

  • LoRA training scripts of the world, unite!

    Hugging Face hardMaster

    Combining Pivotal Tuning (textual inversion of newly inserted tokens, then LoRA fine-tuning) with the adaptive Prodigy optimizer produces strong SDXL Dreambooth LoRA results, and both are now available in a diffusers training script. The guide covers the relevant flags and recommended values: stopping textual inversion halfway through training, Prodigy with learning_rate=1.0 and bias correction, and separate text encoder and UNet learning rates. It also covers custom BLIP captions, Min-SNR gamma of 5.0, image repeats, prior preservation loss and dataset curation tips for faces and objects. Experiments on a 31-image Huggy mascot dataset compare batch sizes, optimizers and text encoder training modes.

  • How Diffusion Controller unifies and simplifies AI image generation

    Google Research hardMaster

    Diffusion Controller reframes diffusion denoising as a continuous control problem, unifying inference-time guidance and fine-tuning methods such as LoRA, reward-weighted regression and policy gradients under one framework. A lightweight trainable side network attached to a frozen backbone adds small corrections to the base model's score using the intermediate reverse mean, so it also works with gray-box, access-restricted models. On a Stable Diffusion v1.4 backbone across SFT, reward-weighted loss and PPO regimes, the gray-box controller beat LoRA on HPS-v2 win rates while touching fewer layers. The white-box variants reached about a 90% win rate over the baseline, and a single inference-time guidance-strength parameter dials alignment up or down.

  • ControlNet in 🧨 Diffusers

    Hugging Face mediumAdept

    ControlNet conditions Stable Diffusion on spatial inputs such as Canny edges, segmentation maps, scribbles or OpenPose keypoints. It does this by training a copy of the UNet that is linked to the frozen original through zero-convolution layers, so swapping conditionings only means swapping ControlNet weights (about 700M extra parameters for SD 1.5). The Diffusers StableDiffusionControlNetPipeline makes this practical with fp16 weights, the UniPCMultistepScheduler (cutting steps from 50 to 20), model CPU offloading and xformers attention for fast, memory-efficient inference. Worked examples cover Canny edge control, DreamBooth fine-tuned models, pose transfer with OpenPose, and combining multiple ControlNets with masked conditionings and per-condition scales.

The quest for software engineering knowledge.

Look:
Layout: