Whisker: Strip Mask Generator
Strip masks that tile the canvas exactly — for banded regional prompting
- mask_1
- mask_2
- mask_3
- mask_4
- mask_5
- mask_6
- mask_7
- mask_8
Split a canvas into horizontal or vertical bands and you usually get a seam somewhere - hand-computed strip sizes never quite sum to the container, or the rounding leaves a one-pixel gap that shows up as a hairline in the final composite. strip_masks is the node that makes that problem structurally impossible: it generates 2–8 strip masks that tile the container exactly, no gaps, no overlap, guaranteed.
That guarantee is the product. It's the natural tool for banded regional conditioning - sky band gets one prompt, midground another, ground a third - where each region needs a mask that precisely covers its strip and nothing else. It also works for slicing an image into strips for separate processing, or building masks for a vertical wipe transition. Whatever the use, you want the masks to cover the canvas perfectly, and this is the node that does the arithmetic for you.
How it works
You pick num_masks (2–8) and an orientation - horizontal bands run full-width with varying heights, vertical bands full-height with varying widths. One strip is sized explicitly via primary_mask_size at primary_mask_index; the rest split the remaining space evenly, with the rounding remainder distributed one pixel at a time so the sizes sum to the container exactly. No leftover pixels, ever.
Then the fun knob: noise_amount (with noise_scale for wavelength) displaces the interior boundaries with smooth 1D noise. The key detail is that all boundaries share the same noise vector, so the whole stack warps coherently like one bent bundle - edges don't cross or scramble, they just wobble together. noise_amount = 0 gives you perfectly straight cuts; a small value makes the bands look hand-drawn. blur applies a Gaussian to each output mask, and seed locks the noise.
The inputs that matter
num_masks- 2 to 8. Fewer is cleaner; more is where regional prompting gets interesting.primary_mask_index/primary_mask_size- one strip you size yourself (say, a fixed 256px sky band); everything else auto-fills. The index is 1-based, and it clamps tonum_masksif you overshoot.noise_amount/noise_scale- boundary wobble. Smallnoise_amount(5–20) reads as organic; anything big starts to look like badly warped signage.blur- feather each mask's edges. Blur before you composite the strips, not after, or you'll get overlap artifacts the node's exact-tiling promise was supposed to save you from.
The output trap
There are eight MASK outputs - mask_1 through mask_8 - and they're all always present. Slots beyond num_masks are zero masks. That's convenient for wiring (fixed outputs, no dynamic ports) but it's a trap if you forget: connect one of the zero masks into your pipeline and you've silently told a step to do nothing over part of the canvas. Wire exactly the masks you set, or you'll debug an invisible blank for an hour.
Installing it
Part of the Whisker pack:
cd ComfyUI/custom_nodes
git clone https://github.com/nerdywhiskers/ComfyUI-Whisker-Nodes.git
pip install -r ComfyUI-Whisker-Nodes/requirements.txt
or search "ComfyUI-Whisker-Nodes" in ComfyUI Manager and restart. Under Add Node → whisker-nodes. No models, no downloads - this one is numpy and Pillow, so it's instant on any setup.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102416–8192 | — |
| height | INT | 102416–8192 | — |
| num_masks | INT | 42–8 | — |
| orientation | COMBO | horizontal | 2 options: horizontal, vertical |
| primary_mask_index | INT | 11–8 | — |
| primary_mask_size | INT | 2561–8192 | — |
| noise_amount | FLOAT | 00–512 | — |
| noise_scale | FLOAT | 501–1024 | — |
| blur | FLOAT | 0.00–200 | — |
| seed | INT | 00–4294967295 | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| mask_1 | MASK | — |
| mask_2 | MASK | — |
| mask_3 | MASK | — |
| mask_4 | MASK | — |
| mask_5 | MASK | — |
| mask_6 | MASK | — |
| mask_7 | MASK | — |
| mask_8 | MASK | — |