From 54386d966261c7202589ad020a197b72b6bebd0d Mon Sep 17 00:00:00 2001 From: telamonian Date: Fri, 30 Aug 2024 00:09:32 -0400 Subject: [PATCH] add numpy<2 override on windows --- comfy_cli/uv.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/comfy_cli/uv.py b/comfy_cli/uv.py index 343aff86..8bfcd85b 100644 --- a/comfy_cli/uv.py +++ b/comfy_cli/uv.py @@ -7,8 +7,9 @@ from typing import Any, Optional, Union, cast from comfy_cli import ui -from comfy_cli.constants import GPU_OPTION +from comfy_cli.constants import GPU_OPTION, OS 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]: @@ -72,6 +73,7 @@ class DependencyCompiler: # ensure usage of {gpu} version of pytorch --extra-index-url {gpuUrl} torch + torchaudio torchsde torchvision """ @@ -397,6 +399,11 @@ 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") + completed = DependencyCompiler.Compile( cwd=self.cwd, reqFiles=self.reqFilesCore,