- Refuse extreme-aspect-ratio upscales that would exhaust memory (1x690 at default settings asked for 704x485760, ~4 GB per batch item) - Raise instead of returning a zero dimension when multiple_of exceeds max_res in Strict mode, and when a thin strip truncates to zero at multiple_of=1 - Drop **kwargs from validate_inputs, which disabled ComfyUI's own range and combo-option checks for every input on the node - Resize once on the crop path instead of computing and discarding a resize - Compare exact aspect ratios rather than 4-decimal rounded ones when deciding whether to crop - Reject unknown constraint modes rather than applying neither limit - Log the reason when the pack fails to import - Bump version to 2.4.0
29 lines
725 B
TOML
29 lines
725 B
TOML
[project]
|
|
name = "constrainresolution"
|
|
description = "Resize images to fit min/max resolution limits with dimensions guaranteed divisible by 2/8/16/32/64. Aspect-ratio-preserving resize with smart cropping — ideal for image-to-image and image-to-video workflows."
|
|
version = "2.4.0"
|
|
license = {file = "LICENSE"}
|
|
requires-python = ">=3.10"
|
|
dependencies = []
|
|
|
|
[project.urls]
|
|
Repository = "https://github.com/EnragedAntelope/ComfyUI-ConstrainResolution"
|
|
# Used by Comfy Registry https://comfyregistry.org
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "--import-mode=importlib"
|
|
|
|
[tool.comfy]
|
|
PublisherId = "enragedantelope"
|
|
DisplayName = "ComfyUI-ConstrainResolution"
|
|
Icon = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|