Open-Source Wikis

/

ComfyUI

/

Lore

comfyanonymous/ComfyUI

Lore

A timeline of what happened in this codebase, derived from git history and tag dates.

Eras

The Stable Diffusion notebook (Jan 2023)

The very first commit is 2023-01-03 — a single import dump and a notebook-style runner. By late January 2023 ComfyUI already had LoadImage, IS_CHANGED, single-line string properties, and a node-graph executor that reused outputs across runs. The bones of the system that exists today were drawn in a few weeks.

Key events:

  • 2023-01-03 — Initial commit.
  • 2023-01-22 — Add a LoadImage node to load images for img2img.
  • 2023-01-22 — Add IS_CHANGED method to nodes to check if nodes should be executed again. (incremental re-execution from day one)
  • 2023-01-22 — Try to execute the outputs that take the less steps first.
  • 2023-01-24 — Nodes now support single line string properties.

Architecture proliferation (2023–2024)

Through 2023 and 2024 the repo absorbed model after model: SDXL, Stable Cascade, SD3, Pixart, AuraFlow, HunyuanDiT, Flux. Each addition followed the same pattern: a new directory under comfy/ldm/<model>/, a new entry in comfy/supported_models.py, a new text encoder under comfy/text_encoders/, and one or more node files in comfy_extras/nodes_<model>.py.

The comfy/text_encoders/ directory now has 30+ files; comfy/ldm/ has subdirectories for flux, hunyuan_video, wan, lumina, qwen_image, cosmos, lightricks, cascade, cogvideo, mochi (genmo), hidream, omnigen, pixart, hydit, kandinsky5, chroma, and others. comfy/supported_models.py (1,884 lines) is the registry.

The frontend extraction (Aug 2024)

"As of August 15, 2024, we have transitioned to a new frontend, which is now hosted in a separate repository: Comfy-Org/ComfyUI_frontend." — README.md

Until mid-2024 the web UI lived in this repo. It was extracted to a separate Vue/TypeScript project, and the core repo now only ships a compiled bundle pinned via comfyui-frontend-package in requirements.txt. The legacy frontend is preserved in Comfy-Org/ComfyUI_legacy_frontend for users who need it.

The legacy /scripts/ui and /extensions/core/ paths still get hit by old custom nodes, which is why server.py installs a deprecation_warning middleware that logs (once) when those paths are requested.

The custom-node API formalization (2024–2025)

Custom nodes used to be just "import a file, look for NODE_CLASS_MAPPINGS." Over 2024-2025 a versioned public API took shape under comfy_api/:

  • comfy_api/v0_0_1/ — the first frozen contract.
  • comfy_api/v0_0_2/ — second iteration.
  • comfy_api/latest/ — the unstable surface, which is what most current nodes use.
  • comfy_api/internal/ — re-exported types kept private so the public surface can change without breaking nodes.
  • A "V3" schema was introduced (io.Schema, define_schema, async execute) that coexists with the older INPUT_TYPES style. Both work; new nodes are written in V3.

The custom-node API also added ComfyExtension (an __init__-style entry point), comfy_entrypoint(), async-to-sync wrappers, and a richer io namespace covering image/audio/video/mask/latent inputs, hidden inputs, and node replacement.

The assets + database era (2025)

A SQLite database backed by Alembic migrations landed in app/database/ and app/assets/database/. This unlocked:

  • Asset records keyed by content hash (assets table)
  • Multiple references per asset (asset_references) with mtime tracking
  • Background scanning + enrichment (app/assets/seeder.py, app/assets/scanner.py)
  • Tag and metadata tables for arbitrary annotations
  • Bulk ingest and metadata extraction (app/assets/services/bulk_ingest.py, metadata_extract.py)

Alembic migrations live in alembic_db/versions/. The system ships disabled by default and is opted in via --enable-assets.

The paid-API node era (2024–2026)

comfy_api_nodes/ is a separate top-level package that bundles nodes calling external paid AI services from inside ComfyUI workflows. The directory has grown to ~40,000 lines spanning Kling, Veo (Google), Stability, BFL (Black Forest Labs), Ideogram, Recraft, Runway, Sora (OpenAI), Topaz, Tripo, Hunyuan3D, Vidu, ElevenLabs, Gemini, Grok, Hitpaw, Luma, Magnific, Meshy, Minimax, Moonvalley, OpenAI, Pixverse, Quiver, Reve, Rodin, Sonilo, Stability, Wavespeed, ByteDance, and Bria.

The largest single file in the repo, comfy_api_nodes/nodes_kling.py (3,327 lines), is one of these. The infrastructure under comfy_api_nodes/util/ (~150 KB) is shared HTTP client, conversion, polling, and validation code so each provider's nodes can stay focused on the API surface.

Quantization and dynamic VRAM (2025–2026)

Two large changes shipped in the last year:

  • Quantization — A QuantizedTensor subclass plus a layout/registry system in comfy/quant_ops.py, with a per-layer MixedPrecisionOps mode in comfy/ops.py. The full design is documented in QUANTIZATION.md.
  • DynamicVRAM — The default VRAM scheduler became the dynamic one from comfy_aimdo, gated by enables_dynamic_vram() in comfy/cli_args.py. It replaces the legacy ModelPatcher with ModelPatcherDynamic on supported PyTorch ≥2.8 + Nvidia setups. The legacy patcher remains as a fallback.

comfy/model_management.py and comfy/model_patcher.py are both top-10 files by churn over the last 90 days, reflecting the ongoing tuning of these systems.

Longest-standing features

  • IS_CHANGED / incremental re-execution — Landed 2023-01-22 and still in use. Every cache key set in comfy_execution/caching.py honors it.
  • folder_paths.py — The model directory registry. Created early and still the only way the runtime knows where to find checkpoints, LoRAs, VAEs, etc.
  • comfy.utils.load_torch_file — The safetensors-aware loader. Underlies almost every load path in the engine.
  • ModelPatcher — Even with DynamicVRAM, the legacy patcher remains the structural template for cloning/patching/offload.

Deprecated features

  • In-tree frontend — Removed Aug 2024 in favor of Comfy-Org/ComfyUI_frontend. Legacy paths kept around for compatibility, with a deprecation middleware in server.py.
  • /scripts/ui and /extensions/core/ — Old frontend script entry points. Custom nodes still hitting them log a deprecation warning.
  • defaultInput on input options — Deprecated in v1.16 frontend in favor of forceInput. See comfy/comfy_types/node_typing.py.
  • comfy.utils.PROGRESS_BAR_HOOK — Replaced by comfy_api.latest.Execution.set_progress. Old hook still works via main.py's hijack_progress.
  • The V1 INPUT_TYPES / RETURN_TYPES style — Coexists with V3 schema. Not removed; new nodes lean V3.

Major rewrites

  • Frontend extraction (Aug 2024) — see above.
  • DynamicVRAM (2025) — replaces ModelPatcher with ModelPatcherDynamic on supported setups.
  • Quantization layer system (2025)MixedPrecisionOps + QuantizedTensor introduced a new "ops mode" alongside the legacy disable_weight_init and manual_cast paths in comfy/ops.py.
  • comfy_api/ surface (2024-2025) — pulled custom-node-facing types out of nodes.py/comfy/, made them versioned, and separated the public surface from the internal one.

Growth trajectory

  • Jan 2023 — One file. One contributor.
  • End of 2023 — Multiple model architectures, custom-node loader, queue-based executor.
  • Aug 2024 — Frontend extracted.
  • 2025 — Asset DB, paid-API nodes package, formal comfy_api/ surface, V3 node schema.
  • 2025–2026 — Quantization and DynamicVRAM rework.

The number of monthly commits crossed 100 in mid-2025 and has hovered between 113 and 186 ever since. The contributor pool has grown well past the original solo author — though comfyanonymous still authors more than half of all commits (3,125 / 5,110 ≈ 61%).

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

Lore – ComfyUI wiki | Factory