Nodes/WAS Affine/Custom Sampler Affine Advanced
ComfyUI Node

Custom Sampler Affine Advanced

Affine inside your custom sampling stack

By WASasquatch·Created about a year ago·Updated 4 months ago· 5
Custom Sampler Affine Advanced
  • noise
  • guider
  • sampler
  • sigmas
  • latent_image
  • affine_schedule
  • external_mask
  • options
  • noise_options
  • output
  • denoised_output
affine_interval1
max_scale1.200
max_bias0.000
patternwhite_noise
affine_seed0
affine_seed_incrementfalse
temporal_modestatic

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.

Categorysampling/custom_sampling

Inputs (16)

NameTypeDefaultDescription
noiseNOISENoise generator used at the first step to start from noise when needed.
guiderGUIDERCFG guider to use for denoising.
samplerSAMPLERBase sampler (e.g., euler, dpmpp_2m).
sigmasSIGMASSigma schedule defining the trajectory; length = steps+1.
latent_imageLATENTInitial latent input to denoise along the provided sigma schedule.
affine_intervalINT11–100Apply affine every N steps (1 = every step).
max_scaleFLOAT1.2000–2Scale multiplier at schedule peak: 1 + (max_scale-1)*t.
max_biasFLOAT0.000-2–2Bias added at schedule peak: max_bias*t.
patternCOMBOwhite_noiseMask/noise pattern used by Affine.
affine_seedINT00–2147483647Seed for affine mask generation (separate from sampler seed).
affine_seed_incrementBOOLEANfalseIf enabled, increment affine seed after each application (temporal masks).
affine_scheduleDICTUse WASAffineScheduleOptions; interpreted over total steps (start/end/bias/exponent/curve/etc.).
external_maskoptIMAGEOptional external mask image to gate affine application.
optionsoptDICTBase options for Affine (common/full options).
noise_optionsoptDICTPattern-specific overrides layered onto 'options'.
temporal_modeoptCOMBOstaticTemporal behavior of the affine mask when applicable.

Outputs (2)

NameTypeDescription
outputLATENT
denoised_outputLATENT