Nodes/DJZ-Nodes/DJZ Tiling V2
ComfyUI Node

DJZ Tiling V2

A feathered mask for seamless tiles, made without a single brushstroke

By MushroomFleet·Created 2 years ago·Updated 5 months ago· 80
DJZ Tiling V2
  • image
  • mask
  • preview
tiling_mode
feathering_strength1.0
feathering_curve
invert_maskfalse
inner_radius_percent50
preview_maskfalse

DJZ Tiling V2 doesn't tile your image. It makes the mask that makes tiling work - a soft-edged, seamless gradient mask you feed into an inpainting or compositing step. If you've ever tried to generate a seamless texture and watched the edges refuse to match, this is the node that builds the "forget the edges, blend them away" condition for you. It's a utility, and it's one of the more quietly useful things in the DJZ pack.

What it outputs

Two outputs:

  • mask (MASK) - a radial (or directional) gradient, feathered from full strength in the middle out to zero at the edges. This is what you wire into your inpaint/composite node.
  • preview (IMAGE) - with preview_mask on, a visual RGB version of the mask so you can actually see what you generated; with it off, the preview is just your input image.

The mask is centered on the image and strength falls off toward the borders. The idea: content near the center is "real," content near the edges gets feathered to nothing, and when you tile the result the seam lands in the faded region where nothing has to match. That's the entire trick of seamless generation.

Inputs that matter

  • tiling_mode - xy (radial, fade in both directions), x (horizontal fade only), or y (vertical only). Choose based on which axis you're tiling along; for a normal texture tile you want xy.
  • inner_radius_percent (default 50) - how much of the center stays at full strength before the feather starts. Lower it and the fade begins closer to the middle; raise it toward 100 and the mask gets hard-edged and small.
  • feathering_strength (default 1) and feathering_curve (linear/exponential/sinusoidal/quadratic) - the shape and aggression of the falloff. Exponential gives a sharp transition at the edges; sinusoidal is smoother. If the seam is visible, start by softening these.
  • invert_mask - flips which side is "keep." Handy when your downstream node expects the mask inverted.

How it works

Under the hood it's a per-pixel loop: distance from center is computed per tiling mode, normalized, run through your chosen feathering curve, and written into a float mask. That means it's correct but not fast - at large resolutions that Python loop over every pixel takes a second or three, so don't expect instant feedback on 4K inputs. It also means the result is fully deterministic; same inputs, same mask, no seed.

The honest take

V2 is a compute-on-the-fly replacement for hand-painting fade masks in an image editor, and for tiling workflows that's a real convenience. The original djzTiling in the same pack did much the same job; V2's additions are the curve choice, the invert option, and the preview. If your pipeline already generates seamless tiles a different way - say with a post-process that wraps the image - you may not need it. But if you're doing texture generation with an inpaint pass and the seams keep showing, this gives you a properly feathered mask in seconds instead of wrestling with a gradient tool.

One practical note: because it outputs a MASK, wire it into nodes that accept masks (Set Latent Noise Mask for inpaint, or a composite that honors an alpha/mask input) - don't try to plug a MASK straight into an IMAGE slot and expect it to work.

Categoryimage/masking

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
tiling_modeCOMBO3 options: xy, x, y
feathering_strengthFLOAT1.00.1–5
feathering_curveCOMBO4 options: linear, exponential, sinusoidal, quadratic
invert_maskBOOLEANfalse
inner_radius_percentFLOAT501–100
preview_maskBOOLEANfalse

Outputs (2)

NameTypeDescription
maskMASK
previewIMAGE