Advanced Custom Nodes in ComfyUI with Python for Stable Diffusion Image Generation

preview_player
Показать описание
Learn how to create advanced custom nodes in ComfyUI using Python and advanced concepts like loading files and models.

In this video, I cover how to create advanced custom nodes in ComfyUI using Python. I go over concepts like creating a Python module, loading files and models from a folder, using pathlib to handle file paths, converting path objects to strings, and more.

Ideal for anyone looking to take their ComfyUI custom nodes to the next level.

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

[SUPPORT THE CHANNEL]

[Resources]

[SOCIAL MEDIA]

[PREVIOUS VIDEOS]

[TIMESTAMPS]
00:00:00 Introduction
00:00:46 Thank you Patreon supporters
00:01:03 Started a blog
00:01:31 Requirements
00:02:51 Navigating to ComfyUI Custom Node folder
00:04:23 Creating a custom node folder
00:06:42 Making a python module
00:08:56 Possible errors
00:09:37 The Project
00:10:21 Python OS vs pathlib library
00:10:51 Pathlib library
00:12:37 ComfyUI Root folder
00:13:49 Working with path objects
00:15:28 Creating dummy model files
00:16:20 List comprehension
00:20:08 INPUT_TYPES
00:23:05 Conclusion
00:23:17 Loading images
00:24:06 Loading text files
00:25:32 Custom nodes
00:26:17 Thank you to all subscribers
00:26:27 Have a nice day
00:26:28 I will see you in the next one.

Tags: comfyui, custom nodes, python, advanced, models, files, pathlib, code, programming, workflow, automation

Hashtags:
#ComfyUI #CustomNodes #Python #Advanced #Models #Files #Pathlib #Code #Programming #Workflow #Automation
Рекомендации по теме
Комментарии
Автор

Your explanations are clear as day: no fluff, just pure information. I wish more instructional videos were like yours. I'm in process of trying to sort out a Python message that keeps popping up when I try new nodes, and so I'm digging into the files themselves (in VS Code)... videos like this one will hopefully give me that aHA! moment nutting out those elusive problems. Joining your patreon!

robinhahn
Автор

thanks a lots for all your help, is really helpful and interesting

yvann.mp
Автор

great video! good and clear tutorial.... maybe a little suggestion :) the last past of this video is very fast compare to the beginning, i mean the list display on the node can be cropped to the file name itself and not the path for better reading. so maybe you are preparing the next chapter, it needs a 2d part to this video.... thanks, i am following you, bye

urieldeveaud
Автор

Thanks for this! I really want to explore adding to the front end with JS. Are you still planning to do videos on this? Or do you have any thoughts about where to look for resources about it?

chrisfreilich
Автор

Hi! Can someone tell me how I have to change it in my custom node: (folder_paths.get_filename_list("checkpoints"), so that in ComfyUI the list shows the subfolders first like with Pyssss Loader?

PinGuiNPL
Автор

Great tutorial
Please make a more advanced one on api/frontend/backend exchanging information between each other
There are no resources at all for these

Suresh-brzz
Автор

Hi,
I do not have the "Prep image for insightface" node. :(. What can do?

yuvish
Автор

I just started learning JS html css a couple months ago but I realized a lot of what I want to do is in Python (like this video) how would one approach this? Should I just keep learning JS until I’m solid then learn Python?

Sergatx
Автор

I want to make an iteration through models in order to make a series of pictures using simple model merging with a different merge ratio, it's something like cross-model XY-plot. Say, I have 10 models and I want to generate all pair merges of these models with ratios from 0.1 to 0.9 with step of 0.1, i.e. 10 (model-1 combintations) * 10(model-2 combinations) * 10(ratios) = 1000 pictures. Is it possible to do so?

muggzzzzz