- 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
13 lines
405 B
Python
13 lines
405 B
Python
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
try:
|
|
from .nodes import comfy_entrypoint
|
|
__all__ = ['comfy_entrypoint']
|
|
except (ImportError, SystemError):
|
|
# Without this log the pack just silently fails to appear in ComfyUI,
|
|
# leaving nothing to diagnose.
|
|
logger.exception("ComfyUI-ConstrainResolution failed to load; its node will be unavailable.")
|
|
__all__ = []
|