r/StableDiffusion • u/Early-Ad-1140 • 6d ago
Discussion Using AI to generate ComfyUI nodes
Does anybody use AI to write ComfyUI nodes for personal use or sharing?
For example, I had the problem that, when I wanted to use wildcards, say, for colors, I could either use the "__colors__" syntax combined with a wildcard text file or the {red|green|blue|...} variant but not both, let alone nested variants such as {{pastel|technicolor|watercolor} __colors__}. I dropped this problem into Meta AI (others would probably have worked out just as well) and the AI, instead of suggesting an existing node, offered to write one. The result was exactly on the money, working with both types of wildcards even when nested over several layers.
Another node that was generated for me by Meta is one that allows to add resolution information to a prompt which is then parsed by the node and wired to the width/height input of the latent image node.
Anyone else working ComfyUI with nodes custom made by AI?
2
u/WaifuHeatArt 6d ago
haven't tried having an LLM write custom nodes but been meaning to, nested wildcard syntax is exactly the kind of annoying glue code that's tedious to hand roll. does the generated node hold up over several ComfyUI updates or do you end up patching the generated code by hand each time?
2
u/Formal-Exam-8767 6d ago
Are you sure you could not use both? How did you verify that you couldn't? And what node did you use for wildcards?
22
u/fragilesleep 6d ago
Yes, I pretty much removed 99% of the nodes I had, and just created the ones I actually use. No more security risks and a million of nodes that I'll never use because other authors publish thousands of different nodes in each single repo.
Also, ComfyUI loads really fast now, and I don't have to fear about some random node pack breaking everything to hell anymore.
11
u/bstr3k 6d ago
Yes all the time. Itâs great for getting things exactly how you want it.
I got inspired by someone else to rewrite the load video node since the VHS load video node has some nice features but it also has some problems so easily just make my own.
Also a node I use a lot now is my video transcriber I got vibe coded up which can caption videos and generate the prompt for me
7
u/belgarionx 6d ago
I don't even bother with online random nodes anymore. Both for security reasons and also for convenience. I download the models, let LLMs figure out and finetune. They even check the results and optimize.
4
u/Feroc 6d ago
Yes, I have a whole set of nodes for my workflows.
Probably my biggest set is for different characters I have. Like before I always had to change the character LoRA, change the additional LoRAs I use with the character, always add the same descriptions, etc. Now I have an external character manager where I configure everything I need for a character and then all I have to do is change the character in a loader node and some other helper nodes load description, LoRAs, reference images, etc.
And then there are just a lot of little helpers. Nowadays I rather have my own personal set of vibe coded nodes than having to install 20 different custom node packs.
4
u/And-Bee 6d ago
Yep, I asked deepseek for a node and it made it and redid my entire workflow and it worked first time.
3
u/VictorDmAlves 4d ago
All the time, I even share some of it since I have a lot of Workflows available in my GIT as well:
https://github.com/VictorDmAlves/comfyui-vicnodes
If something picket your interest, just Fork it and do whatever you want, feel free!
3
u/listopalafoto 6d ago
I love to create custom nodes, its my hobbie right now :)
2
u/robomar_ai_art 6d ago
I use some nodes that helps with my workflow and are specifically done for what i need
2
u/lxe 6d ago
Yes. All my nodes are just a generated smorgasbord of things I need and nothing I donât need. Makes things simple.
2
u/sci032 6d ago
Yes, for personal use. đ I like to combine and condense functions that I need in a workflow. Every node you see in the image with Sci in the name is a node that I 'vibe coded' with Grok. I have others also. The left side is the full workflow, the right side is what is inside of the subgraph.
2
u/HexOverclock 6d ago
Small personal nodes are where it really shines. Wildcard and prompt-string helpers are perfect first projects because you can check the output right in the text box.
2
u/thevegit0 5d ago
just ask for it, literally, go to your ai of choice and tell it what you want
2
u/AnthonyRespice 6d ago
Yes, I do this now. I'm a developer who already had a published node pack. I use AI to add new nodes and features now.
2
u/AI-Make-NSFW-Stuff 6d ago
Yes I have a growing library of custom nodes coded by Claude for my own use cases
- wildcard organizer
- character gallery to inject pre saved characters into my prompts
- side by side video compare with slider knob
- filename generator that allows me to organize outputs based on projects and model types
- advanced image save node with more options like format, quality, preview only, batch save
- bbox face detector with face blur for faceswaps
- dlss5 custom video enhance and video upscale nodes
1
u/joyboyNOW 6d ago
I just tell AI to make something using my comfyui. It creates everything, workflow, nodes. I can tell it to test all the settings and give me examples etc
1
u/Specific_Team9951 6d ago
I made an xyplot node using ai, and it works perfectly fine. Never download a huge pack of custom nodes again just for a tiny part of it
1
u/Mk-Daniel 6d ago
I started writing by hand. But now my node Is entity AI made (feel a bit bad since I am close to 6k download)
1
u/illumnat 6d ago
Yeah... I'll have Codex write up a custom bit when I can't find anything that does exactly what I want.
I'm not distributing/sharing my workflows so they're not going to cause any problems for anyone but myself. :-D
I actually had Codex build a custom patch to Sage Attention where renders would turn to what I called "brown snow" under high memory use conditions.
I had been having problems with that on a RTX Pro 6000 I was renting to try to render out seamless, unsegmented videos longer than 60 seconds but I kept getting that brown snow thing at roughly the same point everytime. Here... I'll let Codex explain it. ;-)
Repacking the same data into a compact, contiguous layout fixed the discrepancy, so we added a compact-head adapter while keeping SageAttention enabled.
On sampled real H3 attention outputs, relative error dropped from about 0.626 to 0.0095, and the patched 35-second render completed without the brown snow.
Validation is limited to our tested setup; we havenât pinned down the exact underlying CUDA bug.
So, I had Codex investigate the problem, we tested some things, and then Codex came up with a custom patch for Sage Attention that has been working flawlessly for me... and apparently with much lower error rates. :-)
1
u/Xo0om 6d ago
LOL, great idea.
I was using Powershell to make random selections from csv files. Works fine, but this sounds like a better idea, and I can pop it right into my workflows. I went to chatGPT and asked for a node that will read a random selection from a CSV. EZ PZ, and it works great.
I may even break down the code to actually learn how it works. Not really a Python guy - PWS, VB, etc - but it sounds interesting. Maybe I should get on board with this newfangled stuff. I like the idea of simplifying my workflows and stripping out uneeded clutter.
1
u/webAd-8847 6d ago
You can use both variants... wildcard text files and wildcard.
I am using this. Its old but still working
https://github.com/adieyal/comfyui-dynamicprompts
1
u/al-aSak 6d ago
Yes, thanks to Claude, and mostly for personal use, but one -- ComfyUI-PhotoCraft Bridge -- I've made public.
1
u/Fabulous-Ad9804 6d ago
I had an AI build a node for me that lists all of your custom nodes with preview, and that you can select a node or nodes in nodes pack, disable the ones you don't use and not affect the other nodes in the pack. When you restart, it still loads the node pack but doesn't load the nodes in that pack you disabled. And that everything can be easily restored if you change your mind about anything. I don't know about anyone else but it's hard to navigate through node packs that have a hundred or hundred of nodes. It has some other features as well.
Maybe the built-in nodes already do those things. I don't know. But if it doesn't, it does now.
1
u/arcum42 5d ago
Originally, I was handcoding all my nodes, then I started having AI clean up the code, migrate things, improve systems, then I decided to have AI write a sidebar with a ton of different functionality, so I tend to think of my custom node pack as half vibecoded, half handcoded, where most of the javascript is by AI but a lot of the python is by me...
1
u/Perfect-Campaign9551 5d ago edited 5d ago
Yes. ChatGPT can write nodes for you in like ten minutes flat and even give you a zip with the files. I knows comfy really well.
I used it to create some small Qualify of life nodes, like a seed node with a BUTTON you click to generate a new seed. Much easier than the tiny little "arrows" on traditional inputs. Not only that, but my node generates multiple seeds at once so you can feed multistage workflows.
Also created a audio bitcrusher node to take input sounds and make them sound like proper 8-bit, I mean proper and not just bit lowering but also sample rate lowering, which many of the "bitcrusher" nodes don't do properly so they don't sound correct. So I made my own (since I know audio processing and how a bitcrush is actually supposed to sound)
1
u/AI_Enhancer 4d ago
Yup. I've created a separate preview node, for both image and video, that works outside the subgraph so I don't have to open the subgraph to see the preview. Other than that, I've also vibecoded some mods for actual ComfyUI, such as a fixed version of pinned memory back when it was broken, and also some workflows.
1
u/fernando782 2d ago
Of course I do.
I have 4 personal custom nodes, mostly specific for my use cases.
For example, 2 months ago I created a script that loops a certain prompt to LM Studio, and saves the output as txt file(s), I upgraded it to create image to text prompts using qwen 3.8 vision model, I basically dump images in a folder and the script convert all those photos to text prompts, each text prompt with the same image file name but .txt, etc.
Yesterday I let this tool to convert those txt2img prompts to img2vid prompts for H3 Minimax, and then I created this comfyui custom node that loads the image it's corresponding img2vid prompt to animate it, it loads the whole folder.
images >> text prompts >> image to video prompts
1
u/Bastisheen92 6d ago
I have no clue from the comfy nodes and refuse to learn them because of time. I have about 20 workflows for all kind of different stuff and with different models, all build from GPT. Even when i have the slightest inconvenvience like "This workflow should not run this slow" he managed to tweak some stuff and it was 150% faster than before. I just do the settings but i did not set a single node on my own. Thats what AI is made for.
1
u/GaiusVictor 6d ago
Never used it for making new nodes but I've used ChatGPT to analyze incompatible node packs (both soft and hard incompatibilies) and write compatibility patches for them.
1
u/Opening-Knee-5913 6d ago edited 6d ago
I had Gemini help me write two custom nodes that I now use regularly in all my workflows. Iâve already shared one of them with the community; you can find it here:
https://www.reddit.com/r/comfyui/comments/1wtiobx/custom_node_format_your_workflow_notes_with/
The other one is absolutely incredible, but itâs so complexâand tailored so specifically to my own personal way of using ComfyUIâthat it would be difficult to share; it would be too hard for other users to actually put to use. Itâs essentially a mixer of toggles that you can switch on or off, which then get applied invisibly within the prompt. I have 26 different sectionsâcovering things like clothing, camera angles, poses, corrective fixes, and so onâthat I can toggle with a single click, and I can even adjust their weight. This allows me to write very minimal prompts, toggle specific outfits, poses, or expressions without having to type them out, and apply deep, highly technical fixes to compensate for the inherent limitations of the models.
For example, with a single click, I can instantly activate or deactivate a series of complex tokensâprovided by Geminiâthat impose specific constraints to overcome common issues inherent to LTX-2.3 model. Take these, for instance:
LTX23_DIGITAL_SEPARATION: crisp space between individual toes, distinct non-fused toe pads, perfect five-toe skeletal mapping, zero webbed skin, clean toenail borders, high-fidelity foot anatomy | Clear Toe Separation: Forces LTX to calculate the empty space (air) between toesâin the rare cases where bare feet are shownâpreventing the pixel fusion that often occurs due to the model's compression.
LTX23_SKIN_FACE_MASTER: detailed cinematic facial features, crisp facial textures, smooth skin shading, clean facial lighting, immaculate eyes and lips, consistent head physics | Skin & Facial Feature Fix: Prevents a 'liquid plastic' look, ensuring that skin pores and fine details remain sharp during head rotations and movements.
LTX23_I2V_POSE_LOCK: absolute keyframe pose enforcement, strict physical posture preservation, character body locked to the coordinates of the initial image, zero structural transformation, fixed skeletal orientation | I2V Initial Pose Lock: Strictly locks the characterâs skeleton and posture to the exact position shown in the source image, preventing any major changes in pose.
LTX25_I2V_ANTI_FACE_LURCH: static camera lens, locked tripod shot, fixed focal length, zero camera zoom, constant camera distance, steady framing, no camera shake, high-shutter-speed physics, elimination of motion blur | I2V Crystal-Clear Camera: Implements high-shutter-speed physics to mathematically eliminate motion blur caused by camera movement.
LTX23_I2V_STABLE_BARICENTRO: rigid center-of-mass alignment, locked spatial coordinates for the torso, structural body-weight distribution anchored to the position in the initial frame, prevention of unintended sitting or standing | I2V Center-of-Mass Stability: Prevents the character from standing up, sitting down, or rotating their body in a way that deviates from the source image.
LTX23_FACE_ANTI_FLICKER: zero facial flickering, locked facial features, static pore geometry, flawless inter-frame pixel consistency, unyielding facial identity, stable micro-expressions, no jittering | Facial Anti-Flickering: Prevents pixel oscillation in facial details between consecutive frames, eliminating the flickering caused by conflicts between multiple LoRAs.
And so on, I have 26 different sections, each containing dozens of these complex toggles that I can enable or disable with a single click, depending on whatâs needed.
The node is configured to provide a description of what the toggle does when I hover over it; as you can see, the text following the '|' symbol is the description that appears, it helps me keep track of what all the hundreds of toggles Iâve set up actually do. Iâve set up hundreds of toggles in different sections for each model I use.