π± Artha Image Transform
Resize, crop, pad, rotate and flip in one node
- image
- mask
- image
- mask
- width
- height
Artha Image Transform is the π± Artha pack's geometry node: one input, eleven knobs, and it handles resize, crop, pad, rotation, and flips in a single place. If you've ever chain-built resize β rotate β flip with three separate nodes just to get a training-batch image ready, this collapses that whole stack.
The honest headline: you can do all of this with ComfyUI's core nodes, which is exactly why most people won't reach for this one by default. Where it earns its place is in an Artha-only pipeline, and in the way it reports back real width/height outputs - a small thing that saves wiring through a separate image-size node when you need dimensions downstream.
How it works
The node does its work in order: rotation first (using rotation or custom_angle), then flips (flip_horizontal/flip_vertical), then resizing per the resize_mode. The resize_mode dropdown is where the real behavior lives:
- none - no size change; rotation/flip only.
- resize - scale to
target_width/target_height, withkeep_proportionsdeciding whether to stretch or preserve aspect. - crop - resize to cover the target dimensions, then center-crop to fit exactly.
- pad - resize to fit inside the target, then pad with the edge color to reach the full size.
The upscale_method (nearest, bilinear, bicubic, area, lanczos) picks the resampling filter; lanczos is the quality default. normalize controls whether the output tensor's pixel values get normalized, and auto_orient applies EXIF orientation correction. An optional mask input rides along and is passed through, and you get the mask back as an output too - handy when you resize a mask together with its image.
Inputs that matter
- image - required IMAGE input. mask - optional MASK, passed through unchanged.
- resize_mode - the mode that decides everything about sizing.
- target_width / target_height - 64β4096, step 8 (multiples of 8, which keeps things diffusion-friendly).
- keep_proportions - on by default; turn off only if you want a deliberate stretch.
- rotation - 0/90/180/270 or
custom, which unlockscustom_angle(β360Β° to 360Β°).
Outputs: image (IMAGE), mask (MASK), width (INT), height (INT) - the last two report the actual resulting dimensions.
Installing it
One-pack install, same as all Artha nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/ComfyUI-Artha-Nodes
pip install -r ComfyUI/custom_nodes/ComfyUI-Artha-Nodes/requirements.txt
then restart ComfyUI, or install "ComfyUI-Artha-Nodes" via ComfyUI Manager. The heavy lifting here is opencv-python from the pack requirements (used for the geometry ops) plus the standard stack. No API key, no model files - fully local.
Common issues
- Stretched/distorted output:
keep_proportionsis off, or you're mixingresizewith mismatched target dims. Turn it back on. - Content cut off unexpectedly: that's
cropmode doing exactly what it says - it crops to the aspect. Usepadif you'd rather letterbox than lose pixels. - Rotation at odd angles adds border:
customrotation withexpand=Truerotates the canvas, so the image gets letterboxed. Expected behavior, just don't be surprised by the bars. - Pillow vs OpenCV quirk: the node mixes both libraries internally; if a transform behaves oddly on a very large image, downscale upstream first.
The verdict: a competent all-in-one geometry node that's most valuable inside an Artha-native workflow or when you want dimensions handed back for free. Outside that, the core ImageScale/ImageFlip nodes cover you - but there's nothing wrong with reaching for this one first.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| resize_mode | COMBO | none | 4 options: none, resize, crop, pad |
| upscale_method | COMBO | lanczos | 5 options: nearest, bilinear, bicubic, area, lanczos |
| target_width | INT | 51264β4096 | β |
| target_height | INT | 51264β4096 | β |
| keep_proportions | BOOLEAN | true | β |
| rotation | COMBO | 0 | 5 options: 0, 90, 180, 270, custom |
| custom_angle | FLOAT | 0.0-360β360 | β |
| flip_horizontal | BOOLEAN | false | β |
| flip_vertical | BOOLEAN | false | β |
| normalize | BOOLEAN | true | β |
| auto_orient | BOOLEAN | false | β |
| maskopt | MASK | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| mask | MASK | β |
| width | INT | β |
| height | INT | β |