Eden_IMG_unpadder
Crops your padded image back, and quietly fixes the divisible-by-4 rule
- image
- IMAGE
Eden_IMG_unpadder is the other half of the pad-and-crop pair. You padded an image to out paint into extra canvas; this node trims it back to the original region. The one-liner is "crop unpad_fraction off one side," but there's a subtle detail worth knowing: it always rounds the result down so width and height stay divisible by 4. Latents (and most samplers) are picky about dimensions, and this node makes sure you don't hand a VAE or latent a size it'll choke on.
How it works
Give it an image, an unpad_fraction, and an unpad_location (bottom, top, left, right). It keeps 1 - unpad_fraction of the image along the chosen axis and drops the rest. So the inverse of your padder call - pad_fraction 0.25 on the bottom, then unpad_fraction 0.25 on the bottom - returns you to the original canvas. After cropping it trims any residual pixels so the final width and height are divisible by 4, which is why the output is sometimes a hair smaller than what you padded.
Inputs
- image (
IMAGE) - the padded image coming back from an outpainting or extension pass. - unpad_fraction (default 0, 0β1) - how much of the side to remove.
- unpad_location -
bottom,top,left,right; must match the side you padded on.
Output is a single IMAGE.
Where it fits
This is the closing step of the outpainting loop: Eden_IMG_padder β out paint at low denoise β Eden_IMG_unpadder β done. Because the padder uses edge-matched color and the unpadder crops cleanly back, the workflow survives repeated passes. It's also useful as a general crop tool when you need a clean, sampler-friendly dimension - the divisible-by-4 guarantee is genuinely the most useful behavior here, since a lot of downstream nodes will error on odd sizes. The README positions padder/unpadder as "smart padding with edge-color matching," and the unpadder is the cleanup half of that story.
Installing it
Ships in the Eden.art nodesuite (edenartlab/eden_comfy_pipelines). Install via ComfyUI Manager (search "Eden.art nodesuite") or:
cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines
cd eden_comfy_pipelines && pip install -r requirements.txt
Restart ComfyUI after installing.
Common issues
The divisible-by-4 trim surprises people who expect to get exactly the original size back - if your pad amount doesn't leave a multiple of 4, you'll lose a few pixels. Match unpad_location to the side you padded; mismatching them is the usual "why did my image shrink wrong" cause. And this node only trims one side per call, so if you padded two sides you need two unpadder instances. Small stuff, but it's the difference between a clean loop and a crop that drifts a few pixels every pass.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| unpad_fraction | FLOAT | 0.000β1 | β |
| unpad_location | COMBO | 4 options: bottom, top, left, right |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |