ComfyUI Node
Latent Mesh Drag
A ComfyUI node in latent/perturb with 11 inputs and 1 output.
Latent Mesh Drag
- latent
- mask
- latent
◄seed0►
◄points12►
◄drag_min0.0►
◄drag_max4.0►
◄direction-1►
◄stroke_width-1►
◄displacement_interpolationbicubic►
◄spline_passes2►
◄sampling_interpolationbilinear►
Categorylatent/perturb
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | Latent 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–2048 | Number of mesh vertices to randomly drag. |
| drag_min | FLOAT | 0.00–128 | Minimum drag distance (latent pixels). |
| drag_max | FLOAT | 4.00–128 | Maximum drag distance (latent 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–4096 | 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 latent pixels. Set to -1 to disable. |
| maskopt | MASK | Optional mask (often image-sized) to limit the warp to masked areas. The mask is resized to latent resolution (bicubic when downscaling). | |
| 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 tensor when applying the warp (bilinear/bicubic/nearest). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |