Warp Displace
Displacement warping that's actually controllable
- image
- direction_map
- strength_map
- mask
- image
- mask
- warp_displace_info
Warping is one of those VFX operations people think they'll never need until the day they do - rippling a reflection, heat-haze over a background, breathing life into a static texture, or just ruining something on purpose for a stylized pass. Warp Displace is the node that does it with real control: a base displacement direction, a noise field for organic wobble, and optional maps so you can drive both direction and strength with your data instead of the node's. That last bit is what separates it from a dumb "wobble filter."
How it works
The core is a pixel displacement pass: every pixel moves by an offset derived from a flow field, sampled and re-sampled so the result is a remap, not a smudge. displace_strength is how far pixels move (in pixels), base_direction is the primary flow angle, and noise_scale + noise_mix blend in a seamless noise field so the displacement wanders organically - that's what keeps it from looking like a linear shear. seed controls the noise.
The power move is the two optional inputs. direction_map (an IMAGE) overrides the flow direction per-pixel - feed it a normal map or a flow texture and the warp follows that structure instead of the uniform base. strength_map (a MASK) scales displacement per-pixel, so you can warp the background but leave the subject untouched. That combination - external direction and external strength - is what makes this useful for real comp work rather than just a party trick. Optional mask restricts the effect region, with the usual mask_feather/invert_mask.
The inputs that matter
displace_strength- how far things move (12 px default)noise_scale/noise_mix- the organic wobbledirection_map- drive direction from an external flow/normal imagestrength_map- protect regions by scaling displacement with a mask
Outputs: image, mask, and warp_displace_info with resolved settings.
Installing it
Ships in MKRShift Nodes from criskb. ComfyUI Manager → "MKRShift Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI; it's under MKRShift Nodes → VFX → Distortion. No models or extra deps - numpy/Pillow/torch.
Common gotchas
The pack has no community footprint yet, so trust the code. Standard MKRShift JSON traps: malformed settings_json silently reverts to defaults; out-of-range values clamp. Two practical notes. First, displacement is resolution-dependent in feel - the same displace_strength is subtler on a 2048 image than a 512, so don't copy settings between resolutions and expect identical results. Second, the direction/strength maps are the feature most people skip because they're optional - but they're also the difference between "a wobble" and "a controlled warp," so if the node feels useless to you, that's usually because you haven't wired a strength_map yet.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| settings_json | STRING | {"displace_strength":12.0,"base_direction":0.0,"noise_scale":64.0,"noise_mix":0.35,"seed":321,"mask_feather":12.0,"invert_mask":false} | — |
| direction_mapopt | IMAGE | — | |
| strength_mapopt | MASK | — | |
| maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| warp_displace_info | STRING | — |