ComfyUI
ComfyUI copied to clipboard
docs(custom node dev): implement
Hi!
I want to develop a new custom node. But I found that there aren't official docs for it. May I ask it?
Thanks :)
Unfortunately, there is currently no developer manual available for custom_node creation. Instead, you can refer to other extensions as guides.
For single-file extensions, you can refer to the following: https://github.com/comfyanonymous/ComfyUI_experiments
To understand the structure of node creation, the following can be helpful in understanding how each node is organized: https://github.com/comfyanonymous/ComfyUI/blob/master/nodes.py
However, to enable update management through ComfyUI-Manager, it is recommended to write it in the form with __init__.py, similar to the following extension:
https://github.com/BlenderNeko/ComfyUI_TiledKSampler
One common mistake to point out when creating a custom node for the first time is that the return type should always be a tuple. Even if you are returning a single integer value, it should be returned as (1,) to be considered as the correct return for the node.
ps. And if you need help related to development, there are many developers on the Matrix channel who can assist you.
https://app.element.io/#/room/#comfyui_space:matrix.org
@ltdrdata A kind and detailed guide :) Thank you very much!