Repository¶
repository
¶
ComfyUI repository setup — Steps 5-6.
Clones the ComfyUI repository and sets up the "wireless" external-folder architecture using junctions (Windows) or symlinks (Linux/macOS). This keeps user data (models, outputs, custom nodes) outside the Git repo for painless updates.
Typical usage::
setup_git_config(log)
clone_comfyui(install_path, comfy_path, deps, log)
setup_junction_architecture(install_path, comfy_path, log)
setup_git_config(log)
¶
Enable core.longpaths globally in Git.
Required on Windows to handle deep node_modules-style paths inside custom nodes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log
|
InstallerLogger
|
Installer logger for user-facing messages. |
required |
Source code in src/installer/repository.py
clone_comfyui(install_path, comfy_path, deps, log, *, max_retries=3)
¶
Clone the ComfyUI repository from the URL in deps.
Skips cloning if comfy_path already exists. Retries up to
max_retries times on failure (network errors, timeouts).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
install_path
|
Path
|
Root installation directory. |
required |
comfy_path
|
Path
|
Target path for the clone ( |
required |
deps
|
DependenciesConfig
|
Parsed |
required |
log
|
InstallerLogger
|
Installer logger for user-facing messages. |
required |
max_retries
|
int
|
Number of clone attempts before giving up. |
3
|
Raises:
| Type | Description |
|---|---|
SystemExit
|
If cloning fails after all retries. |
Source code in src/installer/repository.py
setup_junction_architecture(install_path, comfy_path, log)
¶
Create the external-folder architecture with junctions/symlinks.
For each folder in EXTERNAL_FOLDERS:
- Case 1 — Internal dir exists, no external: move to external.
- Case 2 — Both exist: merge internal into external, delete internal.
- Case 3 — Neither exists: create external.
Then creates a junction (Windows) or symlink (Linux) from the internal path to the external directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
install_path
|
Path
|
Root installation directory containing external folders. |
required |
comfy_path
|
Path
|
ComfyUI repository directory. |
required |
log
|
InstallerLogger
|
Installer logger for user-facing messages. |
required |