ComfyUI Node
CV Vector Displacement Map
Adds a per-pixel 2-D (dx, dy) displacement from a multi-channel source to the coordinate maps - the key difference from the scalar 'DisplacementMap' (which drives both axes from the same grayscale). Connect a normal map (R=dx, G=dy), Sobel gradients, optical flow, or any multi-channel image to 'vector_field'; or wire individual dx/dy arrays directly. uint8 inputs are mapped to [-1, 1] so mid-gray = no displacement; float inputs are used as raw pixel-offset values. Designed for use with WARP_RELATIVE_MAP.
CV Vector Displacement Map
- map_x
- map_y
- vector_field
- dx
- dy
- map_x
- map_y
◄strength_x10.0►
◄strength_y10.0►
Categoryimage/CV/remap
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| map_x | NPARRAY | Incoming source-x coordinate map. Start the chain with 'CV Identity Map' or 'CV Relative Identity Map'. | |
| map_y | NPARRAY | Incoming source-y coordinate map (same shape as map_x). | |
| strength_x | FLOAT | 10.0-10000–10000 | Multiplier for the X displacement in pixels. |
| strength_y | FLOAT | 10.0-10000–10000 | Multiplier for the Y displacement in pixels. |
| vector_fieldopt | NPARRAY,IMAGE,MASK | Multi-channel displacement source: uses ch0 as dx, ch1 as dy. HxWx2 (direct vector field), HxWx3/4 (normal map: R->dx, G->dy), or HxW (same for both axes). uint8 mapped to [-1,1]; float 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. | |
| dxopt | NPARRAY | Per-pixel X displacement (overrides vector_field when connected). Single-channel HxW. | |
| dyopt | NPARRAY | Per-pixel Y displacement (overrides vector_field when connected). Single-channel HxW. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| map_x | NPARRAY | Displaced source-x coordinate map. |
| map_y | NPARRAY | Displaced source-y coordinate map. |