diff --git a/README.md b/README.md index 078034f..0b6243b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ git clone https://github.com/Ethanfel/ComfyUI-Tween.git pip install -r requirements.txt ``` -Dependencies are declared in `pyproject.toml` and `requirements.txt` and are installed automatically by ComfyUI Manager or pip. LDF-VFI requires PyTorch 2.5+ plus a current `diffusers`/`accelerate` stack. +Dependencies are declared in `pyproject.toml` and `requirements.txt` and are installed automatically by ComfyUI Manager or pip. There is intentionally no custom `install.py`, avoiding a second redundant dependency-install pass after Manager processes `requirements.txt`. LDF-VFI requires PyTorch 2.5+ plus a current `diffusers`/`accelerate` stack. ### Demo workflow diff --git a/install.py b/install.py deleted file mode 100644 index 5b81335..0000000 --- a/install.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -import subprocess -import sys - - -def install(): - """Install required dependencies without mutating optional GPU packages.""" - requirements_path = os.path.join(os.path.dirname(__file__), "requirements.txt") - subprocess.check_call([ - sys.executable, "-m", "pip", "install", "-r", requirements_path - ]) - print( - "[Tween] Optional cupy is not installed automatically. " - "BIM-VFI, SGM-VFI, and GIMM-VFI use the PyTorch fallback unless you " - "install the matching cupy wheel manually; EMA-VFI, SPEED, and " - "LDF-VFI do not use cupy." - ) - - -if __name__ == "__main__": - install() diff --git a/pyproject.toml b/pyproject.toml index 8fe4de1..b6a6415 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-tween" description = "Video frame interpolation nodes for ComfyUI using BIM-VFI, EMA-VFI, SGM-VFI, GIMM-VFI, SPEED, and LDF-VFI." -version = "1.2.1" +version = "1.2.2" license = "Apache-2.0" requires-python = ">=3.10" dependencies = [ diff --git a/tests/test_install.py b/tests/test_install.py index 662ac1b..0fe7b68 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,19 +1,26 @@ -import os -import subprocess -import sys - -import install as tween_install +from pathlib import Path +import tomllib -def test_installer_never_installs_optional_cupy(monkeypatch): - calls = [] - monkeypatch.setattr(subprocess, "check_call", calls.append) +REPO_ROOT = Path(__file__).resolve().parents[1] - tween_install.install() - requirements_path = os.path.join( - os.path.dirname(tween_install.__file__), "requirements.txt" - ) - assert calls == [[ - sys.executable, "-m", "pip", "install", "-r", requirements_path - ]] +def _requirements(): + return [ + line.strip() + for line in (REPO_ROOT / "requirements.txt").read_text().splitlines() + if line.strip() and not line.lstrip().startswith("#") + ] + + +def test_comfy_manager_has_no_redundant_install_script(): + assert not (REPO_ROOT / "install.py").exists() + + +def test_declared_dependencies_stay_aligned_and_exclude_optional_cupy(): + with (REPO_ROOT / "pyproject.toml").open("rb") as file: + project_dependencies = tomllib.load(file)["project"]["dependencies"] + + requirements = _requirements() + assert requirements == project_dependencies + assert not any("cupy" in dependency.lower() for dependency in requirements)