KSampler is where the magic actually happens in ComfyUI—the node that takes a field of random noise and gradually refines it into a coherent image. Other nodes load models, encode text, and save files, but KSampler in ComfyUI is the engine doing the heavy lifting. Guided by your text prompt and the diffusion model, it removes noise across multiple steps until you’ve got something worth looking at. This reverse diffusion process is what powers all modern text-to-image generation.
Get KSampler explained and you’re really learning about the quality dials that actually matter. Every basic ComfyUI workflow follows the same path: Checkpoint Loader → CLIP Text Encode → KSampler → VAE Decode → Save Image. KSampler sits at the critical junction, pulling inputs from your model, your positive and negative prompts (conditioning), and a latent image (usually pure noise). Four settings control everything here—steps, CFG scale, sampler type, and scheduler—and they’re the difference between a 10-second draft and a polished render.
KSampler Settings at a Glance
| Setting | Purpose | Typical Range | Impact |
|---|---|---|---|
| Steps | Denoising iterations | 20–30 (standard) | Higher = better quality, slower generation |
| CFG Scale | Prompt adherence vs. creativity | 7–8 (balanced) | Higher = stricter prompt following, risk of artifacts |
| Sampler | Denoising algorithm | Euler, DPM++ 2M | Affects speed and aesthetic quality |
| Scheduler | Noise-removal pacing | Karras (default) | Affects sharpness and detail distribution |
The Core Inputs and Outputs
Before you start tweaking settings, it helps to know what KSampler actually receives and sends out.
Inputs:
- Model – The diffusion model itself (loaded via Checkpoint Loader or UNETLoader)
- Positive conditioning – Text encoding of what you want to see (from CLIP Text Encode with your prompt)
- Negative conditioning – Text encoding of what you want to avoid (from a second CLIP Text Encode with negative terms)
- Latent image – Usually an empty noise field (from Empty Latent Image node), but can be an existing image’s latent representation (for img2img or refinement workflows)
- Seed – The random number that seeds the initial noise pattern
Outputs:
- Latent – The denoised latent representation, which VAE Decode then converts into actual pixels
💡 Tip: The latent space is compressed and abstract—you can’t see it directly. That’s why VAE Decode is essential afterward to turn it into an image you can actually view.
Steps: How Many Denoising Iterations to Run
Steps control how many times the model refines the image, removing a small amount of noise with each pass. This is probably the most straightforward ComfyUI steps setting to get a handle on.
The practical range: 20–30 steps is the sweet spot for most models. Good quality without making your GPU work overtime.
Lower steps (15–20): Faster generation, ideal for drafts and quick previews. Quality drops noticeably but stays acceptable for iteration and testing.
Higher steps (40–50+): Marginal improvements beyond 40–50. The model’s already resolved most details by step 30; extra steps rarely add anything meaningful to the final image but always cost time. The law of diminishing returns applies hard here.
Example: Same prompt, 20 steps versus 60 steps on a typical model—maybe 30 seconds versus 90 seconds. The visual difference? Often imperceptible if your CFG and sampler are already tuned right.
Turbo and distilled models flip this script entirely. They’re trained to produce solid results in 4–8 steps. Forcing standard 20–30 step settings on them is just wasted compute.
👉 Quick takeaway: Aim for 20–30 steps as your baseline; going higher rarely improves quality noticeably and only costs generation time. Turbo models are the exception—follow their documented settings instead.
CFG Scale: Balancing Prompt Adherence and Creativity
ComfyUI CFG scale is your primary dial for controlling how strictly the model follows your prompt versus its own learned patterns and aesthetics. It’s the tension between creative freedom and prompt fidelity, dialed up or down.
Default and balanced: 7–8 is a reliable starting point for most models and prompts.
Lower values (5–6): The model gets more creative freedom. Results often look more natural, less obviously AI-generated, and more varied—but they may drift from your exact prompt. Use this when you want the model to interpret your intent rather than lock onto keywords.
Higher values (10–12): Tighter prompt adherence. The model follows your text more literally, but results can become oversaturated, develop artifacts, or look unnatural.
Extreme values (>13): Visible artifacts, color distortion, and degraded quality on most models. You’re pushing the model too hard to follow the conditioning and it breaks down.
Practical example: Prompt: “A serene forest at sunset.” At CFG 5, you might get a beautiful, painterly scene that doesn’t match the prompt exactly. At CFG 8, you get a recognizable sunset forest. At CFG 12, you get a very literal forest with a sun, but possibly oversaturated colors. At CFG 15, you’re seeing visual glitches.
⚠️ Important: Stay below CFG 13 on most models. Above that, you’re usually just introducing artifacts without gaining quality.
👉 Quick takeaway: Start with CFG 7–8 for balanced results. Lower values (5–6) give creative freedom; higher values (10–12) enforce prompt adherence but risk artifacts above ~13.
Sampler vs. Scheduler: Understanding the Difference
One of the most common points of confusion is the distinction between sampler and scheduler. ComfyUI sampler vs scheduler are independent but complementary—they work together to control denoising, but they’re not the same thing.
The Sampler: The Denoising Algorithm
The sampler is the specific algorithm that removes noise at each step. Different samplers converge at different speeds and produce subtly different aesthetics.
Common Samplers
| Sampler | Speed | Quality | Use Case |
|---|---|---|---|
| Euler | Fast | Reliable baseline | Quick previews, general purpose |
| DPM++ 2M | Medium | Strong quality/speed balance | Default recommendation for most workflows |
| DPM++ 2M SDE | Medium | High quality, slightly more varied | Final renders, when quality is priority |
| DDIM | Medium | Deterministic, older | Reproducibility, specific legacy workflows |
| Res Multistep | Fast | Optimized for turbo models | Turbo/distilled model workflows only |
Euler is your reliable, fast baseline—works across most models, simple and solid for iteration.
DPM++ 2M and DPM++ 2M SDE hit the quality/speed sweet spot that most people settle on. DPM++ 2M SDE adds stochasticity (randomness), which can give you more varied results from the same seed.
DDIM is deterministic and older, but still used when exact reproducibility matters or a workflow author specifically recommends it.
Res Multistep is tuned for turbo and distilled models, which are trained on very few steps. Using it on standard models typically produces worse results.
📌 Keep in mind: Model cards and workflow authors often recommend a specific sampler for a reason. If you download a workflow, check whether it specifies one—that choice was probably made deliberately during testing.
The Scheduler: Controlling the Denoising Pace
The scheduler controls how the noise-removal effort is distributed across your steps. It doesn’t change the algorithm itself (that’s the sampler), but rather the pacing and intensity curve.
Karras is the most common default. It allocates more “denoising effort” toward the final steps, where fine details and textures resolve. Usually produces sharp, detailed results.
Simple and Normal apply a more even, linear schedule across all steps. Less aggressive, sometimes more stable with certain sampler/model combinations.
Exponential and Polynomial are less common but available for specialized workflows.
The scheduler and sampler are independent choices that combine. Common pairings include:
- Euler + Karras
- DPM++ 2M + Karras
- DDIM + Karras
Mismatched pairs occasionally produce noticeably worse results. If a downloaded workflow specifies both a sampler and scheduler, keep them together rather than mixing at random. Experimenting? Change one variable at a time.
👉 Quick takeaway: The sampler is the algorithm; the scheduler is the pacing. They’re independent but should be paired deliberately—if a workflow specifies both, keep that pairing rather than mixing randomly.
Denoise: For Image-to-Image and Refinement
The Denoise setting controls how much of the original image is preserved when you use an existing image as a starting point instead of pure noise.
1.0 (default): Start from full noise. Generates a completely new image, ignoring any input latent.
0.5–0.7: Moderate regeneration. Useful for refining an existing image, adding detail, or changing style while keeping the composition intact.
0.2–0.3: Heavy preservation. Keeps most of the original image structure and only partially regenerates. Used for subtle refinements or upscaling passes.
You’ll typically see Denoise in img2img workflows or multi-pass refinement chains where you generate an initial image, then feed it back into KSampler with a lower denoise value to polish it up.
Seed: Reproducibility and Variation
The seed is the random number that initializes the noise field. Same seed with identical settings reproduces the same image exactly.
Fixed seed: Standard practice while iterating on prompts or testing the effect of changing one setting (e.g., CFG). Keeps everything else constant so you can isolate what changed.
Random seed: Useful once you’ve locked in settings and want to generate multiple variations of the same prompt.
Control after generate: A common pattern is to set control_after_generate to “increment,” which automatically increases the seed by 1 with each generation. Gives you consistent variation without manual seed tweaking.
Putting It Together: Practical Workflows
Quick draft (15–20 seconds):
- Steps: 15–20
- CFG: 7
- Sampler: Euler
- Scheduler: Karras
- Denoise: 1.0
Standard quality (30–45 seconds):
- Steps: 25–30
- CFG: 7–8
- Sampler: DPM++ 2M
- Scheduler: Karras
- Denoise: 1.0
High quality, slower (60–90 seconds):
- Steps: 40–50
- CFG: 7–8
- Sampler: DPM++ 2M SDE
- Scheduler: Karras
- Denoise: 1.0
Turbo model (4–8 seconds):
- Steps: 4–8
- CFG: 1.0–2.0
- Sampler: Res Multistep (or Euler)
- Scheduler: Karras
- Denoise: 1.0
Turbo models are specifically trained on very few steps and minimal guidance. Standard settings will only slow them down without improving quality.
FAQ
Q: What steps value should I use in KSampler?
A: 20–30 steps is the typical sweet spot for most models—a good balance of quality and speed. More steps generally improve quality but with diminishing returns after 40–50; going higher rarely helps and just costs time.
Q: What does CFG scale actually control?
A: How strictly the model follows your prompt versus its own tendencies. 7–8 is a balanced default. Lower values (5–6) give more creative freedom but drift from the prompt; higher values (10–12) stick closer to the prompt but risk oversaturation or artifacts above roughly 13.
Q: What’s the difference between the sampler and the scheduler?
A: The sampler is the denoising algorithm itself (e.g. euler, dpmpp_2m). The scheduler controls how the noise-removal effort is paced across the steps (e.g. karras, simple, normal). They’re independent settings that combine—if a downloaded workflow specifies both together, keep that pairing rather than mixing randomly.
Q: Why do some models only need 4–8 steps instead of 20–30?
A: Turbo or distilled models are specifically trained to produce good results in very few steps, often with low or no CFG guidance. Forcing normal 20–30 step settings on them doesn’t improve quality and just wastes generation time—follow the model’s documented recommended settings instead.
Keep Reading
New to ComfyUI’s node graph? Start with our What Is ComfyUI primer. Once you’re comfortable with KSampler, adding LoRAs to your workflow is the natural next step, and our tiled upscale workflow shows KSampler settings applied to a real multi-pass refinement pipeline.
🏆 Our Recommendation
If you’re starting out with ComfyUI → use 25–30 steps, CFG 7–8, DPM++ 2M + Karras. This is the reliable middle ground for quality and speed on standard models.
If you prioritize speed over quality → drop to 15–20 steps with Euler + Karras, or switch to a turbo model with 4–8 steps and CFG 1–2.
If you’re after maximum quality and have time → increase to 40–50 steps with DPM++ 2M SDE + Karras, but understand that gains diminish rapidly beyond 40 steps.
If you’re using a turbo or distilled model → always follow the model’s documented settings (typically 4–8 steps, low CFG); standard settings will only waste generation time without improving results.
Next steps in ComfyUI
Getting started
FAQ
- What steps value should I use in KSampler?
- 20-30 steps is the typical sweet spot for most models -- a good balance of quality and speed. More steps generally improve quality but with diminishing returns after 40-50; going higher rarely helps and just costs time.
- What does CFG scale actually control?
- How strictly the model follows your prompt versus its own tendencies. 7-8 is a balanced default. Lower values (5-6) give more creative freedom but drift from the prompt; higher values (10-12) stick closer to the prompt but risk oversaturation or artifacts above roughly 13.
- What's the difference between the sampler and the scheduler?
- The sampler is the denoising algorithm itself (e.g. euler, dpmpp_2m). The scheduler controls how the noise-removal effort is paced across the steps (e.g. karras, simple, normal). They're independent settings that combine -- if a downloaded workflow specifies both together, keep that pairing rather than mixing randomly.
- Why do some models only need 4-8 steps instead of 20-30?
- Turbo or distilled models are specifically trained to produce good results in very few steps, often with low or no CFG guidance. Forcing normal 20-30 step settings on them doesn't improve quality and just wastes generation time -- follow the model's documented recommended settings instead.