Image Generation › Key Parameters
Michael BrenndoerferJanuary 5, 20262 min read
Language AI HandbookAll chapters Part 50 of 67Multimodal Models
Image Generation › Key ParametersOne section · Sections in this chapter11 / 14 ↓
Sections in this chapter14
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Diffusion model design involves several critical hyperparameters that jointly determine output quality and generation speed as well as controllability.
The key parameters are:
- T (number of timesteps): Controls granularity of the diffusion process. More steps allow finer-grained denoising but increase sampling time. Typical training values: 100-1000 steps. Typical inference values: 20-50 steps with advanced samplers like DPM-Solver++.
- Beta schedule (linear vs. cosine): The linear schedule is simple but allocates timesteps unevenly. The cosine schedule typically produces better results by spending more steps at informative intermediate noise levels.
- Guidance scale (w): Higher values increase text fidelity but reduce diversity and can cause oversaturation. Typical values: 7-12 for creative generation where strong prompt adherence is desired, 1-3 for realistic variation with more diversity.
- Latent compression factor: For latent diffusion, the ratio between image size and latent size. An 8x spatial compression (standard in Stable Diffusion) reduces compute substantially while maintaining quality. Too much compression loses fine detail; too little is computationally expensive.
- U-Net attention resolution: Self-attention is added at lower resolutions where the spatial dimensions are small. Adding attention at higher resolutions captures finer long-range dependencies but increases memory cost quadratically with the spatial size.
- VAE regularization strength: The KL term in VAE training controls how tightly the latent distribution matches a Gaussian. Too much regularization produces a degenerate latent space; too little allows the latent to become so non-Gaussian that the diffusion model cannot traverse it effectively.