Affine Detail Region Options
The content-aware mask that finds the busy bits
- noise_options
Most of the patterns in WAS Affine are procedural - they don't care what's in your image. detail_region is different: it looks at the actual latent and builds the mask where there's already a lot of local variation. High-variance areas get the affine; flat areas stay alone. It's the "enhance the busy parts" pattern, and Affine Detail Region Options is the single-knob node that tunes it.
The knob
- content_window (default 7) - the odd-sized kernel used to compute local variance. Bigger kernel (9, 11) = the mask considers a wider neighborhood, so it finds broader detailed zones; smaller (5) = it responds to tighter, finer-grained variation.
That's the whole input. The node outputs a noise_options DICT for the noise_options input of Latent Affine (and the affine samplers). Pair it with the smooth_region sibling pattern to go the other way - flat areas only.
When you'd use it
This is the pattern for the classic "textures good, skies bad" problem: boost detail where it already exists without touching the smooth parts that would just turn into noise. The README's guidance is exactly that - detail_region for textures, smooth_region for skies. Since the mask is computed from the latent itself, there's no seed to manage and nothing to place by hand; the trade-off is you can't pre-visualize the mask until you run it (which the mask output from Latent Affine handles - preview it once and you'll see the mask hugging the high-texture zones).
One real note: "detail" here means local variance, not semantic detail. A busy patterned background will light up as much as your subject's face. If you want the effect only on a specific subject, gate it with an external mask on the affine node instead.
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.
Common issues
At small content_window values the mask can get noisy and flickery, responding to single-pixel variance; at large values it gets mushy and stops being "detail" at all. The default 7 is a decent middle. And since this pattern needs the latent to compute from, it's excluded from the noise-generation context (Affine Pattern Noise) - it's strictly a mask pattern, so don't go hunting for it there. As ever, an unconnected DICT does nothing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| content_window | INT | 73–63 | Odd kernel size for local variance used in detail regions. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| noise_options | DICT | — |