ComfyUI Node

TBG Hex Cone Mask

A hex-pattern mask for uneven, organic denoise during upscaling

By Ltamann·Created about a year ago·Updated 7 months ago· 20
TBG Hex Cone Mask
    • IMAGE
    • MASK
    width1024
    height1024
    hex_radius32
    outer_fraction0.50
    inner_fraction0.10
    curve_power0.35

    Most denoise-mask generators give you a smooth gradient or a blob, which is fine until you want something that doesn't look like a soft vignette. This node generates a hexagonal cone pattern: a grid of hexagons, each with a cone-shaped gradient from full denoise at its center to no denoise at its edges. Wire that into a denoise-mask-capable sampler during an upscale pass and you get a repeating, organic, non-uniform enhancement pattern instead of a single-direction falloff.

    It's from the same family as the pack's ETUR upscaler work, and the use case is exactly that: variable-denoise refinement where you don't want the whole image hit equally, and where a repeated honeycomb pattern distributes the detail work more evenly than one giant radial gradient. The math (in the source) tiles the canvas with hexagon centers, and for each one computes the normalized distance between an inner radius and an outer radius, applies t ** curve_power for the falloff, and takes the minimum across overlapping hexagons - so the pattern tiles seamlessly.

    The inputs (all of them matter)

    • width / height - output size, defaults 1024×1024, up to 8096. Match these to your latent/upscale target.
    • hex_radius - the radius of each hexagon in pixels (4–128, default 32). Smaller = finer, denser pattern.
    • inner_fraction / outer_fraction - where the gradient starts and ends, as fractions of the hexagon radius. inner_fraction (default 0.1) is the fully-denoised core zone; outer_fraction (default 0.5) is where the gradient reaches zero denoise. The gap between them is the transition band.
    • curve_power - gradient steepness, 0.1–1 (default 0.35). Lower = softer falloff; higher = crisper hexagon edges.

    Two outputs: IMAGE (the grayscale pattern as a viewable preview) and MASK (the actual 0–1 mask for denoise control). The mask is what goes into your sampler's denoise-mask input; the image is there so you can see what you're making without a separate preview node.

    Install

    Manager → search TBG Takeaways → install, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Ltamann/ComfyUI-TBG-Takeaways
    

    Under TBG/Takeaways after restart. No deps, no downloads.

    Honest framing: this is a niche, purpose-built pattern generator - you'll know in one glance at the preview whether honeycomb is your aesthetic. It's genuinely useful if you're experimenting with variable-denoise upscaling and want a pattern with even spatial distribution (hexagons pack tighter than squares), and the dual IMAGE/MASK outputs make it pleasant to work with. But if your upscale pipeline just uses a single denoise value, you don't need it. Treat it as a creative tool for the denoise-mask experiments, not a workflow staple.

    CategoryTBG/Takeaways

    Inputs (6)

    NameTypeDefaultDescription
    widthINT10240–8096
    heightINT10240–8096
    hex_radiusINT324–128
    outer_fractionFLOAT0.500.2–1
    inner_fractionFLOAT0.100.01–0.4
    curve_powerFLOAT0.350.1–1

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK