Nodes/MKRShift_Nodes/Texture Detile Blend
ComfyUI Node

Texture Detile Blend

Detile Blend breaks the tile up

By criskb·Created 7 months ago·Updated 5 months ago· 0
Texture Detile Blend
  • image
  • mask
  • image
  • mask
  • detile_info
settings_json{"macro_scale_px":196.0,"blend_strength":0.55,"color_match_blur":20.0,"detail_preserve":0.72,"variation_breakup":0.22,"seed":101,"mask_feather":8.0,"invert_mask":false}

Every tileable texture eventually betrays itself: tile it across a wall and your eye locks onto the repeating macro-pattern - the same big leaf, the same cloud, the same vein of marble, over and over like wallpaper. That's the "detiling" problem, and it's different from fixing the edge seam (that's just making it tile). x1TextureDetileBlend attacks the repetition: it blends a macro-scale variation over the tile at a different frequency than the source, so the big repeats get broken up while the fine detail - and the seamlessness - survive. It's one of the few MKRShift nodes that does something no stock ComfyUI filter does.

How it works

The idea is to overlay a second, larger-scale pattern that doesn't line up with the tile's repeat. macro_scale_px (196px) sets the size of that variation layer - bigger than the tile's dominant features, so it spans across repeat boundaries and breaks the eye's lock on the original pattern. blend_strength (0.55) is how hard that macro variation is mixed over the base; too low and the repeats still show, too high and the texture turns to mush.

The two knobs that keep it honest are color_match_blur (20px) and detail_preserve (0.72). color_match_blur blurs the variation layer before blending so it matches the source's local color rather than slapping a different-colored blob on top - that's what keeps the result looking like the same material. detail_preserve re-injects the fine surface detail the blend would flatten, so the texture doesn't lose its crispness. variation_breakup (0.22) adds noise to the variation layer so the overlay itself doesn't look like a clean pattern, and seed rerolls it - the knob you'll turn while hunting for the blend that hides the repeats best.

The inputs that matter

Settings live in a settings_json string, prefilled:

  • macro_scale_px (196) - size of the variation layer. The main "kill the repeat" control.
  • blend_strength (0.55) - how much variation to mix in.
  • color_match_blur (20) - keep it matching the source's color.
  • detail_preserve (0.72) - keep the fine detail.
  • variation_breakup (0.22) - organic-ness of the overlay.
  • seed (101) - reroll. The "does this one hide it better?" knob.

Optional mask restricts the effect. Outputs are image, mask, and detile_info.

Installing it

Part of the MKRShift Nodes pack. ComfyUI Manager: search "MKRShift", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart after. No models - this is numpy blending, runs on CPU.

Gotchas

Set macro_scale_px relative to the tile size in the render, not the texture file. If you tile a 1024 texture across a 20-foot wall, the repeating feature is huge in world space, and a 196px macro layer won't span it - you need a macro scale that reaches across several tile repeats. And there's an honest limit: detiling reduces the texture's perceived structure. If you find yourself at blend_strength near 1.0 to hide repeats, you're sanding the material down - better to regenerate the texture with more variation (or blend two sources) than to push this node to the edge. When it works, it works beautifully; it's the difference between "tiled wallpaper" and "a wall."

CategoryMKRShift Nodes/Surface/Texture

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"macro_scale_px":196.0,"blend_strength":0.55,"color_match_blur":20.0,"detail_preserve":0.72,"variation_breakup":0.22,"seed":101,"mask_feather":8.0,"invert_mask":false}
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
detile_infoSTRING