Open-Source Wikis

/

ComfyUI

/

How to contribute

comfyanonymous/ComfyUI

How to contribute

ComfyUI is an open-source GPL-3.0 project. Contributions go through GitHub pull requests against master. This section covers the practical mechanics of working in this codebase.

Where to start

Pull requests

CONTRIBUTING.md points at the wiki page "How to Contribute Code" for the canonical PR walkthrough. Beyond what's there, this codebase has a few specific habits to keep in mind:

  • Keep changes additive when possible. The codebase has heavy custom-node use; subtle changes to executor behavior, model-management heuristics, or comfy_api/ types ripple outward.
  • Don't reorder imports in comfy/sd.py, nodes.py, or main.py casually. These files have load-order constraints (e.g., torch must not be imported before main.py configures device env vars).
  • Mirror existing patterns. New model architectures follow the template of the most recent additions: a folder under comfy/ldm/<model>/, an entry in comfy/supported_models.py, encoder code under comfy/text_encoders/, and nodes in comfy_extras/nodes_<model>.py.

Code review expectations

CI runs ruff check, the unit test suite, an execution test, a quick launch smoke test, and a build test on every PR. See Tooling. All four must pass before merge.

The repository has a CI hook that flags AI-co-authored commits (.github/workflows/check-ai-co-authors.yml) and a line-endings check.

Definition of done

Before opening a PR:

  1. ruff check . passes.
  2. pytest tests-unit passes.
  3. Manual smoke: python main.py --quick-test-for-ci exits cleanly.
  4. If you touched a model: run a relevant workflow and confirm output sanity.
  5. If you touched the executor or caching: run pytest tests/execution (this hits a running server).

What's in this section

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

How to contribute – ComfyUI wiki | Factory