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:

OptionBehavior
randomizeChoose a random seed each time to try many different compositions
fixedKeep the seed unchanged while you fine-tune other parameters
increment / decrementAdd 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:

CFGEffect
1Mostly ignores the prompts (often set to 1–2 for accelerated models)
4–8Common range
10 or higherFollows 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:

SamplerCharacteristics
eulerSimple, fast, and stable; a good default
euler_ancestralAdds randomness at each step, producing more varied results; results vary greatly when you change the number of steps
dpmpp_2mBalances quality and speed; very commonly used
dpmpp_2m_sdeProduces richer details, but is a little slower
dpmpp_3m_sdeRequires more steps
uni_pcPerforms 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:

SchedulerCharacteristics
normalDefault
karrasFiner steps near the end; often paired with the dpmpp family
exponentialSimilar to karras
sgm_uniformRecommended for some accelerated models
simple, betaUsed 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:

ParameterDescription
add_noiseWhether to add noise
start_at_step / end_at_stepRun only the specified range of steps
return_with_leftover_noiseKeep 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

  1. Fix the seed first.
  2. Use the sampler, scheduler, and number of steps recommended for the model.
  3. Adjust the prompts until the content matches what you want.
  4. 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.
  5. 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