Creating Custom Nodes
Description
This introductory tutorial will show you how you can begin to create your own ComfyUI custom nodes.
We will build a basic calculator, which will demonstrate,
- naming your custom node,
- using various inputs such as string, float and a dropdown,
- calling a function,
- utilize output type matching to improve node output suggestions.
This is a free introductory tutorial on a very specialized subject. If you want to know more, then consider becoming a member of my SBCODE YouTube channel and I can continue to schedule and build more videos about these more specialized subjects.
Create the Custom Node
-
In your
ComfyUI/custom_nodes
folder, create a new folder namedComfyUI-Calculator
. -
Create a new file named
__init__.py
and copy/paste this code below, into it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|