Hi, how can we help you today?

Optimizing Sampling Steps


Balancing between Speed and Quality.

Understanding the impact of Sampling Steps may let you find the right balance between generation speed (and cost) and image quality. Each “step“ represents one cycle in the AI's denoising process, where the model gradually transforms random noise into a coherent image based on your prompt.

This article explores how different step counts affect your AI-generated visuals and helps you adjust this parameter depending on your specific workflow or use case (quick prototyping, production, etc).


What Are Sampling Steps?

Sampling steps (also known as denoising steps) determine how many iterations the AI model goes through when generating an image. 

In diffusion-based AI image generation models, the process begins with pure noise (random pixels) that gradually transforms into a coherent image. Sampling steps represent each iteration in this denoising process, where the AI model progressively refines the image based on your prompt.

Think of it like a sculptor gradually revealing a figure from a block of marble - with each step, more detail emerges. Early steps make dramatic improvements to the overall shape and composition, while later steps refine smaller details. The more steps you allow, the more refined your final image becomes, but this refinement comes at the cost of increased generation time.

The trade-off is straightforward: higher steps = better quality but slower generation. But where exactly is the sweet spot for your specific needs?


Sampling Steps: Performance vs. Quality

To better understand visually the impact of sampling steps, below is a test where we kept the same model, same prompt, and the same seed while only changing the step count. The results demonstrate that as sampling steps increase, image quality improves, but with diminishing returns at higher step counts.

When examining the visual progression from lower to higher steps: 

  • Lower steps (10-15): Images are fast to generate but may show inconsistencies in details and structure 

  • Medium steps (20-30): Substantial quality improvement over 10-20, with moderate generation time

  • Higher steps (30+): Refinements become increasingly subtle while generation time (and cost) continues to increase

Generation time (and cost) increases roughly proportionally with step count, meaning an image made with 50 steps will take twice as long to generate as an image at 25 steps.


Finding the Optimal Steps for Your Workflow

The ideal step count depends on your specific needs:

For rapid iterations and concept exploration: Lower step counts provide quick results for initial concept testing. They might be good for quickly testing ideas before final refinement.

For production-ready quality: Medium step counts deliver good results for most use cases. The default settings (30 for SDXL, 28 for Flux) are optimized for this purpose.

For maximum refinement: Higher step counts are beneficial when subtle details matter. Be aware that the improvements become increasingly marginal as step counts increase.

Remember that the optimal step count can vary by model type, generation method, and specific use case. We recommend running your own controlled test on a series of images, to find the perfect balance for your specific needs.

Key Insight: In many cases, a medium step count (20-25) can achieve good quality while being significantly faster than higher step counts, potentially saving 30-40% in generation time compared to default settings.


Testing Approach in Scenario

The Scenario web interface makes it easy to conduct your own sampling step tests:

  1. Select your model and enter a prompt - generate a few images (4 to 8)

  2. Select a relevant image and copy/reuse the Seed (click on the 3-dot menu and select "Reuse Seed"). This is important for consistent comparison

  3. Then generate images with different step counts, starting low (e.g., 10) and going high (e.g., 50)

  4. Compare quality and generation time

  5. Find the step count where further increases yield diminishing returns

By following this approach, you'll discover the optimal step count that balances speed and quality for your specific workflow, potentially saving significant generation time without compromising on quality.


Was this helpful?