Create Your Own Custom Nodes in ComfyUI

preview_player
Показать описание
Learn how to write custom nodes from scratch in ComfyUI using Python.

Hello everyone, in this video tutorial, I show you step-by-step how to create your own custom nodes for ComfyUI. We start by looking at the example node provided by default and understanding how ComfyUI loads and interprets custom nodes. We then build our own node from scratch, including defining the inputs, outputs, and processing function. Our custom node combines the positive and negative prompt encoders into one. Finally, we connect our node to sample an image, showing that it works!

Useful if you want to customize ComfyUI and streamline your workflows for Stable Diffusion image generation.

I appreciate if you can like and share the video if it was helpful.
Subscribe for more content soon!

[SUPPORT THE CHANNEL]

[PROJECT FILES]

[BUSINESS INQUIRIES]
For professional inquiries and collaborations, please contact me via email:
(Use this email for business-related matters only)

[SOCIAL MEDIA]

[PREVIOUS VIDEOS]

Timestamps:
00:00:00 Introduction
00:00:37 Understanding how ComfyUI loads custom nodes
00:02:29 ComfyUI default example custom node
00:03:53 Start ComfyUI with default example custom node
00:04:31 Testing the example node
00:06:05 Understanding the example python file
00:10:03 Node Class Mapping and Node Display Name Mappings
00:14:58 Making own custom node for comfyui
00:16:18 Make a custom node which holds positive and negative prompt in one node
00:17:22 Writing the python code
00:22:56 Initial testing
00:25:12 Where is the positive prompt
00:27:06 Wiring / Connecting custom nodes
00:30:46 Negative prompt and ClipTextEncode
00:32:24 Final Testing
00:34:05 More ideas
00:34:48 Impact Pack example
00:35:45 Let me know if you would like to see more videos on writing your own custom nodes
00:35:51 Thank you for watching this video.
00:35:56 I will see you next time.

Tags: ComfyUI, ComfyUI tutorial, comfyui custom node, python, custom node, text encoding, positive prompt, negative prompt, ai image generation

Hashtags:
#comfyui #tutorial #customnode #python #textencoding #positiveprompt #negativeprompt #aiimagegeneration
Рекомендации по теме
Комментарии
Автор

WOW!

You are an incredible teacher. I started with Stable Diffusion about a month ago after a year of Midjourney, and comfyUI was like black magic to me. I often got cryptic errors loading new things I got from the internet.

This AMAZING video gives me a good understanding of what is happening behind the scenes.

Thank you SO MUCH 🙏🏼

SebAnt
Автор

This is *exactly* what I was looking for! And yes, please: anything to help with Python would be gratefully learnt. In particular, understanding the errors that sometimes arise (I know - that would be a weeklong, epic-length video)... but just a few pointers on where to look for the source of the problem would help so much. I sincerely hope you keep making videos, particularly with a focus on the Python functionality - these are gold.

robinhahn
Автор

Very good tutorial, easy to follow and well structured, thanks.

yavalang
Автор

Very well done, many thanks!
I would love to see more on this, and would ESPECIALLY appreciate some clear and concise instructions, ideally including an overview, rules, and step by step instructions in as few words as possible, for use in prompting and AI assisted troubleshooting!.. 🙏🏻

ArielTavori
Автор

LOL! Just the info I need in case I end up writing my own "token counter" for giggles. Awesome info, keep the great tutorials coming!!! Thanks much!

kpr
Автор

Thanks a lot for the very thorough, well organized and informative introduction to custom nodes. Thumbs up!

jtk
Автор

Thank you so much for your course, it helped me a lot. I was SURPRISED to see this video. Hope you can continue to persevere. I'm sorry for my English. thanks for the tutorial!!!!!!!!!🙏🙏🙏

缱绻-il
Автор

This was a great tutorial. I felt like I was back in class. Excellent work. I do not understand python as well as cpp; but you made this particular application very easy to understand.

GARDNSOUND
Автор

thanks a lot for this great video. I was able to follow and recreate the node you did. I also made one of my own. Only thing I was struggling with was how to add inputs as inputs rather than them appearing in the widget. This seemed to be an issue with multi-line text fields.

michaelbayes
Автор

Thank you, very helpful vid. Your style of explaining is very clear and shows some of the pitfalls that might occur. That's always helpful.
I do have a question:
I made my first custom node a while back and I'd really like to make another node to compliment it. What I'd like to do is have a node that will take a STRING input from a prompt generator node and display the prompt in a multiline text field that's editable. In looking through the nodes I have I've not seen any node that can take one of its inputs and display it another of its inputs: In this case a "forceinput" text node to an editable multiline text field. If you know of how this can be done, or of a node that does this that I can examine I'd appreciate it.

glibsonoran
Автор

Vielen Dank für die gute Erklärung. Ein sehr gutes Video und eine angenehme Stimme.

thschied
Автор

nice, simple, and easily understandable ! thank you !

canibalcorps
Автор

Fantastic, thank you for the video hope you make more soon :)

impactframes
Автор

Very good!❤❤❤This video is very useful for me,you are a excellent teacher❤❤

venli
Автор

Don't learn to code "they" said lmao 🤣🤣🤣
Great video bro

devon
Автор

Awesome videos...

Can you create a tutorial on how ComfyUI displays text inside a node? I was able to figure out how to have a node display images but I can't get it to display text.

For example, take an input image, calculate the MD5 hash and then display the Hash as well as the image pixel dimensions.
I can output to a text output and that works fine. But when I try to use the "text" format to display in the self (output node true) node, it always error or no output.

Thank you!

MannyGonzalez
Автор

@Mindset2Work, I cannot find your comment to reply directly but I got an email notification. To close out of your current ComfyUI session, bring your terminal / Powershell / CMD window to the front and press and hold the control key (CTRL). While held down, press the "c" key on your keyboard. So the shortcut is CTRL + C. This will close ComfyUI server. Then to restart, you can press the UP arrow on your keyboard to get your last command back and press Enter. Hope you find this comment.

CodeCraftersCorner
Автор

Your vidéo push me feather in programing my own nodes but i'm locked because of lack of information and learning, where can i learn more about ?

canibalcorps
Автор

Hi, thx for that video, any chance to have something similar for javascript based custom nodes ?

DaVasQ
Автор

what are you using for your pipeline connecting your nodes together mine curve and i don't like it..

a.iwizard