ZML_图像形变-液化
Photoshop's liquify, without ever leaving the browser
- 图像
- 图像
Every once in a while you generate an image that's almost right, and what it needs isn't a new prompt - it needs a nudge. A chin pushed in, a sleeve pulled wider, a background stretched. That's liquify territory, and most people export to Photoshop to do it. ZML_ImageDeform (ZML_图像形变-液化) is the pack's answer: a liquify-style warp tool that runs right on the node, drag the control grid, run, done.
It's from ComfyUI-ZML-Image, zml-w's sprawling 160+ node utility pack. This one lives in the advanced-image-tools subcategory and its job is exactly one thing: bend pixels.
How it works
The node body has a canvas with a draggable control grid. You pull the grid points and the node's front-end serializes your warps into a JSON blob - which control points moved, what grid resolution, which mode - stored in the hidden deformation_data field. On execution the backend rebuilds a displacement map with SciPy's griddata (cubic interpolation between your dragged points) and applies it with OpenCV's remap, so every pixel lands where your warps say it should.
That means two real dependencies: opencv-python and scipy. Both are in the pack's requirements.txt and installed automatically - the source even prints a friendly error telling you to pip install opencv-python scipy if they're missing.
The honest limitations
The author lists this node under "works for me, might have bugs," and the README flags one specific gap: transparency isn't handled properly yet ("有空修" - I'll fix it when I get to it). So flatten or remove your alpha channel before warping, or you may get artifacts around transparent edges.
Second, like most of this pack's image processors, it operates on the first image in a batch only. Feed it single frames.
Inputs and outputs
- 图像 (IMAGE) - what you're warping. The deformation_data field exists but is hidden; it's where the editor writes its settings, not something you type into.
- 图像 output - the warped result. If the node has no edits stored, it passes the input straight through untouched, which is a nice safety behavior.
Installing it
Pack install, same as all its siblings:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
restart ComfyUI, or use ComfyUI Manager (search "ComfyUI-ZML-Image") to install with dependencies in one click. Expect the first install to take a minute - the requirements include OpenCV and the YOLO library even though this specific node only needs the first two. No model files involved.
When you'd actually reach for it
It's a manual-fix tool, so it shines in "almost perfect" workflows: touch-up passes after generation, fixing a warped limb before inpainting, or lightly distorting a character sheet. It's also the kind of node where a little goes a long way - liquify is seductive, and a heavily warped image looks cooked fast. Nudge, run, look, nudge again.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| 图像 | IMAGE | — | |
| deformation_data | STRING | {} | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |