Contributing¶
Contributing to ComfyUI Auto-Installer¶
Thanks for your interest in contributing! Here's how to get started.
Development Setup¶
# Clone and install in development mode
git clone https://github.com/UmeAiRT/ComfyUI-Auto_installer.git
cd ComfyUI-Auto_installer
pip install -e ".[dev]"
Running Tests¶
# All tests
uv run pytest tests/ -q
# With coverage
uv run coverage run --source=src -m pytest tests/ -q
uv run coverage report -m --skip-covered
Code Style¶
- Linter: Ruff
- Formatter: Ruff format
- Type hints: Use them everywhere.
from __future__ import annotationsat the top. - Docstrings: Google style, rst cross-references for classes/functions.
- Enums: Use
InstallType,NodeTierfromsrc.enums— no magic strings. - Errors: Use
InstallerFatalError— never bareSystemExit(1).
Run lint before committing:
Architecture Overview¶
src/
├── cli.py # Typer CLI entry point
├── enums.py # InstallType, NodeTier, InstallerFatalError
├── config.py # Pydantic models for dependencies.json
├── installer/ # 12-step installation orchestrator
│ ├── install.py # Main orchestrator
│ ├── system.py # Git, aria2 installation
│ ├── environment.py # venv / conda creation
│ ├── dependencies.py # torch, wheels, packages
│ ├── nodes.py # Custom nodes manifest
│ └── finalize.py # Launchers, settings, model downloads
├── downloader/ # Model download engine
├── platform/ # OS abstraction (Windows, Linux)
└── utils/ # Logging, prompts, download, packaging
Supply Chain Security¶
All external binaries and wheels are mirrored on our HuggingFace Assets repo with SHA-256 verification. When updating a binary:
- Upload the new file to both HF and ModelScope repos
- Compute
sha256sumof the file - Update
scripts/dependencies.jsonwith new URL and hash - Update
tools_manifest.jsonin the Assets repo
Pull Request Guidelines¶
- Branch from
python-rewrite(current development branch) - Write tests for new functionality
- Ensure
ruff checkpasses and tests are green - Use conventional commits:
feat:,fix:,docs:,refactor: