From 93ab01b1280cf0b4b2db52c574e438462b20390e Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Wed, 30 Oct 2024 18:00:13 -0700 Subject: [PATCH] comfy standalone: numpy < 2.0 for all OS (#202) * Numpy < 2.0 for all OS. * Fix ruff issues. * update uv unittest to reflect numpy < 2 forced requirement --------- Co-authored-by: telamonian --- comfy_cli/uv.py | 5 +---- tests/uv/mock_requirements/requirements.compiled | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/comfy_cli/uv.py b/comfy_cli/uv.py index b311724d..2a89b3e4 100644 --- a/comfy_cli/uv.py +++ b/comfy_cli/uv.py @@ -7,9 +7,8 @@ from typing import Any, Optional, Union, cast from comfy_cli import ui -from comfy_cli.constants import GPU_OPTION, OS +from comfy_cli.constants import GPU_OPTION from comfy_cli.typing import PathLike -from comfy_cli.utils import get_os def _run(cmd: list[str], cwd: PathLike, check: bool = True) -> subprocess.CompletedProcess[Any]: @@ -406,8 +405,6 @@ def make_override(self): f.write(DependencyCompiler.overrideGpu.format(gpu=self.gpu, gpuUrl=self.gpuUrl)) f.write("\n\n") - # TODO: remove numpy<2 override once torch is compatible with numpy>=2 - if get_os() == OS.WINDOWS: f.write("numpy<2\n") f.write("\n\n") diff --git a/tests/uv/mock_requirements/requirements.compiled b/tests/uv/mock_requirements/requirements.compiled index 17502236..484e7adb 100644 --- a/tests/uv/mock_requirements/requirements.compiled +++ b/tests/uv/mock_requirements/requirements.compiled @@ -8,7 +8,7 @@ mpmath==1.3.0 # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt # sympy # from https://download.pytorch.org/whl/rocm6.1 -numpy==2.0.0 +numpy==1.26.4 # via # --override override.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/x_reqs.txt