ComfyUI Node
KSampler Affine Advanced
A ComfyUI node in sampling/ksampler with 26 inputs and 2 outputs.
KSampler Affine Advanced
- model
- positive
- negative
- latent_image
- affine_schedule
- external_mask
- options
- noise_options
- LATENT
- MASK
◄add_noisetrue►
◄seed0►
◄steps20►
◄cfg4.5►
◄sampler_name▾►
◄scheduler▾►
◄denoise1.00►
◄affine_interval1►
◄max_scale1.200►
◄max_bias0.000►
◄patternwhite_noise►
◄affine_seed0►
◄affine_seed_incrementfalse►
◄temporal_modestatic►
◄start_at_step0►
◄end_at_step10000►
◄return_with_leftover_noisefalse►
◄merge_inactive_stepstrue►
Categorysampling/ksampler
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Diffusion model to sample with. | |
| positive | CONDITIONING | Positive prompt conditioning. | |
| negative | CONDITIONING | Negative prompt conditioning. | |
| latent_image | LATENT | Input latent to continue sampling from. | |
| add_noise | BOOLEAN | true | Add initial noise at the first step (common for text-to-image). |
| seed | INT | 00–2147483647 | Random seed for the sampler. |
| steps | INT | 201–200 | Number of denoising steps. |
| cfg | FLOAT | 4.50–100 | Classifier-free guidance scale. Can be a single float value or a list of float values for per-step CFG. If list is shorter than total steps, the last value will be repeated for remaining steps. |
| sampler_name | COMBO | The algorithm used when sampling, this can affect the quality, speed, and style of the generated output. | |
| scheduler | COMBO | The scheduler controls how noise is gradually removed to form the image. | |
| denoise | FLOAT | 1.000–1 | Fraction of noise to remove (lower = stronger preserve). |
| affine_interval | INT | 11–100 | Interval in steps to apply affine (1 = every step; 2 = every 2 steps, etc.). Does not change total steps. |
| max_scale | FLOAT | 1.2000–2 | Upper bound on multiplicative affine strength applied at schedule peak. |
| max_bias | FLOAT | 0.000-2–2 | Upper bound on additive bias applied at schedule peak. |
| pattern | COMBO | white_noise | Mask/noise pattern used when applying affine between sampling steps. |
| affine_seed | INT | 00–2147483647 | Seed for affine mask generation (separate from sampler seed). |
| affine_seed_increment | BOOLEAN | false | If enabled, increment affine seed for each group application (temporal masks). |
| affine_schedule | DICT | Use WASAffineScheduleOptions (interpreted over total steps). | |
| temporal_mode | COMBO | static | Temporal behavior of the affine mask for video latents. 'static': one mask reused across all frames at each application. 'per_frame': re-generate mask per frame (livelier/noisier motion). |
| external_maskopt | IMAGE | Optional external mask image; when provided and pattern != external_mask, it gates where affine applies. | |
| optionsopt | DICT | Base options DICT for affine (e.g., common or full options). | |
| noise_optionsopt | DICT | Pattern-specific overrides that layer onto 'options'. | |
| start_at_stepopt | INT | 00–10000 | First step index (inclusive) to run within the sampler. |
| end_at_stepopt | INT | 100000–10000 | End step index (exclusive) within the sampler. |
| return_with_leftover_noiseopt | BOOLEAN | false | If true, force last step to full denoise behavior. |
| merge_inactive_stepsopt | BOOLEAN | true | Greedily merge steps outside the active schedule window into larger batches. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| MASK | MASK | — |