How to make your own custom ComfyUI nodes

  Рет қаралды 19,553

Cody The Software Engineer

Cody The Software Engineer

Күн бұрын

Пікірлер: 53
@patMacom
@patMacom 6 ай бұрын
Coming from over 2 decades of coding - I have to say that you have one of the best (and accurate) perspectives on coding that I've come across in a long while. Appreciate you greatly
@codysoftware
@codysoftware 5 ай бұрын
Thank you!
@HistoryIsAbsurd
@HistoryIsAbsurd 8 ай бұрын
I like the small bit at the start where you gave tips and encouragement. Im only a few months into it and little hints like that really do help.
@Foolsjoker
@Foolsjoker 9 ай бұрын
I would love to see break downs of what the existing nodes actually do. Like going through its code and seeing their input to output explained. Might help gear some ideas on what we could customize, or modify ourselves.
@codysoftware
@codysoftware 9 ай бұрын
Great idea! I'll add this to my list :)
@done.6191
@done.6191 9 ай бұрын
Really liking this so far. I’ve reached the point where I have such specific node needs that only custom can do it. I’ve started small and cobbled together some small nodes but trying to level up. Thanks!
@sidheart8905
@sidheart8905 10 ай бұрын
I have been doing my own nodes in my local, but i find your video still good, thanks a lot for taking efforts for the video... i am too lazy to make something like this, hope you get lots of views and subscribers :)
@Vhourgannox
@Vhourgannox 10 ай бұрын
Thanks loads for this tutorial. This is literally the only coherent explanation I could find on how to make a custom node. I've taken an introductory python class, so I've written some code myself and even made a couple of really basic one-file programs (mostly just complicated specialized calculators), but trying to decipher the example_node.py.example just gave me a headache. I couldn't figure out what the code was doing because I didn't know what ComfyUI was doing outside of that one file, and following the directions in the example was like trying to have a conversation in Spanish after spending a month using Duolingo; I could vaguely see what it was supposed to do in some chunks, but I was missing important pieces and couldn't put the whole thing together. I still don't feel like I can breeze through this, but I definitely feel like you've given me enough of a shove in the right direction that I can probably get it to do what I want with some experimentation. I also never knew GPT could give me coding advice, so I'm definitely going to use that now. Thanks again man.
@codysoftware
@codysoftware 9 ай бұрын
I'm glad you found the video helpful! You're exactly the type of person I'm looking to help with my videos. Let me know what else you'd like to see!
@swannschilling474
@swannschilling474 10 ай бұрын
That is really nice!! So little on this is out there!! 😊
@MetalMakeover
@MetalMakeover 9 ай бұрын
I have something useful for you to use your programming skills to produce, a GUI for making CompyUI custom nodes. Whoever made Comfy should have made one but they didn't. You should be able to bring up a blank node and then have a thing for putting inputs and outputs on it and titling the node and labeling the various parts by simply typing them into a box, and eventually exporting the node as a package. There's a program called Channer, which seems to be what Comfy was based on. In Chainner you can browse to, and load into a node, models in different formats, like pth, onnx and ones that have param and bin sets, like in RealESRGAN portable. You can't do that in Comfy, to my knowledge. I can't load a RealESRGAN model into Comfy but I can in Chainner, I'd like to have a Comfy node to do that. How could a Chainner node be "ported", or whatever you would call it, over to being a Comfy node? That would be a handy converter to have. You can do a lot of things in Chainner, it's a very extensive image program. What you could do is make GUI that looks like Chainner, or Comfy, but it's just a node editing GUI. Something about Chainner, it's not on a web browser, it has its own screen.
@glibsonoran
@glibsonoran 10 ай бұрын
Nice video thank you for taking the time to do this.
@daniel99497
@daniel99497 10 ай бұрын
Good tutorial, do more !
@codysoftware
@codysoftware 10 ай бұрын
I'm thinking about it! What would you like to learn?
@daniel99497
@daniel99497 9 ай бұрын
@@codysoftware The struggle iam having right now is dealing with masks image torch tensor compatibilities , how to convert np to tensor in a way that is expected, what outputs are expeted of IMAGE or MASK that whats stopping me the most on creating nodes, i never know the best aproach
@basementadmin
@basementadmin 6 ай бұрын
Thank you. Great stuff
@TheMaxvin
@TheMaxvin Ай бұрын
You are well done. Where should I put the my file(new node) itself so that the Comfy can take it?
@gordonbrinkmann
@gordonbrinkmann 9 ай бұрын
Nice, maybe I'll make some custom nodes now. So far I've just edited some existing ones to my liking. By the way George Boole was of course an Englishman as the name already suggests, not a French guy.
@codysoftware
@codysoftware 8 ай бұрын
So he was - I stand corrected!
@brothachris
@brothachris 9 ай бұрын
Great tut! Thanks :)
@reginaldli5218
@reginaldli5218 5 ай бұрын
how can I call other developed nodes by community in my own node scripts?
@impactframes
@impactframes 10 ай бұрын
Good video. Thank you
@Clupea101
@Clupea101 10 ай бұрын
Great Insight
@certainframe
@certainframe 8 ай бұрын
Thanks Cody. Very good tutorial. Any idea how to attach a debugger from VScode and set breakpoints?
@certainframe
@certainframe 8 ай бұрын
I’m trying to step through some comfyui code to understand how it works
@codysoftware
@codysoftware 8 ай бұрын
That's a very good question! It looks like it's theoretically possible. I'll add that to my list of videos to work on :)
@GREATMAGICIANLYNEY
@GREATMAGICIANLYNEY 10 ай бұрын
I believe this is going to be very helpful to me when I start digging into it-- Thank you! This question misses the point of your broader message entirely, I understand, but I tried to use the node you created and realized that my latent image node does not have a height or width inputs. Am I using the wrong latent image node, or has ComfyUI updated since you created this video three weeks ago? Not a huge issue as it is, like I say, tangential to your broader purpose, but I just found that curious.
@codysoftware
@codysoftware 9 ай бұрын
ComfyUI hasn't updated significantly since the video came out, so it sounds like the "Empty Latent Image" node should be the one you're looking for. Make sure the one you're using is the same one described in the community manual here: blenderneko.github.io/ComfyUI-docs/Core%20Nodes/Latent/EmptyLatentImage/
@GREATMAGICIANLYNEY
@GREATMAGICIANLYNEY 9 ай бұрын
@@codysoftwareThank you Cody
@xiaozhengwu5780
@xiaozhengwu5780 11 ай бұрын
could you post your code? thanks!
@codysoftware
@codysoftware 11 ай бұрын
Added to the description
@yadav-r
@yadav-r 9 ай бұрын
Can you please teach us how to download image from ComfyUi using api.
@ultimategolfarchives4746
@ultimategolfarchives4746 9 ай бұрын
You can find a pretty str8nforward exemple in the project. Just follow it. /comfyui/script_exemples/basic_api_exemple.py
@zablok69
@zablok69 9 ай бұрын
looking for someone to write custom nodes for me - paid.
@wgxyz
@wgxyz 8 ай бұрын
Hey i was wondering if its possible for us to lock comfyui nodes with an activation license? Anyone interested in building this for me hit me up
@dflfd
@dflfd 7 ай бұрын
dude, its an open source project. doubtful that you can hide the source. plus it goes against the community spirit. might even violate the license.
@makadi86
@makadi86 5 ай бұрын
thank you very much but plz next time define the people you are talking to, making a video for both programmers and non programmers is not a good idea at all. it will be very boring for programmers, and very hard to non programmers.
@11704187
@11704187 Ай бұрын
Put it in your custom_nodes directory! 8:18
@AIAngelGallery
@AIAngelGallery 5 ай бұрын
thank you so much, i was trying to find way develop my own custom nodes and i found this clip. perfect for me
@buxsin
@buxsin 9 ай бұрын
hi Cody.. you need a better microphone. whatever rode mics would be fine... Since i am interested in coding i am subscribing to suport you...Good luck with your streams... ❤❤🌹🌹
@codysoftware
@codysoftware 8 ай бұрын
I got a new one! Check out my more recent videos and tell me how I sound :)
@Luxcium
@Luxcium 7 ай бұрын
8:30 ok but I am on my mobile phone and 😮😮😮😮
@xueqinghuang5021
@xueqinghuang5021 11 ай бұрын
great tutor for comfyui nodes, thx!
@robinhahn6987
@robinhahn6987 10 ай бұрын
Thanks for this, Cody... I've been wanting to sort cobble my own for a while now, but didn't know where to start. You showed not only where to look but how to nut out what you're looking at. I've written custom stuff for Blender so some of this was basic, but I did watch it all the way through because you did such a good job explaining stuff. That @classmethod stuff also exists in Blender and I never really figured out what it was, exactly. Thanks again - hope you make more videos! Subscribed 😊
@robinhahn6987
@robinhahn6987 10 ай бұрын
BTW, I noticed others were also asking for more videos on custom node development. I haven't had much of a look at ComfyUI's API, but I'm sure there are libraries to import (noticed you imported 'math') that would give rise to explaining how to read APIs, for example, in order to take advantage of those libraries. Dunno - would that be a bit advanced, maybe? Personally, I want to do conditional switches - I know, they already exist, but still. Python is such an awesome language - the possibilities are limitless! 😮
@aylictal
@aylictal 2 ай бұрын
@@robinhahn6987 math isn't a part of comfyui, its a library you can include from python itself.
@blender_wiki
@blender_wiki 9 ай бұрын
Great content, highly raccomented tutorial. However if you are already a programmer you must listen to this at 2x because it is a bit too "for beginners"
@falconbmstutorials6496
@falconbmstutorials6496 10 ай бұрын
4:00 that's very kind and encouraging! I appreciate that! You need to explain that the initial file inside a custom node folder should be named "__init__.py" else it will not be recognized by ComfyUI
@Suresh-br2zz
@Suresh-br2zz 8 ай бұрын
thanks chief
@Guus
@Guus 8 ай бұрын
Awesome ❤ thank you
@torealise
@torealise 9 ай бұрын
Thank you!