Nodes/LiamUtil/Preview Relief Image @Liam
ComfyUI Node

Preview Relief Image @Liam

Turn any image into an embossed bas-relief

By ai-liam·Created 2 years ago·Updated 2 years ago· 2
Preview Relief Image @Liam
  • image
  • IMAGE
emboss_depth60
light_angle135
light_intensity0.80
edge_threshold30

Feed this node an image and it comes out the other side looking like a carved stone relief or an embossed stamp - the classic "jade engraving" look where edges catch imaginary light and flat areas sink into shadow. It's an image filter, not a depth generator and not a preview in the ComfyUI sense: despite the name, it returns a full IMAGE tensor you can save, upscale, or feed onward. It's the kind of effect you reach for when you want a decorative, tactile look - logos, textures, title cards - or when you want to fake a depth-like surface from a flat image without running an actual depth model.

How it works

The pipeline is old-school computer vision, all in plain Python. It converts the image to grayscale, runs a Sobel edge detection on both axes, and zeroes out any edge magnitude below edge_threshold (kills faint noise, keeps real structure). Then it computes an illumination from a light direction (light_angle, in degrees) scaled by light_intensity, and combines edges + illumination + a base emboss_depth offset, clipped to a valid range. Bright edges facing the light pop; edges away from it recede. That's your relief.

The inputs that matter

  • emboss_depth (0–100, default 60) - the base height of the embossed surface. Higher = more pronounced raised look.
  • light_angle (0–360, default 135) - where the light comes from. 135° is the classic upper-left lighting; flip it to 45° and the relief inverts feel.
  • light_intensity (0–1, default 0.8) - how strong the directional highlight is.
  • edge_threshold (0–100, default 30) - how much edge strength counts as detail. Raise it to smooth out texture noise, lower it to keep fine lines.

Input is image; output is IMAGE (grayscale-looking, three channels).

Installing it

Part of LiamUtil:

cd ComfyUI/custom_nodes
git clone https://github.com/ai-liam/comfyui-liam
pip install -r requirements.txt

or ComfyUI Manager → LiamUtil → install → restart. Only dependency is opencv-python.

Where people get burned

Performance is the real surprise. The edge detection isn't vectorized - it's a hand-rolled convolution with nested Python loops over every pixel (the Sobel kernel, applied one pixel at a time). On a 1024×1024 image that's around a million iterations of 9 multiply-adds in pure Python, and it's noticeably slow - expect it to feel like a freeze on large images. Keep preview passes small and only run it at full resolution when you're ready to render. Second, the result is monochrome, so any color in your source is gone - design for the grayscale look up front. And the output image is not a real depth map; the lighting is directional and decorative, so don't feed it into ControlNet depth conditioning expecting usable geometry. For a decorative relief effect, though, the four knobs give you a surprising amount of control for a node this small.

CategoryLiam/Image

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
emboss_depthINT600–100
light_angleINT1350–360
light_intensityFLOAT0.800–1
edge_thresholdINT300–100

Outputs (1)

NameTypeDescription
IMAGEIMAGE