Open-Source Wikis

/

ComfyUI

/

By the numbers

comfyanonymous/ComfyUI

By the numbers

A quantitative snapshot of the codebase. Numbers are computed against master at the wiki commit and are a lower bound — the repo also vendors a ~99 KB OpenAPI spec and ships shader/JSON workflow assets that are not counted in source-line totals.

Data collected on 2026-04-30 (HEAD b6332446).

Size

The codebase is dominated by comfy/ (the diffusion engine) and comfy_api_nodes/ (paid third-party API integrations). Together they account for roughly two thirds of all Python lines.

xychart-beta horizontal
    title "Python lines of code by top-level package"
    x-axis ["comfy/", "comfy_api_nodes/", "comfy_extras/", "tests-unit/", "app/", "comfy_api/", "tests/", "comfy_execution/", "api_server/"]
    y-axis "Lines" 0 --> 90000
    bar [84388, 40092, 27126, 12383, 9054, 5842, 5427, 2037, 180]
Area Lines Notes
comfy/ (diffusion engine + model code) 84,388 LDM nets, samplers, text encoders, model loading, memory management
comfy_api_nodes/ (paid API integrations) 40,092 Kling, Veo, Stability, BFL, Ideogram, Recraft, Vidu, Tripo, …
comfy_extras/ (built-in extra nodes) 27,126 One file per feature/model family
tests-unit/ 12,383 Pytest unit tests, no GPU required
app/ (managers + assets + DB) 9,054 User, model, custom node, frontend, assets, database
comfy_api/ (custom-node API surface) 5,842 Versioned: latest, v0_0_1, v0_0_2
tests/ (integration tests) 5,427 Server end-to-end
comfy_execution/ 2,037 Graph traversal, caching, jobs, progress
Top-level nodes.py 2,513 The standard node library
Top-level execution.py 1,355 The prompt executor
Top-level server.py 1,288 The aiohttp server
api_server/, middleware/, utils/ 383 Internal /internal/* routes + helpers

Largest individual files (lines):

File Lines
comfy_api_nodes/apis/__init__.py 6,155
comfy_api_nodes/nodes_kling.py 3,327
nodes.py 2,513
comfy_api/latest/_io.py 2,318
comfy_api_nodes/nodes_wan.py 2,222
comfy_api_nodes/nodes_bytedance.py 2,111
comfy/model_base.py 2,041
comfy/sd.py 1,902
comfy/supported_models.py 1,884
comfy/model_management.py 1,829
comfy/k_diffusion/sampling.py 1,812
comfy/model_patcher.py 1,744
comfy/ldm/wan/model.py 1,738

Activity

The repo was started on 2023-01-03. Activity has accelerated steadily — recent months sustain ~150-186 commits/month, roughly 5-6× the early-2023 baseline.

Commits per month over the last year (last bucket is partial):

Month Commits
2025-05 116
2025-06 91
2025-07 97
2025-08 140
2025-09 147
2025-10 150
2025-11 137
2025-12 161
2026-01 186
2026-02 183
2026-03 175
2026-04 113

Last 12 months total: 1,697 commits across roughly 3 years of total history.

Files most modified in the last 90 days (churn hotspots — change frequency, not blame):

File Changes (90d)
requirements.txt 77
comfy/model_management.py 34
comfy/sd.py 31
nodes.py 29
comfy/model_base.py 27
comfy/model_patcher.py 26
pyproject.toml 23
comfy/ops.py 23
comfyui_version.py 23
main.py 16
comfy/utils.py 15
comfy/supported_models.py 15
execution.py 14
comfy_api/latest/_io.py 14
comfy/text_encoders/llama.py 14

The pattern is unsurprising: each new model release nudges comfy/sd.py, comfy/supported_models.py, comfy/model_base.py, and nodes.py, and bumps requirements.txt + pyproject.toml for the version tag.

Bot-attributed commits

Of 5,110 total authored commits, 118 carry author names that look automated:

Bot author Commits
ComfyUI Wiki 98
Comfy Org PR Bot 18
Arthur R Longbottom (occasional bot tag) 2

That is roughly 2.3% of commits with bot authorship — a lower bound on automated changes since inline AI tools (Copilot, Cursor, etc.) leave no trace in git history. The dominant automation here is the ComfyUI Wiki bot which mirrors the GitHub Wiki pages.

Complexity

A handful of files are doing a lot of work:

  • nodes.py (2,513 lines, 100 KB) holds the standard node library. Each node is a small class but they all live in one module.
  • comfy/model_base.py (2,041 lines) defines the BaseModel class and one subclass per supported architecture.
  • comfy/supported_models.py (1,884 lines) is a registry of architecture detectors — one class per model family with key/shape signatures.
  • comfy/sd.py (1,902 lines) is the loader entry point for checkpoints, CLIP, VAE, and friends. It imports almost every text encoder and VAE module in the repo.
  • comfy/model_management.py (1,829 lines) is the VRAM scheduler and dtype/attention probe.

There are 221 TODO/FIXME/HACK/XXX comments across the Python source. The hottest concentrations:

File Markers
comfy_extras/nodes_audio.py 16
comfy/supported_models.py 16
comfy/model_management.py 16
comfy_extras/nodes_images.py 14
comfy_extras/nodes_mask.py 12
comfy/model_patcher.py 8
comfy_extras/nodes_lt.py 6
comfy_extras/nodes_hunyuan3d.py 6
comfy/sd.py 6
comfy/ops.py 6

Tests

Tree Lines Notes
tests-unit/ 12,383 pytest, no GPU
tests/ 5,427 end-to-end, hits a running server

Roughly a 1:6 ratio of test code to non-test Python. See Testing.

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

By the numbers – ComfyUI wiki | Factory