Nodes/Akatz Seamless Tiling/Make Depthmap Seamless Advanced
ComfyUI Node

Make Depthmap Seamless Advanced

Kill the seam in your depth maps, not just the color image

By akatz-ai·Created 3 months ago·Updated 2 months ago· 2
Make Depthmap Seamless Advanced
  • depthmap_batch
  • IMAGE
strength1.00
seam_axis
normalize

If you're generating seamless textures the serious way, you're not just matching the color - you're feeding a seamless depth map into a ControlNet so the tiled geometry stays consistent. Here's the problem: a normal depth estimator sees one frame at a time. Its edges don't line up, and when you tile the result you get an ugly step - the 3D height field suddenly jumps at the border. Make Depthmap Seamless Advanced removes that discontinuity in the depth map itself, so the geometry tiles as cleanly as the color does.

This is the "textures for 3D" side of seamless tiling, and it matters more than it looks. In a texture workflow the depth map often does double duty: it guides generation through ControlNet, and it's also the displacement/height map you'll actually use in Blender or a game engine. A seam in that map is a seam in the mesh. Fixing the depth is not a nice-to-have; it's the difference between a tile that renders and a tile that visibly breaks.

How it works

The node runs a periodic-plus-smooth decomposition, which sounds fancier than it is. Think of it as: measure the mismatch between the left/right and top/bottom edges of the depth map, then spread that mismatch across the whole image as a smooth gradient and subtract it. What's left is a depth map whose opposite edges agree exactly - periodic, tileable, with the geometry preserved. The heavy lifting is done in the frequency domain with an FFT, so it's fast and stable.

The Advanced version's extra controls are what make it worth having:

  • strength (0–1, default 1) blends between your original depth map and the fully corrected one. At 1.0 the seam is gone entirely; lower values keep more of the original detail at the cost of a partially visible seam. If the correction flattens detail you care about, back this off rather than abandoning the node.
  • seam_axis - both axes, left/right only, or top/bottom only. If your texture only needs to wrap horizontally (a panorama), you don't have to pay the correction cost on the vertical axis.
  • normalize - what to do with the values after correction. clip to 0-1 just clamps; frame min/max rescales each frame; batch min/max rescales the whole batch together; none leaves the math as-is. For a batch of frames you intend to use as consistent geometry, batch min/max keeps the relative depth between frames honest - the option you'll usually want.

Input is a depthmap_batch (IMAGE) - anything a depth estimator emits, whether that's Depth Anything v2, Marigold, or a Depthflow node. Output is the corrected IMAGE, same shape, ready to feed a ControlNet apply node or a displacement map consumer.

Install

Part of the Akatz Seamless Tiling pack, so the steps are the family standard:

cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/Akatz-Seamless-Tiling

Restart ComfyUI, or use ComfyUI Manager and search "Akatz Seamless Tiling". The pack itself only needs numpy and opencv-python-headless. Note the README's honest caveat: workflows that use the depth nodes often also want ComfyUI Depthflow Nodes and ComfyUI DepthAnythingV2 - those are separate installs, not part of this pack.

Troubleshooting

  • The depth map looks flat after correction - strength is too high for a busy map, or normalize clipped everything. Try frame min/max and a strength around 0.7–0.9.
  • Still a seam on one edge - check seam_axis. Fixing both axes when you only need one is harmless, but fixing the wrong axis entirely is not.
  • It's a depth map, not a photo - why should I care about seams? Because the seam is a height jump, and height jumps show up as hard lines in displacement and as ControlNet's way of warping geometry at the tile border. The color can be seamless and the geometry still broken. That's this node's whole reason to exist.
CategoryAkatz Seamless Tiling/Image

Inputs (4)

NameTypeDefaultDescription
depthmap_batchIMAGE
strengthFLOAT1.000–1
seam_axisCOMBO3 options: both axes, left/right only, top/bottom only
normalizeCOMBO4 options: clip to 0-1, none, frame min/max, batch min/max

Outputs (1)

NameTypeDescription
IMAGEIMAGE