Skip to content

Commit

Permalink
Create constant for downloading python standalone version.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Sep 11, 2024
1 parent e4468e1 commit adec3d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions comfy_cli/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ class GPU_OPTION(str, Enum):
SUPPORTED_PT_EXTENSIONS = (".ckpt", ".pt", ".bin", ".pth", ".safetensors")

NODE_ZIP_FILENAME = "node.zip"

# The default version to download from python-build-standalone.
DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION = "3.12.6"
7 changes: 3 additions & 4 deletions comfy_cli/standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
import subprocess
from pathlib import Path
from typing import Optional

import requests

from comfy_cli.constants import OS, PROC
from comfy_cli.constants import OS, PROC, DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION
from comfy_cli.typing import PathLike
from comfy_cli.utils import create_tarball, download_url, extract_tarball, get_os, get_proc
from comfy_cli.uv import DependencyCompiler
Expand All @@ -28,7 +27,7 @@
def download_standalone_python(
platform: Optional[str] = None,
proc: Optional[str] = None,
version: str = "3.12.5",
version: str = DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION,
tag: str = "latest",
flavor: str = "install_only",
cwd: PathLike = ".",
Expand Down Expand Up @@ -65,7 +64,7 @@ class StandalonePython:
def FromDistro(
platform: Optional[str] = None,
proc: Optional[str] = None,
version: str = "3.12.6",
version: str = DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION,
tag: str = "latest",
flavor: str = "install_only",
cwd: PathLike = ".",
Expand Down

0 comments on commit adec3d2

Please sign in to comment.