Files
EnragedAntelope-ComfyUI-Con…/pyproject.toml
T
Claude 7e60424416 Add image resizing with intelligent cropping support
Features:
- Actual image resizing using torch bilinear interpolation
- Optional cropping to preserve aspect ratio when rounding causes deviations
- Configurable crop position (center, top, bottom, left, right)
- Resized image now output first, followed by original passthrough
- Input validation with detailed error messages
- Comprehensive tooltips on all inputs and outputs
- Reorganized UI with logical grouping of parameters
- Enhanced description with usage tips
- Max value constraints added to prevent unreasonable inputs

Technical improvements:
- Use torch.nn.functional.interpolate for high-quality resizing
- Smart crop algorithm that resizes first then crops to preserve quality
- Proper tensor shape handling [batch, height, width, channels]
- Aspect ratio deviation warnings when crop is disabled
- min/max bounds on all numeric inputs

Breaking changes:
- Output order changed: resized_image is now first output
- Output names simplified (width/height instead of constrained_width/constrained_height)
- execute() signature expanded with crop parameters

Bump version to 2.1.0
2025-11-08 13:06:46 +00:00

16 lines
584 B
TOML

[project]
name = "constrainresolution"
description = "Given min/max resolution constraints, this automatically suggests optimal dimensions while preserving aspect ratio. Ideal for Image to Image (I2I) and Image to Video (I2V) workflows!"
version = "2.1.0"
license = {file = "LICENSE"}
dependencies = ["numpy", "comfy_api"]
[project.urls]
Repository = "https://github.com/EnragedAntelope/ComfyUI-ConstrainResolution"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "enragedantelope"
DisplayName = "ComfyUI-ConstrainResolution"
Icon = ""