This is the ComfyUI custom node template repository that anyone can use to create their own custom nodes.
Project-Name/
├── .github/ # GA workflow for publishing the ComfyUI registry
├── workflows/ # Example workflows for your custom node
├── modules/ # Your own modules for the custom node
├── .gitignore # gitignore file
├── __init__.py # Map your custom node display names here
├── nodes.py # Your custom node classes
├── README.md # README file
├── pyproject.toml # Metadata file for the ComfyUI registry
└── requirements.txt # Project dependencies
This file is where your actual custom node classes are defined. The class has specific methods that are called by the ComfyUI engine. There're some basic custom nodes for the example with some comments, you can modify them as you need. For detailed information on how to create custom nodes, please refer to the ComfyUI official documentation:
You can map your custom node display names here. It will be used when users search for your custom node in the ComfyUI.
This file is used to publish your custom node to the ComfyUI registry. If you want to publish your custom node to the ComfyUI registry, you need to modify this file.
If you wonder what ComfyUI registry is, please read:
This file contains the dependencies needed for your custom node. torch
is already installed in the ComfyUI, so you only need to add "extra" dependencies here.
This is optional, but it is recommended to put your ComfyUI workflow json file inside your project so users can easily understand how to use your custom node.
When you push into the master
branch, this workflow will be triggered and publish your custom node to the ComfyUI registry, using your pyproject.toml.
You have to register your "REGISTRY_ACCESS_TOKEN" in the Github Action Secrets which you can get from:
After generating the repository from this template, uncomment the push to enable the workflow with auto trigger:
There are some basic templates for the Github issues & PR. You can edit them or add more to fit your project's needs.
-
Issue Templates:
- bug_report.md : Basic bug report template
- feature_request.md : Feature request template
-
PR Template: pull_request_template.md
Click "Use this template" -> "Create a new repository", then you can create your own custom node from there.
The custom node installation guide below can usually be used for any custom node, you can use it in your README by modifying the repository name and URL.
- git clone repository into
ComfyUI\custom_nodes\
git clone https://github.com/replace-this-with-your-github-repository-url.git
- Go to
ComfyUI\custom_nodes\ComfyUI-Your-CustomNode-Name
and run
pip install -r requirements.txt
If you are using the portable version of ComfyUI, do this:
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-Your-CustomNode-Name\requirements.txt