ComfyUI Node

Displace Logo

Warp a flat logo onto a bumpy surface in one node

By risunobushi·Created 2 years ago·Updated 2 years ago· 3
Displace Logo
  • logo
  • displacement_map
  • displaced_logo
scale1.0

This is the payoff node of the pack. The other one, ExtractDisplacementMap, builds a height field; this one uses it to bend a flat image - a logo, a label, a decal - around whatever that field represents. Want a brand name following the wrinkles of a jacket or the curve of a can instead of just sitting on top of it like a sticker? This is the node. Two inputs in, one warped image out, zero models involved.

How it works

Displacement warping is a classic technique, and this is a minimal, readable implementation of it. The node first resizes your displacement map to match the logo's dimensions (bilinear), then multiplies it by scale. It builds a pixel grid and pushes every pixel sideways: new_x = x + displacement * (width/height) and new_y = y + displacement, then samples the logo with grid_sample in bilinear mode and border padding. Practically: pixels sitting on bright parts of the map get shoved down-and-right, dark parts get pulled up-and-left, and the edges stretch instead of wrapping into noise.

Keep your expectations calibrated: this is a rubber-sheet warp, not a 3D projection. Both axes are pushed by the same height value, so the result reads as relief or emboss - it makes the logo ride the surface, but it won't shade, shadow, or blend it in. Making it look genuinely printed-on is your job afterward: multiply or overlay the warped logo over the surface, maybe with a soft mask at the edges. The author's README says the goal is "placing logos on non flat stuff," and that's exactly the level of fidelity it delivers - which, for the price of free, is the right trade.

The inputs that matter

  • logo (IMAGE) - the flat image you want warped.
  • displacement_map (IMAGE) - the height field, typically straight out of ExtractDisplacementMap.
  • scale (FLOAT, default 1, range 0.1–10, step 0.1) - the one knob you'll actually turn. Too low and the logo sits there smugly flat; too high and it tears.
  • displaced_logo (IMAGE) - the output. Wire it into a compositing step (blend/multiply over your surface image).

A complete two-node workflow: normal map → ExtractDisplacementMap → DisplaceLogo → blend. That's the entire pack, and it's the entire point.

Install

Standard custom-node install. ComfyUI Manager, search ComfyUI_DisplacementMapTools, or:

cd ComfyUI/custom_nodes
git clone https://github.com/risunobushi/ComfyUI_DisplacementMapTools

Restart ComfyUI. There's nothing to download beyond the code - the requirements file lists torch, torchvision, numpy, and Pillow, which any ComfyUI install already has. No model files, no API keys.

Where people get burned

Most common failure: nothing moves. If the output looks identical to the input, your displacement map is flat - a uniform gray field displaces everything by the same amount, so the logo just shifts instead of warping. Check the map has actual variation before blaming the node. Next: tearing. If the logo shreds at the edges or the design breaks apart, lower scale - this warp is aggressive, and values over 2 on a busy map will wreck text. One real quirk worth knowing: like its sibling, this node only looks at the first frame of each input batch, so a multi-frame stack gets only frame one processed. And because the map is resized to the logo's dimensions, feeding it a wildly different-resolution map is fine - the warp just inherits that map's detail density. Small, single-maintainer pack, no update fanfare, but it's been quietly doing exactly what it says for a niche nobody else bothered to fill.

Categoryimage/processing

Inputs (3)

NameTypeDefaultDescription
logoIMAGE
displacement_mapIMAGE
scaleFLOAT1.00.1–10

Outputs (1)

NameTypeDescription
displaced_logoIMAGE