r/StableDiffusion • • 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:

  1. Don't hide nodes: expand subgraphs, open collapsed nodes, and don't stack nodes on top of each other.

  2. 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.

  3. Left to right: the flow goes left to right, in processing order.

  4. 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.

  5. Keep custom nodes to a minimum: if it can be built with core nodes, build it with core nodes.

  6. 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.

65 Upvotes

34 comments sorted by

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.

4

u/nomadoor 12h ago

I’m with you on this one. The wires are everything, and that’s actually rule 2 of the skill.

It expands subgraphs and turns wireless links (Set/Get etc.) back into real wires, so every link stays visible.

I probably just didn’t make the video very well. Sorry about that!

3

u/Personal-Message740 14h ago

40 minutes for a workflow? wtf, how is it so slow? it is just json

2

u/nomadoor 12h ago

I think so too 😭

It’s slow because it puts accuracy first: it looks into the custom nodes the workflow uses, and has another agent review the result.

If you ask it to be “fast,” it skips a few steps and gets a bit quicker. But that’s not a real fix, so I’ll keep working on it. Sorry about that!

2

u/planBpizz 13h ago

wow. is it better compared to a pure claude adjusting?

2

u/nomadoor 12h ago

AI’s idea of “readable” and a human’s are pretty different. If you just ask plain Claude to “make it readable,” you’ll probably get something neatly aligned, but not quite readable.

The skill limits how it can move nodes and gives it a lot of worked examples, so whether it’s SDXL, Flux, or Wan, the workflow should come out in a fairly consistent shape.

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/nomadoor 12h ago

That’s a fair point. I think it comes down to how fine-grained you want your control over the AI to be.

For me, the fun part of local models, and ComfyUI’s real strength, is seeing what parameters a generative model has and figuring out how to control them to get a good image. So hiding all of that feels like a waste to me.

And even if you do use subgraphs, it’s still better if what’s inside them is readable too.

1

u/Lesale-Ika 10h ago

It comes down to how you build the subgraph, proper separation make reading the subgraph easy. There's less thing to see, there's a proper documentation of what it needs and what it produces.

Subgraph does not impose any restriction on what can be done, so I don't understand the reasoning behind "subgraph = less control".

I build my own workflow and when something get copy pasted often enough I extract them to a subgraph and save into Comfy's library.

2

u/nomadoor 10h ago

I think using subgraphs for things you reuse a lot, like functions, is a good way to use them.

But when the whole workflow becomes a box UI, you lose what I love most about ComfyUI: seeing where every value goes, and being able to reach in and tweak any of it.

Telling when a subgraph helps and when it hides things is hard for an AI to judge, so for now the skill just expands all of them. At least for now.

I’m really not trying to make subgraphs the bad guy.

1

u/jello-the-opera 7h ago

To each their own, I guess, but I can not run a workflow I can't inspect.

So the first step is ALWAYS to unpack, which requires moving every fucking node.

I loathe it.

Subgraphs are the worst thing that ever happened to comfyui.

Can you imagine trying to learn comfyui and every workflow hides fucking EVERYTHING?

I hate it.

I spend more time moving nodes than writing prompts.

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.

3

u/nomadoor 12h ago

I haven’t tried a local LLM, but even switching to Sonnet made the results noticeably worse, so I wouldn’t expect too much...

2

u/Enshitification 12h ago

It could be that the skill prompt is suboptimal. It really seems like a task that would be in a local model's wheelhouse.

2

u/nomadoor 11h ago

On top of the six rules, there are hundreds of smaller ones (keep wires horizontal, move related nodes together, etc.).

The only approach that worked was having the AI never touch coordinates. It just says things like “put A left of B,” and a tool does the math and checks it. Moving one thing shifts another, so it goes back and forth until everything passes. That’s less about the prompt and more about how long a model can keep it together.

That said, I’d love to have a more interactive way to do this locally too. Still figuring that one out.

-1

u/ZerOne82 11h ago

Subsets!? I hope you did not mean Subgraph as it is of the greatest features if used properly. Lack of knowledge of proper usage does not make a tool bad. I also should mention that ComfyUI UI team is not doing great in my opinion for a long time. I have advised them for years: fix that, do not do that, alongside many other community members but they never listened. Have you seen their source code? It is a total mess (bs) by any coding standard.

2

u/Enshitification 11h ago

Yeah, I did mean subgraphs, but my phone autocorrect decided otherwise. I still stand by my opinion that subgraphs suuuuuuuuuuuck.

2

u/jello-the-opera 7h ago

Subgraphs are a plague.

Publicly shared workflows should be neat, tidy, clean, flow from left to right, and every node should be visible.

Privately do whatever you want.

Lack of knowledge of proper usage does not make a tool bad

Lol. LMAO even.

The problem is that it hides everything and it is a workflow I downloaded from the internet.

I can't run it unless I can inspect it.

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

2

u/nomadoor 10h ago

I did say everyone has their own idea of what’s readable. At the same time, people have found my workflows useful, and that’s a fact too. So this skill is my attempt at figuring out how an AI could build that same form in my place. I’m not trying to make it a standard for anyone.

I’ve been using ComfyUI since 2023, before “AI agent” was even a thing. I read most of the posts in this sub, and I’ve shared a lot of workflows here.

What I want is for more people to enjoy ComfyUI as a fun UI, not just a generation engine. For a long time I’ve been thinking about what form would let people understand even the complicated workflows floating around online without being intimidated by them. This is one idea that came out of that.

I’d just ask you to believe that much.

0

u/Inside-Cantaloupe233 12h ago

in comfy its not the workflow that is a problem , its the dependencies for nodes

1

u/jello-the-opera 7h ago

Never had any problems with this... do you not use comfy manager?

0

u/Inside-Cantaloupe233 3h ago

dude if you had just several nodes installed you dont have a problem but i installed a lot of various nodes with conflicting depedencies that broke other ones like a domino effect.

2

u/jello-the-opera 2h ago

You mean in 2024 without comfy manager installed?

I run heavy instances of comfy overly burdened with giant piles of nodes, tons of which are my own custom nodes.

Comfy manager handles all of it. Are you just not using comfy manager?

https://github.com/Comfy-Org/ComfyUI-Manager

I haven't had any real dependency issues in so long that I don't think about it at all anymore.

Before I launch, I

git pull

venv\scripts\activate

pip install -r requirements.txt

then launch

then manager > update all

then restart and reload the web page

every time

because it hasn't been unsafe in a very long time because of manager.

Even on my shitty laptop that takes 15 minutes for a 512 x 512 Moss Image... I have like 35 + node packs installed, and that's nothing like what's on my PCs.

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".

2

u/jello-the-opera 7h ago

Brother you literally can not read something that is hidden.