System¶
system
¶
System prerequisites — Steps 1-2.
Checks and installs external tools required before the Python environment or ComfyUI can be set up:
- Git: version check against
MIN_GIT_VERSION, auto-install on Windows, or OS-specific upgrade instructions. - aria2: 3-tier search (system PATH → local
scripts/aria2/→ download on Windows / suggest on Linux).
Typical usage::
from src.installer.system import check_prerequisites, ensure_aria2
if not check_prerequisites(log):
install_git(log)
ensure_aria2(install_path, log)
check_prerequisites(log)
¶
Verify that required external tools are present and up to date.
Checks Git availability and version. If Git is outdated, offers OS-specific update instructions (auto-update on Windows, manual commands on Linux/macOS).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log
|
InstallerLogger
|
Installer logger for user-facing messages. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
bool
|
usable). |
Source code in src/installer/system.py
install_git(log, *, git_url='https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/bin/Git-2.53.0.2-64-bit.exe', git_sha256='')
¶
Download and silently install Git for Windows.
On non-Windows platforms, prints manual installation instructions
and returns False immediately.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log
|
InstallerLogger
|
Installer logger for user-facing messages. |
required |
git_url
|
str
|
Download URL for the Git installer. Defaults to
the version in |
'https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/bin/Git-2.53.0.2-64-bit.exe'
|
git_sha256
|
str
|
Expected SHA-256 hex digest for verification. |
''
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in src/installer/system.py
ensure_aria2(install_path, log, *, aria2_url='', aria2_sha256='')
¶
Ensure the aria2 download accelerator is available.
Uses a 3-tier search strategy:
- System
PATH(user or package-manager installed). install_path/scripts/aria2/(downloaded by a previous run).- Windows: download and extract to
scripts/aria2/. Linux/macOS: suggest package manager installation.
If found in tier 2 or 3, the directory is prepended to
os.environ["PATH"] so subsequent calls can find aria2c.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
install_path
|
Path
|
Root installation directory. |
required |
log
|
InstallerLogger
|
Installer logger for user-facing messages. |
required |
aria2_url
|
str
|
Download URL for the aria2 zip archive. |
''
|
Returns:
| Type | Description |
|---|---|
bool
|
|