Nodes/WAS Affine/Latent Affine
ComfyUI Node

Latent Affine

A ComfyUI node in latent/adjust with 9 inputs and 2 outputs.

By WASasquatch·Created 12 months ago·Updated 4 months ago· 5
Latent Affine
  • latent
  • external_mask
  • noise_options
  • options
  • latent
  • mask
scale0.960
bias0.000
pattern
temporal_mode
seed0
Categorylatent/adjust

Inputs (9)

NameTypeDefaultDescription
latentLATENTInput latent input to apply Affine to.
scaleFLOAT0.9600–2Multiplicative factor applied. Examples: 1.0 = no change, <1 darkens, >1 amplifies features. Influence: controls gain in masked regions.
biasFLOAT0.000-2–2Additive offset applied. Examples: 0.1 brightens, -0.1 darkens. Influence: shifts values in masked regions.
patternCOMBOMask source. Procedural: white/pink/brown(red)/blue/violet(purple)/green/black (spectrally-shaped); cross_hatch (oriented gratings); highpass_white (Butterworth-shaped); ring_noise (narrow high-freq annulus); poisson_blue_mask (Poisson-disk distance field); worley_edges (cell boundaries); tile_oriented_lines (per-tile gratings); dot_screen_jitter (halftone dots with jitter); velvet (sparse impulses); perlin (smooth noise); checker/bayer (tiled); solid (constant alpha). Content-aware (from latent): detail_region (high texture/variance), smooth_region (low detail), edges_sobel, edges_laplacian. external_mask: use provided IMAGE directly. If an external mask is connected and pattern != external_mask, it gates the generated mask so the affine/noise only applies where this mask is 1.
temporal_modeCOMBOStatic: one mask for all frames. Per-frame: vary mask over time..
seedINT00–2147483647Random seed for procedural masks.
external_maskoptIMAGEExternal mask image [N,H,W,C]. If pattern='external_mask', this image (after threshold/invert/blur) is used as the mask. Otherwise, if connected, it gates the generated mask so the affine/noise only applies where this mask is 1.
noise_optionsoptDICTDICT for pattern-specific params (e.g., poisson_*, worley_*, tile_line_*, dot_*). Applied AFTER 'options'.
optionsoptDICTBase options DICT. Use for Common Options or the Full Options node. 'noise_options' will override overlapping keys from here.

Outputs (2)

NameTypeDescription
latentLATENT
maskMASK