Comfy-Org / Comfy-Org/ComfyUI

Resize should be a no-op if scale is 1.0 (input == output size)

Open
#2,286 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

I noticed that the resize node performs operations even when the input is already the target size.

Instead of resampling the image with a scaling algorithm, I propose that if width == width and height == height, just return the input as-is, since there's nothing to do.

This would enable a workflow where an image is imported, passed into a scaler, which does nothing at 1.00. To preserve quality when no scaling is necessary. But which makes it super convenient to change the scale if needed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.