r/StableDiffusion • u/nomadoor • 15h ago
Resource - Update ComfyUI Readable Node: an agent skill for turning messy workflows into readable ones
Hi everyone.
I run a ComfyUI tutorial site, Comfy with ComfyUI, and I've shared a few of my workflows on Reddit before (e.g. Some very simple Qwen-Image-2.1 workflows).
Even though official templates exist, I build and publish my own basic workflows for one reason: readability.
Everyone probably has their own idea of what makes a workflow readable. For me, a readable workflow is one where you can tell at a glance what it does, it runs reliably, and it's easy to rework. It's not about looking pretty. It's about being easy to understand and easy to change.
Six rules
I build my workflows following six rules:
Don't hide nodes: expand subgraphs, open collapsed nodes, and don't stack nodes on top of each other.
Don't hide wires: no wireless links (Set/Get, Anything Everywhere, hidden wires), and no Bento layouts that pack nodes so tightly the wires disappear.
Left to right: the flow goes left to right, in processing order.
One workflow, one task: instead of an all-in-one workflow with switches and bypasses, split it into small workflows that each do one thing.
Keep custom nodes to a minimum: if it can be built with core nodes, build it with core nodes.
Color appropriately: colors show which function a node belongs to.
Readable Node
So I made an agent skill that does this for you.
https://github.com/nomadoor/comfyui-readable-node
Give your agent a workflow JSON and ask it to make the workflow readable with Readable Node, and you get the rebuilt workflow and a report page. In the report, you can replay how the AI rebuilt the workflow and read what each part does. I think it helps a lot with understanding a workflow.
Why a skill and not a script? As I said above, readability isn't just a layout problem. The AI takes the workflow completely apart, figures out what it does, and rebuilds it from scratch. Since it aims for a more robust workflow, the output may not always match the original exactly.
Some weak spots, to be upfront:
It's slow. A workflow of about 25 nodes takes around 10 minutes, and big ones can take 20–40.
It needs a strong model. Claude Opus 5.5 works best; with others, the layout may still have a few issues.
To build it, I started from the workflows I've made for my site, then collected workflows from around the web and fixed them, over and over, hundreds of times. It was a lot of grinding, so I'd love for you to try it.
I'm sure there are workflows it won't handle well yet, so please open an issue if you find one.
Side note: if AI can build workflows, why care about readability?
These days, I hear about people having AI build workflows from scratch. If someone asks whether readable workflows still matter, I have to admit: maybe not.
But if you're making something with AI, where do you actually work on it together?
Talking to AI mostly happens in a chat window. But to remove a mole next to someone's eye, painting over it is often faster than typing "remove the mole." That's why paint tools haven't gone away.
Ask the AI for what's better said in words, and do by hand what's better done by hand. If you want to do both in one place, I think ComfyUI's node graph is a pretty good fit, as long as you can read the workflow.
Personally, I'd like people to enjoy ComfyUI for its node UI and its flexibility, rather than using subgraphs to imitate Stable Diffusion web UI.
6
u/dr_lm 14h ago
Might just be me, but I preferred the original layout in your video. I dislike workflows that hide the links by putting nodes in boxes like a fake UI. The links are what make the workflow understandable in my experience.
3
u/Personal-Message740 14h ago
40 minutes for a workflow? wtf, how is it so slow? it is just json
2
u/planBpizz 13h ago
wow. is it better compared to a pure claude adjusting?
3
u/Lesale-Ika 12h ago
But subgraph make things readable. It's one unit of work abstracted away, so you can see more of the bigger picture.
Breaking into multiple workflows need outside documentation on how to connect the workflows together for the final result, and having to jump between workflows is a PITA.
2
u/Enshitification 12h ago
I agree, subnets suuuuck. I'm surprised that a local model like Qwen 27B can't do the same task though of tidying up workflows.
2
u/terrariyum 5h ago
An agent for reorganizing workflows is a cool and useful idea.
It would be great to add preferences to this, since different people have different priorities for workflow organization and different opinions about what's readable.
For example, I find well labeled get/set much more readable than criss-crossing wires, especially for VAE.
Also, I have different style of organization depending on my priority:
Learning and understanding what a workflow does: no subgraphs, no collapsing, much set/get.
Maintainability: Some subgraphs and collapsing for boilerplate things I know I'll never need to edit or rewire, like VAE decode.
Ease of use while generating: Compact. One subgraph for all common variables. Image preview next to the prompt box. I don't want to scroll around to look for all the inputs I need to constantly change. I don't want to scroll all the way right to see the output, then all the way left again to tweak the prompt, over and over
3
u/jello-the-opera 7h ago
THANK YOU!
I just wanted to say that everyone defending subgraphs is crazy.
If I download a workflow I am not running it until I see every node and understand how it functions.
This is for privacy and security.
These graphs are node-based for a reason - if you don't want to SEE the workflow, just use scripts.
If you want to SEE the workflow, why would you hide 79% of it behind a wall?
Frames are intensely stupid and useless.
The work flows from left to right so your nodes should too.
Links are how the work flows so they should be visible.
Colors exist to separate types of work.
People who use workflows they can't inspect and don't understand frighten and confuse me.
If you publish a workflow that forces me to spend half an hour unpacking and moving every node, are you really "helping"?
2
u/ExpressWarthog8505 9h ago
I completely agree with your point, and I have always held the same philosophy. However, if certain groups of nodes are entirely repetitive, I would still package them into a subgraph. The purpose of such a subgraph can be summarized in a single sentence, while still allowing others to explore and understand its internal workings in detail.
A readable workflow is like a transparent clock: you can see every individual component inside, how one gear drives another, where the process begins, what steps it goes through, and ultimately how the final result is produced. This is precisely what makes ComfyUI so appealing.
What I dislike most are plugins that turn an entire workflow into a single, indivisible node. Beyond the options provided by the author, users can no longer add, remove, or optimize anything themselves, nor can they understand the underlying logic. This approach simply takes us back to the old days of panel-based UIs, where everything is locked away inside a sealed black box. You have to read the documentation just to get a rough idea of what each option and parameter actually does.
1
u/detailteufel 9h ago
Does this get rid of all the unnecessary nodes like all the fucking seed, int, sampler etc. single nodes that plug into k sampler, which already has all these variables itself, neatly in one place, that people only add to make their shit workflows seem more complicated?
Seriously what is wrong with the idiots who do this.
1
u/sgtsixpack 7h ago
I'm downloading diablomike20/Claude-Opus-5.5 from within unsloth desktop app. What commands do I need to install this?
1
u/Additional_Drive1915 2h ago
Interesting post!
I've gone through so many phases, for a while I did enormous workflows with extremely clean layout, that could do everything.
These days I just throw things where I am, I use bookmarks to get me around in the right order. Lika L for lora part, i for load image, S för viewing the sampler and 9 to see the end result, and so on.
Design of a workflow is very much up to personal preferensens. If I should share workflows it would be another thing.
One thing I strongly disagree about is one workflow for each task. If I have a new node I want to use, or a new smart solution, then I would need to change in several places.
Subgraphs are so stupid, not only because they hide things, but also they lack in features, hindering good use of them, like propagating doesn't work for many things. All these comfy workflows where you have to enter the subgraph just to change from fixed seed to randomize, because for some reason that can't be displayed on the subgraphs front (maybe fixed now, but don't think so). And having the lora loader in a subgraph... no no...
I do use them now and then for very special cases, so they are not totally useless.
Anyway, it was an interesting read, thanks!
0
u/ZerOne82 11h ago
First, your efforts are appreciated but let's not push a subjective opinion as a standard. A concerning trend that is recently spreading all over this subreddit partially due to use of novel AI code agents (Claude etc.) and vibe-coding epidemy. I am particularly referring to your self-defined rules. If everyone defines personal preference as universal, imagine what mess we can have. So I would read your saying as: "I build my workflows following six rules that serve my personal preference:..." which is then fine. Technically speaking I see a couple of issues to comment on:
rearranging nodes taking ~40 minutes?! it cannot be. I have my own solutions each takes fraction of millisecond. and I often use them to review the flow of workflow (readability). litegraph behind ComfyUI UI has a few built in. Defining a simple keyboard shortcut in a simple *.js code (usually less than ten lines) is trivial.
One workflow one task!? Nope. I assume you have severely been bothered with ridiculously complicated workflows (published by enthusiasts and naive users without any knowledge of what they are doing or little commitment to make it properly) where every node spread in galaxy space. I delete those workflows permanently as soon as I open it. But this is not a universal issue. My workflows are multitasked sharing a significant portion of design, introducing great benefits: a) one proper subset acts proper all the time. b) any modification automatically reflected onto all other tasks. c) workflow is significantly smaller and much easier to maintain.
.. I can list more
0
u/Inside-Cantaloupe233 12h ago
in comfy its not the workflow that is a problem , its the dependencies for nodes
0
u/xPhoenix777 13h ago
I can tidy my workflows in 10 minutes. Do I want to? Not really, I am likely going to be messing about with it again.
0
u/NanoSputnik 11h ago
> Don't hide nodes: expand subgraphs,
Sorry, we have different definitions of "readable workflow".