Nodes/Skoogeer-Noise/Image Mesh Drag
ComfyUI Node

Image Mesh Drag

Warp an Image by Dragging an Invisible Mesh

By ttulttul·Created 9 months ago·Updated 3 months ago· 14
Image Mesh Drag
  • image
  • image
seed0
points12
drag_min0
drag_max32
direction-1
stroke_width-1
displacement_interpolationbicubic
spline_passes2
sampling_interpolationbilinear

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 - set bspline for the pretty, smooth warps; the default bicubic is 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.

Categoryimage/perturb

Inputs (10)

NameTypeDefaultDescription
imageIMAGEImage to warp spatially using a random mesh drag.
seedINT00–18446744073709550000Seed controlling which mesh points are dragged and by how much.
pointsINT120–4096Number of mesh vertices to randomly drag.
drag_minFLOAT00–4096Minimum drag distance (image pixels).
drag_maxFLOAT320–4096Maximum drag distance (image pixels).
directionFLOAT-1-1–360Drag direction in degrees (0=up, 90=right, 180=down, 270=left). Set to -1 to allow random directions.
stroke_widthFLOAT-1-1–16384When >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_interpolationoptCOMBObicubicHow to interpolate the sparse mesh drags into a full displacement field. Use 'bspline' for smoother, more organic warps.
spline_passesoptINT20–16Only used when displacement_interpolation = 'bspline'. More passes = smoother warp.
sampling_interpolationoptCOMBObilinearHow to sample the source image when applying the warp (bilinear/bicubic/nearest).

Outputs (1)

NameTypeDescription
imageIMAGE