Superside Crop By Region
Process just the face, not the whole frame — and stitch the result back pixel-exact
- image
- mask
- image
- mask
- crop_x
- crop_y
- crop_w
- crop_h
The reason a small face in a big image always comes out as a smear is that the latent only has so much budget to spend, and a 70-pixel face gets almost none of it. The fix is to give that region its own pass: crop it, render it big, paste it back. This node is the first half of that loop, and its whole job is to make the crop and the eventual paste-back coordinate-exact. No API, no key, nothing leaves your machine.
It takes the four coordinate outputs from a region selector - center_x, center_y, crop_width, crop_height - plus the image and mask to crop, and returns a cropped image and mask sized for the generator. The three optional knobs are where the real behavior lives:
padding_percent(default 25) - extra context margin around the region before cropping. That margin is what gives an inpaint model room to blend; crop too tight and the re-render has no visual context.multiple_of(default 64) - rounds the final crop up to a multiple of this. Diffusion models are happiest with dimensions in multiples of 8 or 64, so a selector's arbitrary box gets nudged into a generator-friendly size.min_size(default 512) - floors the crop at a minimum dimension, so a tiny region still gets a usable render size instead of a postage-stamp crop.
The outputs are the star of the show: image and mask (the crops) plus crop_x, crop_y, crop_w, crop_h - the exact rectangle actually used, after padding, rounding, and flooring. Those four integers are the contract that makes the second half of the loop work: you process the crop (inpaint it, upscale it, whatever), then feed the result plus these coordinates to the pack's Stitch Region node, which resizes the processed crop back to crop_w × crop_h and pastes it into the full-resolution original at exactly crop_x/crop_y - feathering the paste mask so the seam blends. Because the original is never resized, the whole pipeline runs without any coordinate drift.
The one thing that trips people up is treating this as a general crop node. It isn't a preview-friendly "crop this rectangle" tool; it's specifically the region-loop companion, and it expects the selector's coordinate outputs (from Superside Florence-2 Smart Region Selector or Superside SAM 3 Smart Region Selector), not hand-typed guesses. If you wire random numbers into center_x/center_y/crop_width/crop_height, you'll get a crop, but it'll be wherever your numbers pointed. The natural pairing is: selector → this → inpaint/upscale → stitch.
Install - it's part of the Superside pack, so ComfyUI Manager (search "comfyui-superside-nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Superside/comfyui-superside-nodes
pip install -r requirements.txt
Restart ComfyUI and find it under Superside. No key, no model downloads. If you have the pack installed already, this node needs nothing else from you.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| center_x | INT | 00–1000000 | — |
| center_y | INT | 00–1000000 | — |
| crop_width | INT | 00–1000000 | — |
| crop_height | INT | 00–1000000 | — |
| padding_percentopt | FLOAT | 250–200 | Extra context margin added around the selected region before cropping. |
| multiple_ofopt | INT | 641–256 | Round the final crop width/height up to a multiple of this (diffusion-friendly). |
| min_sizeopt | INT | 5121–8192 | Minimum crop width/height, in case the selected region is tiny. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| crop_x | INT | — |
| crop_y | INT | — |
| crop_w | INT | — |
| crop_h | INT | — |