Sampling
What is Sampling?
Sampling is the mathematical process an AI uses to turn random noise into a coherent image or video: different sampling methods take different routes through this process, affecting both the speed and quality of the result.
At a glance
- Also known as
- SamplerSchedulerSampling methodInference sampling
- Used for
- Generating outputs from diffusion models through iterative noise-to-image refinementControlling the speed-quality trade-off in AI generation through sampler and step count selectionProducing different visual characteristics from the same prompt by varying the sampling approachUnderstanding why generation quality and character can vary independently of prompt content
- Common tools
- Stable diffusion WebUI (extensive sampler selection and step count controls)ComfyUI (node-based sampler configuration)Most advanced AI generation platforms (quality preset sliders abstracting sampling parameters)DPM++ solver, DDIM, euler, euler ancestral (common sampler implementations)
- Related terms
- Diffusion modelSeedNoise / denoisingInferenceGuidance scaleSteps
- How it works in simple terms
- The model starts from random noise and takes a defined number of steps to refine it into a coherent image, with the sampler determining exactly how it moves through each step. More steps means more refinement; the sampler choice determines the mathematical path taken to get there.
Ready to create?
Direct scenes, design characters, and ship full films
All-in-one AI creative platform with simple, transparent pricing, no speed throttles, and an infinite Canvas for max creativity.
How it compares
Compared with related concepts
Sampling and the prompt are both inputs that determine generation output, but they operate at fundamentally different levels. The prompt determines what the model is trying to generate: the semantic content, style, and subject. The sampler and step count determine how the model navigates the generation process to produce that content: the mathematical path from noise to image. Two identical prompts with different samplers will produce outputs that share the same semantic direction but may differ meaningfully in detail quality, motion smoothness, and aesthetic character. Changing the sampler changes the journey; changing the prompt changes the destination.
Think of it like…
Sampling is like different routes through a city to the same destination — DDIM might be the motorway, fast and efficient with fewer diversions; Euler Ancestral might be the scenic route, taking more steps but potentially discovering more interesting interpretive territory along the way. The destination (the prompt's semantic target) is the same; the route (the sampler) determines how you arrive and what the journey produces.
Pro tip
When using platforms that expose step count controls, resist the assumption that maximum steps always produces the best result for your use case. For exploratory iteration, lower step counts are faster and often sufficient for evaluating whether a creative direction is working. For final generation, higher step counts are worth the additional time. Finding the minimum step count that produces acceptable quality for each phase of your workflow is one of the most practical ways to speed up the overall generation process without sacrificing final output quality.
Types and variations
- DDIM (Denoising Diffusion Implicit Models) is a deterministic sampler that allows good results at lower step counts by making the denoising process predictable and consistent.
- Euler and Euler Ancestral are widely used general-purpose samplers offering reliable quality across a range of step counts.
- DPM++ variants (DPM++ 2M, DPM++ SDE) are popular for their efficiency at moderate step counts and are frequently the default in consumer-facing AI generation tools.
- DDPM is the original diffusion sampling method: slower but capable of high quality at sufficient step counts.
- Flow matching, used in newer model architectures, offers a different approach to the same problem with often dramatically reduced step counts needed for high-quality output.
Ready to make your first scene in Morphic?
Try MorphicCommon use cases
- Sampling configuration is relevant whenever an AI generation platform exposes sampler or step count controls, which is common in open-source tools like Stable Diffusion WebUI and ComfyUI.
- Understanding sampling helps creators interpret quality presets: labels like 'draft', 'standard', and 'quality' on consumer platforms typically correspond to different step count settings with potentially different samplers.
- It is relevant when troubleshooting inconsistent generation results, when optimising the speed-quality balance for iterative workflow phases, and when comparing outputs across different model versions that may use different default sampling configurations.
Ready to create?
Direct scenes, design characters, and ship full films
All-in-one AI creative platform with simple, transparent pricing, no speed throttles, and an infinite Canvas for max creativity.