Contents
ComfyUI KSampler Tutorial: Understand Steps, CFG, Samplers, Schedulers, and Seed
KSampler is one of ComfyUI's core nodes. It generates an image by gradually removing noise. Understand its parameters so you can adjust results intentionally instead of guessing.
Seed: random seed
The seed determines the starting noise pattern. The same model, prompts, parameters, and seed produce the same image.
control_after_generate controls how the seed changes after each run:
| Option | Behavior |
|---|---|
| randomize | Choose a random seed each time to try many different compositions |
| fixed | Keep the seed unchanged while you fine-tune other parameters |
| increment / decrement | Add 1 / subtract 1 each time |
A suggested workflow: start with randomize to find a composition you like → switch to fixed → then fine-tune the prompts and parameters.
Steps
The number of steps used to remove noise.
- Too few steps: the image looks blurry and lacks detail.
- More steps: quality improves, but beyond a certain point there is little difference and generation only gets slower.
- 20–30 steps are usually enough for standard models.
- Models or LoRAs labeled Turbo, Lightning, LCM, Hyper, or similar, only need 4–8 steps. Set this according to the model's instructions.
CFG: prompt strength
CFG (Classifier-Free Guidance) determines how closely the model follows your prompts:
| CFG | Effect |
|---|---|
| 1 | Mostly ignores the prompts (often set to 1–2 for accelerated models) |
| 4–8 | Common range |
| 10 or higher | Follows the prompts closely, but can cause oversaturation, excessive contrast, or visual artifacts |
The best CFG varies greatly between models. For example, many Flux models use a separate guidance parameter and set KSampler's CFG to 1. Follow the recommended value on the model page or in the official workflow.
sampler_name: sampler
The algorithm used to remove noise at each step. Common options include:
| Sampler | Characteristics |
|---|---|
euler | Simple, fast, and stable; a good default |
euler_ancestral | Adds randomness at each step, producing more varied results; results vary greatly when you change the number of steps |
dpmpp_2m | Balances quality and speed; very commonly used |
dpmpp_2m_sde | Produces richer details, but is a little slower |
dpmpp_3m_sde | Requires more steps |
uni_pc | Performs well with fewer steps |
Samplers with ancestral (a) or sde in the name are random. Even with the same seed, changing the number of steps can produce very different images. Other samplers tend to “converge” as you add steps.
scheduler
Determines how the amount of noise removed is distributed across steps:
| Scheduler | Characteristics |
|---|---|
normal | Default |
karras | Finer steps near the end; often paired with the dpmpp family |
exponential | Similar to karras |
sgm_uniform | Recommended for some accelerated models |
simple, beta | Used in workflows for some newer models |
Common combinations include dpmpp_2m + karras and euler + normal.
denoise: denoising strength
The proportion of noise to start with:
- 1.0: Start entirely from noise; used for text-to-image.
- Less than 1.0: Preserve part of the input image; used for image-to-image, inpainting, and upscale refinement. The lower the value, the closer the result stays to the original image.
See Image-to-image.
KSampler Advanced
The advanced version offers finer control:
| Parameter | Description |
|---|---|
| add_noise | Whether to add noise |
| start_at_step / end_at_step | Run only the specified range of steps |
| return_with_leftover_noise | Keep the remaining noise in the output |
Use it, for example, to run the first 20 steps with model A and hand off the next 10 steps to model B for refinement (as with the SDXL Refiner), or to use different prompts in two stages.
Suggested order for adjusting parameters
- Fix the seed first.
- Use the sampler, scheduler, and number of steps recommended for the model.
- Adjust the prompts until the content matches what you want.
- Fine-tune CFG: increase it if the image looks too flat or the model does not follow the prompts; decrease it if the image is oversaturated or has artifacts.
- Try different samplers last.
Tips for comparing parameters
Connect the same prompts to multiple KSampler nodes, each with different parameters, to compare the results side by side in one run. When you copy a node, press Ctrl + Shift + V to preserve its input connections.
Updated October 12, 2026