Nodes/WAS Affine/Ultimate Affine KSampler
ComfyUI Node

Ultimate Affine KSampler

A ComfyUI node in image/upscaling with 32 inputs and 1 output.

By WASasquatch·Created 12 months ago·Updated 4 months ago· 5
Ultimate Affine KSampler
  • image
  • model
  • positive
  • negative
  • vae
  • external_mask
  • options
  • noise_options
  • affine_schedule
  • IMAGE
seed0
steps20
cfg8.0
sampler_nameeuler
schedulersimple
denoise0.20
affine_interval1
max_scale1.2000
max_bias0.0000
patternwhite_noise
affine_seed0
affine_seed_incrementfalse
tile_width0
tile_height0
tile_overlap64
tiled_decodefalse
tiled_tile_size512
tiled_overlap64
tiled_temporal_size64
tiled_temporal_overlap8
batch_size0
merge_frames_in_batchtrue
vae_encode_batch_modeimages
Categoryimage/upscaling

Inputs (32)

NameTypeDefaultDescription
imageIMAGEInput IMAGE or VIDEO tensor. Supports [B,H,W,C] or [B,F,H,W,C].
modelMODELDiffusion model to sample with.
positiveCONDITIONINGPositive prompt conditioning.
negativeCONDITIONINGNegative prompt conditioning.
vaeVAEVAE used to encode/decode latents during USDU.
seedINT00–18446744073709550000Seed for base sampler (noise).
stepsINT201–10000Number of denoising steps.
cfgFLOAT8.00–100Classifier-free guidance scale. Can be a single float or a per-step list (short lists repeat last value).
sampler_nameCOMBOeulerBase sampler algorithm.
schedulerCOMBOsimpleScheduler for sigma schedule.
denoiseFLOAT0.200–1Denoise fraction (<=1).
external_maskoptIMAGEOptional external mask to gate affine.
optionsoptDICTBase options for Affine (common/full options).
noise_optionsoptDICTPattern-specific overrides layered onto 'options'.
affine_intervaloptINT11–100Apply affine every N steps (1 = every step).
max_scaleoptFLOAT1.20000–2Scale at schedule peak: 1 + (max_scale-1)*t.
max_biasoptFLOAT0.0000-2–2Bias at schedule peak: max_bias*t.
patternoptCOMBOwhite_noiseAffine mask pattern.
affine_seedoptINT00–18446744073709550000Seed for affine mask generation (separate from sampler seed).
affine_seed_incrementoptBOOLEANfalseIncrement affine seed after each application (temporal).
affine_scheduleoptDICTWASAffineScheduleOptions dict; interpreted over total steps with repeat-last behavior.
tile_widthoptINT0-1–16384IMAGE-space sampling tile width in pixels. 0 disables IMAGE tiling (single pass). -1 auto-calculates proportional tile size ≤1024 pixels.
tile_heightoptINT0-1–16384IMAGE-space sampling tile height in pixels. 0 disables IMAGE tiling (single pass). -1 auto-calculates proportional tile size ≤1024 pixels.
tile_overlapoptINT640–2048IMAGE-space overlap between sampling tiles (pixels).
tiled_decodeoptBOOLEANfalseUse VAE tiled decode to reduce VRAM spikes for large outputs/video.
tiled_tile_sizeoptINT51264–8192Target output tile size (pixels) for VAE tiled decode.
tiled_overlapoptINT640–1024Output-space overlap (pixels) for tiled decode.
tiled_temporal_sizeoptINT640–4096Temporal window size (frames) for video tiled decode. 0 disables temporal tiling.
tiled_temporal_overlapoptINT80–512Temporal overlap (frames) for video tiled decode.
batch_sizeoptINT00–4096Process the batch dimension in chunks of this size to reduce peak VRAM. 0 = process all at once. Applies to non-tiling path.
merge_frames_in_batchoptBOOLEANtrueIf decoded IMAGE is 5D [B,F,H,W,C], merge F into batch for concat.
vae_encode_batch_modeoptCOMBOimagesimages: treat batch dim as separate images [B,C,1,H,W]. frames: treat batch dim as video frames [1,C,B,H,W].

Outputs (1)

NameTypeDescription
IMAGEIMAGE