Any good resources for how to create as custom Node? #1291
Replies: 10 comments 3 replies
-
@ChrisFlick As far as I know there isn't really anything comprehensive. Luckily there is an example file in the custom nodes folder. The comments within the example code are very helpful. If you have Python knowledge, between that and the many examples out there in the wild, you should be good to go. Once you get a basic node working, you can also use javascript to enhance it. Things you need for a basic working node.
Optional:
That's basically it. 2 to 3 files in a folder will give you a good start. Then you can start experimenting with adding complexity. |
Beta Was this translation helpful? Give feedback.
-
Any simple examples of how to render custom html inside a node? Can one put a reactjs component inside comfyui node? I have something in mind to improve on one of the existing nodes usability wise |
Beta Was this translation helpful? Give feedback.
-
https://docs.comfy.org/essentials/custom_node_walkthrough |
Beta Was this translation helpful? Give feedback.
-
https://github.com/Suzie1/ComfyUI_Guide_To_Making_Custom_Nodes |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Conclusion: As example: There is also a JavaScript part for nodes, which contains as example the setting Btw: is there a documentaion for categories? |
Beta Was this translation helpful? Give feedback.
-
I'll throw this link in the mix: If you look over at this file: You'll note information about DESCRIPTION, and other keywords. You can also learn a fair amount by just looking at how base nodes are implemented. CATEGORIES is simple enough. The node gets put in whatever category you name, and if you put in a '/', it'll subcategorize. For example, in the custom nodes I've been working on: I put practically everything in "Sage Utils" first, so that all my nodes are in one place, then do subcategories, like Looking at other people's custom nodes and seeing how they implemented things can be pretty useful. You might also find some of the example custom nodes over here helpful: |
Beta Was this translation helpful? Give feedback.
-
Wow, great and thanks a lot !!! Finally the main thing I was looking for is in the JavaScript class nodeData itself. I'm finally at the point, where I can do the initialization as follows:
This way I'm not required to use the category and I'm free to define my nodes for "standard" categories, like "sampler", "viewer" or others. |
Beta Was this translation helpful? Give feedback.
-
Is there any documents for each datatype and functions in ComfyUI? |
Beta Was this translation helpful? Give feedback.
-
The official documentation is https://docs.comfy.org/custom-nodes/overview and below. Properties: https://docs.comfy.org/custom-nodes/backend/server_overview JavaScript Extensions: https://docs.comfy.org/custom-nodes/js/javascript_overview Worth looking for: ... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
scrounging the internet and finding very little to none
Beta Was this translation helpful? Give feedback.
All reactions