Image Mesh Drag
Warp an Image by Dragging an Invisible Mesh
- image
- image
Image Mesh Drag is a random, seeded liquify. It lays a coarse mesh over your image, grabs a handful of control vertices, drags them in random directions, and interpolates the sparse drags into a smooth displacement field that warps the whole picture. There's no sampler, no model, no physics - it's a pure spatial warp, which makes it fast, deterministic per seed, and shockingly good at cloth-like and glass-like distortion for a node with zero knobs on the surface.
The mechanism: points control vertices get picked on the mesh, each dragged by a random distance between drag_min and drag_max in a direction given by direction (degrees, where -1 means random). The sparse drags are interpolated into a full displacement field with displacement_interpolation - bilinear, bicubic, nearest, or bspline, where bspline gives the smoother, more organic warps (and uses spline_passes to control how many smoothing passes run). Finally, the image is resampled through that field with sampling_interpolation. The one unusual control is stroke_width: when > 0, it limits the warp to narrow brush-stroke channels aligned with the drag direction, one per dragged point - which reads like directional wind streaks or cloth folds instead of a general wobble.
The inputs that matter on a first run:
points- how many vertices get dragged. More = busier distortion.drag_min/drag_max- displacement in image pixels. This is your intensity dial; on a 1024 image, max drags in the tens of pixels are plenty.direction- lock it to make a consistent push (90 = everything drifts right), or leave at -1 for chaos.displacement_interpolation- setbsplinefor the pretty, smooth warps; the defaultbicubicis fine too.
It takes an IMAGE and returns an IMAGE of the same shape. There's no mix slider and no mask socket on this node - it's all-or-nothing, so plan accordingly. (The latent sibling, Latent Mesh Drag, does take a mask if you need localization and are willing to work pre-decode.)
Where it fits
Use it when you want believable, continuous deformation rather than noise-based texture: rippling fabric, water surface wobble, heat-haze shimmer. Because it's seeded, you can generate a batch of warps from one image for augmentation or animation. Pair it with an img2img pass at low denoise and the model will happily reinterpret your warp as real motion blur or fabric movement.
Installing
Part of the Skoogeer-Noise pack by ttulttul:
cd ComfyUI/custom_nodes
git clone https://github.com/ttulttul/Skoogeer-Noise
Restart ComfyUI, or install via ComfyUI Manager ("Skoogeer-Noise"). Dependencies are torch/numpy/einops/pyyaml - nothing to download, no models involved.
Gotchas
The two things that trip people up: dragging distances are in image pixels, so if you're coming from the latent node's defaults you'll under-drag by an order of magnitude (the latent variant defaults to 4 latent pixels ≈ 32 image pixels, and this node defaults drag_max to 32 for the same reason). And with direction = -1 and high points, the result can turn into full scramble - if you want something readable, drop points to 4–8 and fix a direction. Keep the install folder named Skoogeer-Noise, since the module path custom_nodes.Skoogeer-Noise is sensitive to renames.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image to warp spatially using a random mesh drag. | |
| seed | INT | 00–18446744073709550000 | Seed controlling which mesh points are dragged and by how much. |
| points | INT | 120–4096 | Number of mesh vertices to randomly drag. |
| drag_min | FLOAT | 00–4096 | Minimum drag distance (image pixels). |
| drag_max | FLOAT | 320–4096 | Maximum drag distance (image pixels). |
| direction | FLOAT | -1-1–360 | Drag direction in degrees (0=up, 90=right, 180=down, 270=left). Set to -1 to allow random directions. |
| stroke_width | FLOAT | -1-1–16384 | When >0, limits the warp to narrow brush-stroke channels aligned with the direction (one per dragged mesh point; stroke centers are jittered when direction is fixed). Units are image pixels. Set to -1 to disable. |
| displacement_interpolationopt | COMBO | bicubic | How to interpolate the sparse mesh drags into a full displacement field. Use 'bspline' for smoother, more organic warps. |
| spline_passesopt | INT | 20–16 | Only used when displacement_interpolation = 'bspline'. More passes = smoother warp. |
| sampling_interpolationopt | COMBO | bilinear | How to sample the source image when applying the warp (bilinear/bicubic/nearest). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |