How huafitwjb/comfyui-distortion-transformation-kit works
This ComfyUI custom-node package provides interactive and preset perspective transforms, mask completion tools, polygon approximation, and quadrilateral mask-based warping. The main interactive workflow is: a ComfyUI workflow invokes the visual transform node, the backend opens the browser editor with its images, the user adjusts the quadrilateral and applies or cancels, and the backend handles the request. The README documents the other node capabilities. Backend implementations share __init__.py; excerpts do not expose every node’s internal call graph, so those branches are shown without inferred links.
Main entry points: popup_blender.js Popup editor · __init__.py Visual transform node
Components 12
Perspective transforms
- Visual transform node
__init__.py - Preset transform node
__init__.py
Interactive editor
- Popup editor
web/popup_blender.js - Perspective rendering
web/popup_blender.js
Mask tools
- Quick mask completion
__init__.py - Adaptive mask completion
__init__.py - Polygon approximation
__init__.py - Quad mask warper
__init__.py
Backend coordination
- Apply and cancel routes
__init__.py - Node session state
__init__.py
Other components
- ComfyUI workflow
- User
Connections 11
- ComfyUI workflow → Visual transform node: runs node
README.md - ComfyUI workflow → Preset transform node: runs node
README.md - ComfyUI workflow → Quick mask completion: runs node
README.md - ComfyUI workflow → Adaptive mask completion: runs node
README.md - ComfyUI workflow → Polygon approximation: runs node
README.md - ComfyUI workflow → Quad mask warper: runs node
README.md - Visual transform node → Popup editor: opens editor
__init__.py - Popup editor → User: accepts edits
README.md - Popup editor → Perspective rendering: renders preview
web/popup_blender.js - Popup editor → Apply and cancel routes: posts apply or cancel
web/popup_blender.js - Apply and cancel routes → Node session state: reads or updates
__init__.py