4261f722ce4a9ce386cfd59068f2082fa987001e
ComfyUI Plugins
Starter infrastructure for developing custom ComfyUI nodes in this repository.
What is included
- ComfyUI plugin entrypoint in
__init__.py - Node modules under
nodes/ - Native image sizes node in
nodes/native_image_sizes.py - Local test setup in
tests/ - Python project metadata in
pyproject.toml - Development dependency file in
requirements-dev.txt - VS Code Python + Ruff defaults in
.vscode/ - Windows helper script to link this repo into ComfyUI:
scripts/link_to_comfyui.ps1
Quick start
-
Create and activate a Python virtual environment.
-
Install development dependencies:
pip install -r requirements-dev.txt -
Link this repo into your local ComfyUI installation:
.\scripts\link_to_comfyui.ps1 -ComfyUIPath "C:\path\to\ComfyUI"If a target already exists, replace it with:
.\scripts\link_to_comfyui.ps1 -ComfyUIPath "C:\path\to\ComfyUI" -Force -
Start ComfyUI and search for the node named "NativeImageSizes" in category "image/resolution".
Repository layout
.
├── __init__.py
├── nodes/
│ └── native_image_sizes.py
├── tests/
│ └── test_native_image_sizes.py
├── scripts/
│ └── link_to_comfyui.ps1
├── pyproject.toml
└── requirements-dev.txt
Running tests and lint
pytest
ruff check .
ty check nodes
Add a new node
- Create a new module in
nodes/, for examplenodes/image_nodes.py. - Define one or more node classes with ComfyUI fields such as:
INPUT_TYPESRETURN_TYPESFUNCTIONCATEGORY
- Export the class from
NODE_CLASS_MAPPINGSandNODE_DISPLAY_NAME_MAPPINGS. - Import and merge those mappings in top-level
__init__.py.
Notes
- The link helper script attempts a symbolic link first, then falls back to a junction on Windows.
- This repository is intentionally minimal and ready for expansion into multiple node modules.
Languages
Python
87.4%
PowerShell
12.6%