ComfyUI Node
CV Displacement Map
Shifts each coordinate by the brightness of a displacement image: offset = (gray - 0.5) * 2 * strength, so mid-gray moves nothing, white pulls from +strength pixels away and black from -strength. Feed a blurred mask, noise, a depth map or the image's own luminance (glass/heat-haze refraction). The displacement image is converted to grayscale and resized to the map size automatically.
CV Displacement Map
- map_x
- map_y
- displacement
- map_x
- map_y
◄strength_x16.0►
◄strength_y16.0►
Categoryimage/CV/remap
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| map_x | NPARRAY | Incoming source-x coordinate map to distort. Start the chain with 'CV Identity Map'; further remap nodes compose onto it. | |
| map_y | NPARRAY | Incoming source-y coordinate map (must share map_x's shape - both come from the same chain). | |
| displacement | NPARRAY,IMAGE,MASK | Gray or color image; uint8/uint16 are scaled to 0-1, float is used as-is. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| strength_x | FLOAT | 16.0-10000–10000 | Maximum horizontal shift in pixels (negative inverts the direction). |
| strength_y | FLOAT | 16.0-10000–10000 | Maximum vertical shift in pixels (negative inverts the direction). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| map_x | NPARRAY | — |
| map_y | NPARRAY | — |