DJZ Tiling
Grab a tiling mask without drawing it — xy, x, or y gradients on demand
- image
- MASK
Seamless textures are a pain for a boring reason: when you tile an image, the edges don't match, and the seam shows. The standard fix is a feathered mask - fade the center of the tile in, fade the edges out, and blend. djzTiling is the "give me that mask" node. Feed it an image, pick xy, x, or y, and it hands back a gradient mask sized to your image. Nothing fancy, but it's the piece everyone ends up rebuilding by hand.
Why you'd reach for it
Any workflow that touches tileability. Generate a texture, use this mask to blend overlapping copies so the pattern wraps cleanly, and you've got an infinitely tileable texture without an hour of Photoshop feathering. It's also handy for circular-feather masks in compositing, and for feeding masked regions into an inpaint or a seamless-patch pipeline.
The concept is the same one behind "make it tileable" tricks in the KB's tiling discussion - the mask is the seam-smoothing device. This node just replaces the hand-drawn version with a deterministic gradient.
How it works
V1 is deliberately simple: it loads a pre-made gradient mask from a tilingpresets/ folder next to the node (circular gradient from center for xy, horizontal gradient for x, vertical for y), resizes it to your input image's dimensions, and returns it as a MASK. On first run it auto-creates those preset PNGs if the folder is empty. That's the whole job.
If the preset file is missing it regenerates the defaults, so you can't brick it by deleting a file.
The input that matters
- image - your input. It's only used for dimensions; the mask is resized to match.
- tiling_mode -
xy(radial falloff from center - the one you want for seamless tiles),x(falloff left/right only), ory(falloff top/bottom only). The last two are for one-axis tiling or directional blends.
Output
A single MASK, in the usual ComfyUI mask format, ready for any node that takes a mask input - blend nodes, compositors, inpaint masking, conditioning masks.
Installing it
It's part of DJZ-Nodes, so it installs with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Or ComfyUI Manager → search "DJZ-Nodes" → install. No models, no extra downloads - just PIL.
Troubleshooting
- The mask doesn't match your image. If your image isn't square, the
xygradient gets stretched to fit, so the falloff will be elliptical, not circular. That's expected behavior - account for it or resize to square first. - You want your own mask shape. Drop a custom grayscale PNG named
xy.png,x.png, ory.pngintoDJZ-Nodes/tilingpresets/and this node will load yours instead. White = full strength, black = nothing. - It returns an all-black mask. That's the fail-safe when the preset can't be loaded. Check the console for the error line it prints.
- If you want control over the feather curve, inner radius, or an inverted version, skip to djzTilingV2 - it generates the same masks procedurally with all those knobs and no preset files at all.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| tiling_mode | COMBO | 3 options: xy, x, y |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |