Nodes/ComfyUI Extended/Liquify Image
ComfyUI Node

Liquify Image

Push, bulge, shrink, or twirl your image — a mini Photoshop Liquify

By rookiepsi·Created about a year ago·Updated 11 months ago· 9
Liquify Image
  • image
  • mask
  • IMAGE
x_coord0
y_coord0
strength0.50
effect_typepush
shape_typecircle
radius_major100
radius_minor100
push_direction_x0.00
push_direction_y0.00

Ever generated an image and thought "if that jawline were just a little narrower, this would be perfect"? Image Liquify is the node that does that inside ComfyUI - no round-trip to Photoshop. Pick a center point, pick an effect (push, expand, shrink, twirl), and it warps the pixels around that point. Added in the pack's 1.2.0 release, it's the flashiest thing in ComfyUI Extended.

It works the way a real Liquify tool does, but parameterized: you tell it where, what shape the region is, and how strong, and it remaps the image. Good for small corrective tweaks on faces or figures. Not a tool for large, structural changes - push it too far and you get obvious warping.

Inputs that matter

  • x_coord / y_coord (INT, −8192 to 8192) - the center of the effect.
  • strength (FLOAT, 0–10, default 0.5) - intensity. You'll live in the 0.1–1 range for believable edits; higher is for obvious warps.
  • effect_type - push (move pixels in a direction), expand (bulge outward like a lens), shrink (pull inward), twirl (rotate around the center).
  • mask (optional MASK) - supply one and the node switches to mask mode: it uses the mask's centroid as the center and the mask's own values as the falloff, instead of a fixed radius. That's how you liquify exactly a shape you already segmented.
  • shape_type / radius_major / radius_minor - the falloff region: circle, oval, or rectangle.
  • push_direction_x / push_direction_y (FLOAT, −1 to 1) - only relevant for push; the direction the pixels get dragged.

How it works

It computes, per pixel, how far it is from the effect center, builds a falloff (1 at the center fading to 0 at the region edge), then constructs a displacement map for the chosen effect - push shifts pixels by direction × strength × falloff, expand moves them away from center, shrink toward it, twirl rotates them by an angle that fades out. Finally it resamples the image with grid_sample using bilinear interpolation. The math runs on the GPU, so it's fast and interactive enough to iterate.

Install

cd /path/to/your/ComfyUI/custom_nodes
git clone https://github.com/rookiepsi/comfyui-extended.git

Restart ComfyUI; it's under ComfyUI-Extended/Image. Or ComfyUI Manager → "ComfyUI Extended" → install → restart. Zero dependencies beyond torch (which ComfyUI already has).

Common issues

  • push with no direction does nothing. Both push directions default to 0. For push to visibly move pixels, set a nonzero push_direction_x and/or push_direction_y.
  • Only the first image in a batch is processed. The source code explicitly takes image[0]. If you feed a batch, only the first frame gets liquified.
  • Mask must match the image size. A mask at a different resolution is detected and ignored (with a console warning), and the node falls back to the radius-based region. Size your mask to the image.
  • Strength is permissive. Up to 10, but values above 1–2 look broken fast. Small, patient tweaks are the recipe.

The verdict: a fun, useful corrective tool with a real learning curve on the strength dial. For face and figure touch-ups it's genuinely handy; treat it as a fine-tune, not a re-render.

CategoryComfyUI-Extended/Image

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
x_coordINT0-8192–8192
y_coordINT0-8192–8192
strengthFLOAT0.500–10
effect_typeCOMBOpush4 options: push, expand, shrink, twirl
maskoptMASK
shape_typeoptCOMBOcircle3 options: circle, oval, rectangle
radius_majoroptINT1001–2048
radius_minoroptINT1001–2048
push_direction_xoptFLOAT0.00-1–1
push_direction_yoptFLOAT0.00-1–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE