diff --git a/README.md b/README.md index f1d2d69..9ece089 100644 --- a/README.md +++ b/README.md @@ -390,7 +390,7 @@ the useful rows are all still there (1024×576, 1536×864, 2048×1152, 2560×144 ### Resolution Preset -One combo of 79 known-good resolutions. Every entry is exactly on its aspect ratio and +One combo of 87 known-good resolutions. Every entry is exactly on its aspect ratio and on the patch grid, so there is nothing to compute and nothing to look up. **Inputs** — `preset`, formatted `ratio · width × height · real MP · compatible models`. @@ -412,6 +412,10 @@ entries, and the coarse grid lands them on canonical sizes — 512, 768, 1024, 1 — instead. Coarse-lattice ratios like 16:9 fall through to grid 16 and keep their full useful set. +The list spans 0.15 to 4.3 MP. The bottom end is there for runs where the canvas is +overhead rather than output — an audio-only MiniMax H3 render, say, where `16:9 · 512 × +288` is the smallest exact 16:9 the model's 32 px grid admits. + Why a list and not a number: with `exact_ratio` on, the valid outputs *are* a discrete lattice. A continuous megapixel input advertises precision that does not exist, and pushes the lookup table out of the node and into your head (or a sticky note next to diff --git a/__init__.py b/__init__.py index 010bd6b..7f5a9cf 100644 --- a/__init__.py +++ b/__init__.py @@ -55,7 +55,7 @@ from typing_extensions import override from comfy_api.latest import ComfyExtension, IO -__version__ = "1.1.1" +__version__ = "1.2.0" # --------------------------------------------------------------------------- @@ -157,10 +157,13 @@ def align_value(value: int, alignment: int, mode: str) -> int: # presets are the lattice, rendered readable -- derived at import time, never # hand-maintained, so they cannot drift from what the solver produces. # --------------------------------------------------------------------------- -PRESET_MIN_MP = 0.25 +# The floor sits just under 512x288 (0.147 MP), the n=1 lattice point for 16:9 +# at alignment 32 -- the smallest exact 16:9 an H3 graph can ask for. Useful for +# audio-only H3 runs, where the video canvas is pure overhead. +PRESET_MIN_MP = 0.14 PRESET_MAX_MP = 4.3 -PRESET_MIN_ENTRIES = 6 # coarsest grid that still offers this many sizes wins -PRESET_MAX_ENTRIES = 9 # thin geometrically beyond this, keeping both ends +PRESET_MIN_ENTRIES = 6 # coarsest grid that still offers this many sizes wins +PRESET_MAX_ENTRIES = 11 # thin geometrically beyond this, keeping both ends # 16:9 and 9:16 lead: the common case for video and for delivery to a screen. PRESET_RATIO_ORDER = [ diff --git a/pyproject.toml b/pyproject.toml index 3947b08..f6fa69f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-resolution-tools" description = "Resolution maths for latent-space models, done exactly. Real megapixels (10^6, not 1024^2), patch-grid alignment for Krea 2 / MiniMax H3 / Flux / SDXL, and aspect ratios held exact instead of drifting on rounding." -version = "1.1.1" +version = "1.2.0" license = { file = "LICENSE" } readme = "README.md" requires-python = ">=3.10"