The KSampler works like this: it modifies the provided original latent image information based on a specific model and both positive and negative conditions. First, it adds noise to the original image data according to the set seed and denoise strength, then inputs the preset Model combined with positive and negative guidance conditions to generate the image.Documentation Index
Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
Use this file to discover all available pages before exploring further.
Inputs
| Parameter Name | Data Type | Required | Default | Range/Options | Description |
|---|---|---|---|---|---|
| Model | checkpoint | Yes | None | - | Input model used for the denoising process |
| seed | Int | Yes | 0 | 0 ~ 18446744073709551615 | Used to generate random noise, using the same “seed” generates identical images |
| steps | Int | Yes | 20 | 1 ~ 10000 | Number of steps to use in denoising process, more steps mean more accurate results |
| cfg | float | Yes | 8.0 | 0.0 ~ 100.0 | Controls how closely the generated image matches input conditions, 6-8 recommended |
| sampler_name | UI Option | Yes | None | Multiple algorithms | Choose sampler for denoising, affects generation speed and style |
| scheduler | UI Option | Yes | None | Multiple schedulers | Controls how noise is removed, affects generation process |
| Positive | conditioning | Yes | None | - | Positive conditions guiding denoising, what you want to appear in the image |
| Negative | conditioning | Yes | None | - | Negative conditions guiding denoising, what you don’t want in the image |
| Latent_Image | Latent | Yes | None | - | Latent image used for denoising |
| denoise | float | No | 1.0 | 0.0 ~ 1.0 | Determines noise removal ratio, lower values mean less connection to input image |
| control_after_generate | UI Option | No | None | Random/Inc/Dec/Keep | Provides ability to change seed after each prompt |
Output
| Parameter | Function |
|---|---|
| Latent | Outputs the latent after sampler denoising |