Masks & Detail Conservation — constraining generative freedom locally
This part of the showcase exposes mask/preprocess/detail branches. It connects two fundamental skills: a mask defines WHERE an operation may act, while detail conservation defines WHAT source information should be restored or preserved after a generative pass.
The master graph creates masks in more than one way
| Mask system | Source | Purpose |
|---|---|---|
| RGB/ID masks | 338 → 337 | Prepared regions encoded by color |
| PEOPLE semantic mask | 550 → 114 → 115 → 144 → 146 | Segment people for PPL processing |
| Architectural detail mask | 580 → 584 → 585 | Building/facade region for conservation/composite |
A mask is not a picture for display — it is a spatial instruction
When you encounter a MASK, first determine what white/foreground means and which operation it constrains: crop, composite, inpaint, detail transfer or another local process.
Detection and segmentation are different stages
Detail conservation is a controlled return of source information
Node 565 transfers selected source detail into the SDXL result, and 573 performs a similar controlled transfer before the main FLUX encode. Both receive shared strength from node 720.
The purpose is not to “sharpen everything.” The workflow uses a mask to restore important architectural detail only where it is needed.
The mask must share coordinate space with the image it controls
If detection ran on a resized image but the local operation receives another canvas, the mask can shift or scale incorrectly. Treat source image, resize policy, bbox coordinates and mask dimensions as one contract.
Debug the mask pipeline separately from generation
- Preview the source image.
- Preview detection / bbox when available.
- Preview the raw segmentation mask.
- Preview the mask after grow/blur.
- Verify polarity: what is foreground?
- Verify dimensions / coordinate space.
- Verify the local composite/detail result before the main sampler.
Exercise: describe every mask as “WHERE + WHAT OPERATION”
Choose three masks in the Hansen workflow and state two things for each: which spatial region it describes and which downstream operation it constrains. If the answer is only “this is the building mask,” it is incomplete.
When the 07:38 lesson is complete
You can distinguish a prepared ID mask, a semantic segmentation mask and a detail-conservation mask; you understand that a mask does not improve anything by itself — it constrains the next operation spatially.