Nodes/ComfyUI-off-suite/Image Crop Fit Node
ComfyUI Node

Image Crop Fit Node

The One-Node Square Crop for VAE-Happy Inputs

By Off-Live·Created 3 years ago·Updated 2 years ago· 0
Image Crop Fit Node
  • image
  • IMAGE

Most models want square images. Most source photos aren't. This node is the two-second fix: it center-crops your image to a square (using the shorter side), then resizes the result down to a multiple of 8 so it plays nice with a VAE. One input, one output, zero configuration. That's the whole product, and honestly that's all it needs to be.

It's part of ComfyUI-off-suite, Off-Live's small utility pack. This is the sort of node that looks like filler until you're mid-workflow and realize you've been re-typing crop dimensions into an ImageCrop node for the third time today.

What it does, exactly

  • image in, IMAGE out. Nothing else to set.
  • It crops a square centered on the image, sized to the smaller dimension. A 1536×1024 photo becomes a 1024×1024 center crop; a 1024×1536 portrait becomes 1024×1024 as well. Whatever the shorter edge is, that's your square.
  • Then it resizes the crop to a multiple of 8 - 1024 stays 1024, but a 1377×1377 crop (an odd-sized square from some pipeline) snaps to 1368 or 1376. That "multiple of 8" business matters because VAE encoders and latents work in 8×8 blocks; feed them a 1003px image and you invite silent dimension errors or weird padding artifacts downstream.

The one thing it doesn't do is upscale: the square is the smaller side, so you always lose pixels, never invent them. If you need a square larger than your short edge, that's an upscale job, not a crop.

When you'd reach for it

  • Feeding arbitrary reference photos into img2img or ControlNet pipelines that want square input.
  • Pre-cropping for a detail pass, so the face or subject fills more of the frame before the sampler sees it.
  • Standardizing mixed-aspect batches before any node that assumes consistent dimensions.

It pairs naturally with Image Resize Fit from the same pack - crop to square here, then resize to a fixed size there - and with the off-suite face-crop family, where a face-centered square (via Crop Center with SEGS) is often a better choice than a frame-centered one.

The honest caveats

It's center-cropped, so an off-center subject gets chopped. If your subject isn't near the middle of the frame, the centered square will decapitate them - for face work, prefer the SEGS-based crop that centers on the face instead. And the resize is a plain PIL resize with no fancy interpolation or anti-alias controls; for a utility crop that's fine, for a final-output-quality resize you'd use something with more knobs.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Off-Live/ComfyUI-off-suite
# or: ComfyUI Manager → search "ComfyUI-off-suite"

No dependencies, no models, no config. Install once, and it sits there as a boring, dependable utility in the OFF menu - the kind of node you stop noticing because it never gives you trouble.

CategoryOFF

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE