Custom Sampler Affine Advanced
Affine inside your custom sampling stack
- noise
- guider
- sampler
- sigmas
- latent_image
- affine_schedule
- external_mask
- options
- noise_options
- output
- denoised_output
This is the node for people who've left KSampler behind. ComfyUI's custom sampling stack - a NOISE generator, a guider, a sampler, and a sigma schedule wired into one Custom Sampler node - is the way to run per-step guiders, exotic samplers, and schedules that KSampler can't express. Custom Sampler Affine Advanced is that same stack with the WAS Affine transform interleaved between steps.
Inputs and outputs
The custom sampling core:
- noise - the NOISE generator used at the first step.
- guider - your CFG guider (or a fancier one).
- sampler - e.g. euler, dpmpp_2m.
- sigmas - the sigma schedule; length is steps+1.
- latent_image - the latent to denoise along that schedule.
Then the affine controls, all the same ones as the KSampler variants: affine_interval (apply every N steps), max_scale, max_bias, pattern, affine_seed, affine_seed_increment, affine_schedule (the DICT from WASAffineScheduleOptions), plus optional external_mask, options, noise_options, and temporal_mode (static/per_frame for video latents).
Outputs: output (the final latent) and denoised_output (the latent before the final step's denoise - handy for chaining or inspection).
Why you'd go this far
Honestly? Only if you're already running custom sampling. If your workflow uses a custom guider or a bespoke sigma schedule, this is how you get the affine effect without giving those up. There's also a nice pairing with Affine Pattern Noise: feed its structured NOISE into the noise input and you've got the full AFFINE treatment - shaped starting noise and per-step masked enhancement. For everyone else on a plain KSampler, the KSampler Affine nodes are the easier path.
Installing
Part of WAS Affine by WASasquatch. ComfyUI Manager → Install Custom Nodes → search "WAS Affine" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was_affine
Restart ComfyUI. ComfyUI 1.0.0+, torch and numpy only.
Common issues
The sigmas input has to be a real schedule of length steps+1 - a hand-built mismatched one is the fastest way to get an error or a nonsense result. The affine seed is independent of everything else in the stack, so when a result changes mysteriously between runs, check whether affine_seed is fixed. And like every affine node: start subtle. max_scale near 1.05–1.1 with a soft pattern; you can always turn it up once you see the baseline.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| noise | NOISE | Noise generator used at the first step to start from noise when needed. | |
| guider | GUIDER | CFG guider to use for denoising. | |
| sampler | SAMPLER | Base sampler (e.g., euler, dpmpp_2m). | |
| sigmas | SIGMAS | Sigma schedule defining the trajectory; length = steps+1. | |
| latent_image | LATENT | Initial latent input to denoise along the provided sigma schedule. | |
| affine_interval | INT | 11–100 | Apply affine every N steps (1 = every step). |
| max_scale | FLOAT | 1.2000–2 | Scale multiplier at schedule peak: 1 + (max_scale-1)*t. |
| max_bias | FLOAT | 0.000-2–2 | Bias added at schedule peak: max_bias*t. |
| pattern | COMBO | white_noise | Mask/noise pattern used by Affine. |
| affine_seed | INT | 00–2147483647 | Seed for affine mask generation (separate from sampler seed). |
| affine_seed_increment | BOOLEAN | false | If enabled, increment affine seed after each application (temporal masks). |
| affine_schedule | DICT | Use WASAffineScheduleOptions; interpreted over total steps (start/end/bias/exponent/curve/etc.). | |
| external_maskopt | IMAGE | Optional external mask image to gate affine application. | |
| optionsopt | DICT | Base options for Affine (common/full options). | |
| noise_optionsopt | DICT | Pattern-specific overrides layered onto 'options'. | |
| temporal_modeopt | COMBO | static | Temporal behavior of the affine mask when applicable. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output | LATENT | — |
| denoised_output | LATENT | — |