- 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
33 lines
836 B
YAML
33 lines
836 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pytest:
|
|
name: pytest (Python ${{ matrix.python-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install test dependencies
|
|
# comfy_api is mocked in conftest.py, so a full ComfyUI install isn't needed.
|
|
# numpy silences torch's "Failed to initialize NumPy" import warning.
|
|
run: python -m pip install --upgrade pip pytest torch numpy
|
|
- name: Run tests
|
|
run: python -m pytest -q
|