Field Warp
Melt, Smear and Drag Your Masks Around
- field
- warp_source
- mask
The pack's one node where pixels move
Everything else in ComfyUI-Field generates or reshapes values in place. Field Warp displaces a mask: it's a pull-back warp, so the output mask samples the input at shifted positions. That makes it the node for melting an edge, dragging a mask along a gradient, breaking up a shape's boundary so it stops looking like a vector, or smearing a region in the direction of another field.
It's also the node where the pack's resolution-independence promise gets a caveat, and the author says so up front rather than letting you discover it.
Three modes
directional is the simple one: displace along a fixed angle by amount times the drive value. angle is in degrees with 0 pointing screen-right and positive rotating clockwise on screen - so it's the opposite handedness from the rotation widgets on the generators, which are counter-clockwise. Worth internalising before you spend five minutes on a mask that's smearing the wrong way.
vector follows the smoothed drive's slope - the local direction of the field's gradient - and normalises the magnitude against the frame maximum, so amount means the same thing on any drive. This is the mode that makes a mask flow along the contours of another field.
slope_blur iterates the smear: samples steps (1 to 32), with slope_mode deciding whether each step takes the max (dilate), min (erode) or mean. It's the mode for pushing an edge outward repeatedly, or for a directional blur of the mask.
Self-warp is the default, and it's the useful one
warp_source is optional. Leave it unwired and the field drives itself - the mask's own values supply the displacement - which is how you get a mask that melts along its own edges. That's the look people usually want from a node called "warp": organic, self-similar distortion, no second input needed. Wire a separate field in and you're steering the warp, which is how you get a mask that follows noise, or the slope of an edge map, or a gradient ramp.
Widgets: field, mode, amount (default 0.05, range 0 to 0.5), angle, smooth (vector and slope_blur only - a Gaussian pre-smooth with sigma = smooth × S, and 0 means use the raw drive), samples, slope_mode. Optional warp_source. Output: mask.
amount is in S-units, a fraction of max(H, W). And amount = 0 returns the input bitwise, which is a genuinely useful property - it means you can park the node in a chain at defaults and it costs you nothing until you turn it up.
Install
ComfyUI Manager → search ComfyUI Field, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jeremieLouvaert/ComfyUI-Field
Restart. No downloads, no additional packages. Category is AKURATE/Fields/Reshape.
The limits, stated honestly
This warps the rendered mask, not the coordinates, so the result is resolution-approximate rather than bitwise across sizes. The generators in this pack have a bitwise cross-resolution invariant; a warp can't, because it's resampling pixels. Coordinate-space domain warping - warping the noise before it's evaluated, the way a shader would, which would keep the invariant - is deliberately not in the pack yet. If you need that exactness, generate the field at final resolution instead of warping a small one up.
slope_mode: mean is a one-sided path average, not a blur. The tooltip is unusually blunt about it: it translates your mask by roughly amount × S × drive / 2 pixels. It is not a symmetric blur, and if you're using it as one you'll keep wondering why everything drifts. Use max and min for dilation and erosion; use the feather operation in Field Morphology if you actually want a symmetric soft edge.
And smooth is only live in vector and slope_blur. In directional it does nothing, because there's no drive field to smooth.
How it fits
The classic chain: Field Shape or Field Noise → Field Warp → Field Threshold. The warp breaks the geometry's regularity, the threshold re-hardens it, and you get a shape that doesn't look like a filled polygon. Or warp an edge field before compositing so the transition doesn't follow the contours exactly - slightly off-register edges read as more natural than perfect ones.
It's the pack's most fiddly node, and the one most people will get wrong on the first try because the amount is subtle until it isn't. Start at 0.02 and go up.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| field | MASK | The mask being warped (the pull-back reference; output size matches this) | |
| mode | COMBO | directional | directional: fixed angle, amount*drive. vector: direction+magnitude from the smoothed drive's slope, frame-max normalised. slope_blur: iterated smear along the slope |
| amount | FLOAT | 0.0500–0.5 | Displacement, S-units (fraction of max(H,W)). 0 is a bitwise no-op |
| angle | FLOAT | 0-360–360 | directional only. 0 = screen right; positive rotates clockwise on screen |
| smooth | FLOAT | 0.0050–0.05 | vector, slope_blur only. Gaussian pre-smooth sigma = smooth*S. 0 = no smoothing, the raw drive |
| samples | INT | 81–32 | slope_blur only. Iteration count, bounded 1..32 |
| slope_mode | COMBO | max | slope_blur only. max: smear/dilate. min: erode. mean: a ONE-SIDED path average -- this TRANSLATES the mask by ~amount*S*drive/2 px, it is not a symmetric blur |
| warp_sourceopt | MASK | Drives the warp. Absent -> field drives itself (self-warp). This warps the rendered mask, not the coordinates; the result is resolution-approximate. Coordinate-space domain warping is not in this pack yet |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |