Open-Source Wikis

/

ComfyUI

/

Reference

/

Dependencies

comfyanonymous/ComfyUI

Dependencies

External Python packages ComfyUI relies on. The pinned list is in requirements.txt. Manager dependencies are in manager_requirements.txt. Test dependencies are in tests-unit/requirements.txt.

Runtime — required

Comfy Org packages

Package Pin What it provides
comfyui-frontend-package ==1.42.15 The Vue/TS frontend bundle served from web/
comfyui-workflow-templates ==0.9.63 Stock workflow templates
comfyui-embedded-docs ==0.4.4 In-app documentation
comfy-kitchen >=0.2.8 Comfy Org helpers used in the engine
comfy-aimdo ==0.3.0 DynamicVRAM scheduler. Imported in main.py and comfy.model_patcher

PyTorch

Package What it provides
torch Tensors and autograd
torchsde SDE samplers
torchvision Image transforms
torchaudio Audio I/O

The wheel selection (CUDA, ROCm, XPU, CPU, MPS) is the user's choice — the README documents per-vendor commands.

Numerical / ML

Package Pin What it provides
numpy >=1.25.0 Array math
einops - Tensor shape ops in model code
transformers >=4.50.3 Tokenizers, T5/Llama configs
tokenizers >=0.13.3 BPE/Sentencepiece via Rust
sentencepiece - Sentencepiece tokenizer for T5/Gemma/Llama
safetensors >=0.4.2 Safe serialization. The default checkpoint format
kornia >=0.7.1 Image processing (canny, morphology, …)
spandrel - Architecture-detect upscalers and friends
scipy - Stats and linalg helpers
Pillow - Image I/O
tqdm - Progress bars (used internally by some loaders)
psutil - Free RAM probe (RAM-pressure cache, model_management)
blake3 - Fast hashing for the assets system

Server / web

Package Pin What it provides
aiohttp >=3.11.8 The HTTP/WebSocket server
yarl >=1.18.0 URL parsing (peer of aiohttp)
pydantic ~=2.0 Schemas (used in comfy_api_nodes/ and asset routes)
pydantic-settings ~=2.0 Settings binding
requests - Synchronous HTTP (used by some legacy loaders)
simpleeval >=1.0.0 Safe expression evaluator for prompt math nodes

Storage

Package Pin What it provides
SQLAlchemy >=2.0.0 ORM for the assets system
alembic - Migrations
filelock - Cross-platform DB lockfile
pyyaml - extra_model_paths.yaml

Media

Package What it provides
av Video / audio container I/O (PyAV)
PyOpenGL OpenGL bindings for GLSL preview/postprocess
glfw Window/context creation for OpenGL

comfy_extras/nodes_glsl.py is the main consumer of PyOpenGL/glfw — the GLSL shader runner.

Optional / manager

manager_requirements.txt is just:

comfyui-manager

Installed only when the user wants the Manager.

Test-only

tests-unit/requirements.txt installs pytest + helpers. Tests don't pull GPU dependencies — most tests skip when no GPU is available rather than failing the build.

What ComfyUI does not depend on

A few things that are notably absent and are sometimes installed per-need by users or custom nodes:

  • xformers — used if installed (auto-detected) but not required.
  • flash-attn, sageattention — used with --use-flash-attention / --use-sage-attention only.
  • torch_xpu, torch_directml, torch_npu, torch_mlu — Intel/Microsoft/Ascend/Cambricon-specific PyTorch extensions installed by users with that hardware.
  • huggingface_hub — only needed for some custom nodes; core never auto-downloads from HF.
  • diffusers — supported as an input format but not as a runtime dependency.

License

ComfyUI itself is GPL-3.0 (LICENSE). Most direct dependencies are MIT/BSD/Apache. Some optional vendored chaiNNer code under comfy_extras/chainner_models/ carries its own license — preserved in-tree.

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

Dependencies – ComfyUI wiki | Factory