Open-Source Wikis

/

ComfyUI

/

How to contribute

/

Tooling

comfyanonymous/ComfyUI

Tooling

Tools and CI workflows that govern this codebase.

Lint

pyproject.toml configures Ruff:

  • Rule selection: N805, S307, S102, E, T, W, F
  • Ignored: E501 (line length), E722 (bare except), E731 (lambda assign), E712, E402, E741
  • Excluded: notebooks and **/generated/*.pyi

Run locally:

ruff check .

CI workflow: .github/workflows/ruff.yml.

The [tool.pylint] section in pyproject.toml configures pylint for editor/IDE use; pylint isn't run in CI.

Tests

Workflow What it runs
test-unit.yml pytest tests-unit
test-execution.yml pytest tests/execution against a running server
test-launch.yml python main.py --quick-test-for-ci smoke
test-build.yml Confirms the build succeeds
test-ci.yml Full CI hat
pullrequest-ci-run.yml Re-dispatches CI when explicit re-run is requested

Custom CI checks

API stub generation

comfy_api_nodes/apis/__init__.py is generated. The generator and the workflow that runs it:

If you change a Pydantic schema in comfy_api_nodes/apis/schemas/, regenerate the stub locally and commit the diff.

Release pipeline

Releases tag master and trigger downstream builds:

Workflow What it does
update-version.yml Bumps pyproject.toml and comfyui_version.py
stable-release.yml Cuts the stable tag
release-stable-all.yml Builds Windows portable bundles
windows_release_package.yml Windows portable build
windows_release_dependencies.yml Pinned Windows dependency lock
windows_release_dependencies_manual.yml Manual variant
windows_release_nightly_pytorch.yml Nightly PyTorch flavor
release-webhook.yml Notifies downstream consumers
tag-dispatch-cloud.yml Triggers cloud build on new tags
update-ci-container.yml Refreshes the CI container image
api-node-template.yml Helpers for adding new API-node integrations

Database migrations

The asset DB uses Alembic. Migrations live under alembic_db/versions/. The runtime applies pending migrations on startup if dependencies_available() is true (see _init_file_db in app/database/db.py). To author a new migration locally:

alembic -c alembic.ini revision --autogenerate -m "describe change"

The autogenerated revision uses the Base.metadata from app/database/models.py (which transitively imports app/assets/database/models.py). Review the generated SQL carefully — naming conventions are pinned in app/database/models.py.

Project metadata

pyproject.toml is the single source of truth for the version and licensing. Don't edit comfyui_version.py directly — the build process regenerates it from pyproject.toml.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Tooling – ComfyUI wiki | Factory