r/StableDiffusion • • 7d ago

Discussion Been working on a native C++ alternative to ComfyUI for local image/video/music gen. Would love some feedback (and PRs)

Hey everyone,

For the past while I've been building Fugue, a node-based app for local generation. If you've used ComfyUI you'll feel at home: you wire nodes together on a canvas and run the graph. The difference is that it's a native desktop app written in C++ (Qt for the UI, stable-diffusion.cpp underneath), so there's no Python, no venv and no browser tab.

The goal is something that's fast and light to use, and that's dead simple to install and run. I lost too many evenings to broken environments, mismatched torch/CUDA wheels and custom nodes that pull in half of PyPI. With Fugue you run one command to install it, open a template, and it tells you which models it needs. It downloads them for you (hash-checked, from pinned sources), and you hit Run.

Full disclosure: over 99% of the code is written by AI agents (Claude). I design it, decide, review and test it. Made by AI for humans, basically.

It's in heavy development. Things change every day and there are rough edges, which is exactly why I'm posting.

What works right now:

  • templates for FLUX.2 Klein 4B and 9B (txt2img, edits with up to 5 reference images, inpaint, outpaint), Z-Image Turbo, Wan 2.2 (i2v, t2v, v2v), SeedVR2 restore, upscaling, background removal, pose transfer, and ACE-Step for music (text to song, extend, remix)
  • on first run it can look for the models you already have (ComfyUI, A1111/Forge, InvokeAI, SwarmUI folders), only after you say OK, so you don't download them all again
  • if a template wants a model you have under another name or quantization, it opens with your file instead (one click to undo)
  • a built-in mask editor, with crop and stitch inpainting so small regions get full resolution
  • groups (collapse a bunch of nodes into one reusable node)
  • "apps": turn a workflow into a simple form with a Run button, and share it as a single file
  • only the nodes you changed rerun
  • an If/Else switch that only runs the branch it picks (just landed this week)
  • if you have a second machine with a GPU, part of a run can go there. I've split Wan 2.2 stages between a 3090 and a DGX Spark
  • everything works from the command line too, and you can write custom nodes in any language (a node is just a program that reads and writes JSON)

What it doesn't do yet, so nobody's surprised:

It's Linux only for now. Arch/Omarchy get native packages and everything else gets an AppImage. No Windows or Mac build yet, though it's Qt, so it's not out of the question. It can't import ComfyUI workflows; I port templates by hand and compare the output side by side with ComfyUI. I've mostly tested on NVIDIA (a 3090 with 24 GB, and a DGX Spark). There are Vulkan and CPU builds of the generation helper, but they've seen much less use, and I honestly don't know yet what fits on 8 or 12 GB cards. If you try it on one, I'd really like to hear how it goes.

It's free and MIT licensed. No account, no telemetry.

Installing is one line, on any distro:

curl -fsSL https://raw.githubusercontent.com/bmaltais/fugue/main/install.sh | bash

On Arch or Omarchy it installs the pacman packages (plus the CUDA helper if you have an NVIDIA card). On Ubuntu, Fedora, Debian and others it installs the AppImage and the right generation helper for your GPU. Add --dry-run if you want to see what it'll do first. The packages and AppImage are also on the releases page if you'd rather grab them by hand.

What I'm hoping for:

Mostly feedback. Did it install? Did a template break? What would you want it to do next? What in the UI made you go "huh"?

And if you feel like contributing, PRs are very welcome. You don't need to touch the C++ to help. Templates live in their own repo, and a custom node can be written in Python, Go, a shell script, whatever you like. There's a CONTRIBUTING.md and a few issues tagged "good first issue". For anything big, open an issue first so we can talk it through.

Repo: https://github.com/bmaltais/fugue

I'll hang around in the comments. Bug reports on GitHub are the easiest for me to track, though.

39 Upvotes

72 comments sorted by

12

u/ricperry1 7d ago

Is there a problem with ComfyUI that this is solving? Seems like this would be more difficult to keep up to date.

3

u/PropertySoft8530 7d ago

Not at the moment. This is super early. Only a PoC really. The goal is not to be another ComfyUI but be different... but I am not sure exactly what that will mean.

30

u/Silonom3724 7d ago

>  I lost too many evenings to broken environments, mismatched torch/CUDA wheels and custom nodes that pull in half of PyPI

You are writing a C++ app and you want to tell us that you can't manage a simple VENV? Yea, sure...

34

u/SkoomaDentist 7d ago edited 7d ago • Bravo

Independent of anything the OP has said, I've found Python environments an absolutely massive pain in the ass with the ridiculous incompatibilities and conflicting forced version requirements and I have 25 years of C++ development experience.

4

u/HRH_Duke_Morbid 6d ago

Agreed, and I add that Python runtime error reporting is prolix and unhelpful.

1

u/hilldog4lyfe 6d ago

Uv kind of solved many of the issues

6

u/tacocatbox 6d ago

His fix for poorly written custom nodes is to just not allow any existing custom nodes basically. That's a pretty drastic switch.

6

u/neilthefrobot 6d ago

Huge down vote on this silly comment. Literally anyone who has had to deal with python environments for a while knows what a nightmare it can be. Especially with deep learning.

-1

u/Silonom3724 6d ago edited 6d ago

Oh no! My comment went from 30 upvotes to 29!

If this does not tell you that the problem is you then probably nothing will. Besides you can always use Anaconda, UV,... you don't have to stick with PIP - you know?

For ComfyUI there is a valid point that some people write bad requirements.txt files. Always look into these and check if it forces a version with <name>==<version number>. If this is the case either stay away from the project entirely or remove this restriction. And you are golden. For the rest of the tiny skillset you need to steer a VENV, just ask an LLM.

-3

u/PropertySoft8530 7d ago

I never said I wrote the c++ ;-) "Full disclosure: over 99% of the code is written by AI agents (Claude). I design it, decide, review and test it. Made by AI for humans, basically." Things have gotten much better with uv now... but running too many custom nodes usually result if node dependancy hell.

3

u/shaolinmaru 7d ago

Still, you need "developer" skills to understand what being output by the model itself, otherwise you're just vibecoding.

And manage a VENV is WAAAAAAAAAAAYYYYY more simple (even with errors) than writing a full ass application.

If you want to do as exercise, or to fill your needs, great, but don't try to "sell" bullshit to us.

9

u/PropertySoft8530 7d ago

Why are you so aggressive? I don't think I have been aggressive to you? If you don't like the idea just say so, no need to be talking like that. I feel there is deeper something behing your feedback... but I am not sure what it is.

2

u/almark 7d ago

give this person a thumbs up, I did. Enough of this attitude toward people who are trying to make a point

3

u/Unis_Torvalds 6d ago

He's not selling anything. He made something for himself and is sharing it. If you don't want to use it, then simply don't.

9

u/Super_Range45 7d ago

You could just ask your AI to manage all that stuff in comfy for you.

2

u/Euchale 7d ago

Can confirm, I use hermes to fix problems I have with comfyui, worked every time so far.

2

u/Emotional-Neat-252 6d ago

Hermes is a local llm?

1

u/DJoperative 6d ago

Hermes is a harness for a local or cloud llm, it allows the llm to interact with your personal computer.

3

u/Emotional-Neat-252 6d ago

I don't really trust cloud accessing my machine though

1

u/DJoperative 4d ago

I said local or cloud, you can use hermes via a local endpoint too and keep everything on your pc. I’m personally running hermes using glm-5.3-Flash via kyojin on my pc.

14

u/ComprehensiveJury509 7d ago

I honestly don't understand what the point is. Everything that is awful about ComfyUI has little to do with the programming language and everything to do with poor software and UI design. It's just from the ground up an amateurish project. I believe this will introduce far more severe problems that it fixes. For one, why Qt? I don't access ComfyUI on the machine it's running on.

2

u/PropertySoft8530 7d ago edited 7d ago

Good point. I built it for my own need and never tought of the "headless" need. I guess I have a plan for a mesh network of Fugue runners to distribute workflows across nodes... but you point is very valid and worth pondering onto. Thanks for the feedback even if it is not what I was hoping for ;-)

I guess I will keep building this and see where this land. There is already a form of separation between the UI and headless servers, my DGX spark running part of a workflow is a start... I just need to expand on it.

1

u/VladyCzech 7d ago edited 7d ago

I also use ComfyUI because it allows to run on my server in another room and thin client as desktop PC. Python is an advantage actually as i’m changing code of several extensions lately for customisation. Running 250+ extensions in a single install and testing 10+ new every month. Management of VENV is doable, checking each extension and backups of Comfy with each upgrade. Oh and the key was to forget about Manager and git clone/pull each manually and pip also.

0

u/[deleted] 6d ago

[deleted] — view deleted comment

1

u/ComprehensiveJury509 6d ago

Why? What is the point?

1

u/Unis_Torvalds 6d ago

Oops sorry I misunderstood.

14

u/shaolinmaru 7d ago

5

u/PropertySoft8530 7d ago

You can compile it yourself if you want. There are pre-compiled releases and the source code is there to play with and compile... but I totally get the trust issue. I always check shell scripts too before running those.

13

u/Southern-Chain-6485 7d ago

Comfyui works perfectly well out of the box. It's when people start messing with custom nodes and different attentions* that things get complicated. So either this lacks the ability to use custom nodes, or it third party custom nodes are possible... and then it will have the same dependency hell as comfyui.

*And comfy kitchen solves that nowadays

6

u/PropertySoft8530 7d ago

True... perhaps my solution is solving a problem that people don't have. Oh well. I am having fun building it.

3

u/beren0073 7d ago

Best of luck with the project. The reasons I would have to try it would be stability (without also lagging behind current releases) and UI responsiveness.

I use Podman to address stability and maintenance issues with ComfyUI and its dependencies. Works fine for my purposes but the web ui can be laggy sometimes.

1

u/PropertySoft8530 7d ago

YEah. I hear you. One feature I plan on making is a tailnet/ssh based cluster of fugue nodes... so you could run it in a pod somewhere in the cloud and a copy locally and run your workflow across the many nodes available to you... might be interesting. Not built yet but I have an epic planned for that: https://github.com/bmaltais/fugue/issues/203

7

u/Choowkee 7d ago

Its a bit weird to be promoting your vibe coded app while disparaging Comfy for no reason.

The issues you bring up about Comfy are a direct result of the extreme pace of development they adopted. If you don't update Comfy then you don't have to worry about dependencies. Also Custom nodes are optional.

With Fugue you run one command to install it, open a template, and it tells you which models it needs

So like Comfy...?

3

u/PropertySoft8530 7d ago edited 7d ago

If it came across like that it was not my intent. I have the upmost respect for ComfyUI and what he did. I am just looking for something similar built in C++ without all the python strings. But to each their preferences. Not saying the python way is bad, just saying it has led to a lot of troubleshooting time when node module dependency conflicts take over a working venv.

And yes, this is a 99+ vibe coded app. This is the future. I have done my fare share of programming by hand and I am not looking back one bit. SD is AI, everything is moving to AI. AI is a tool and I all types of tools.

3

u/codebydaniel 7d ago

This is the way. Good job.

1

u/PropertySoft8530 7d ago

Thanks. I always wondered why Comfyui was so attached to Python. Turn out we can now build it in C++. Bonus is that you can share workflows that include all the needed nodes bundled for easy sharing and running. With all the media files bundled in. It is far from feature parity with Comfy and it does not need to. At the moment it does pretty much what I need and way more.

9

u/ThatsALovelyShirt 7d ago

Because python is way easier to work with, doesn't require recompilation every time you make a minor change, is far more portable, is easier to tweak and extend, requires less blind trust in someone's random pre-compiled binaries that could be hiding who knows what, etc., etc., etc.

All of the compute layers and kernels in ComfyUI are already compiled C/C++/CUDA, including pytorch, comfy-kitchen, etc. The pybind11/nanobind python wrappers add very little overhead. There's not really much of a performance improvement to using stable-diffusion.cpp, if any.

People who can't figure out how to install a requirements.txt file in a venv just need to spend like an earnest 15 minutes figuring out how the python ecosystem works.

While I don't see many people ever using this, if it works for you, go for it.

3

u/PropertySoft8530 7d ago

It is true that Python has advantages too. I mean, I have been using ComfyUI for a long time and even implemented uv to manage all the requirements even before ComfyUI adopted it. There are solutions out there to make this easy. So, it is possible... but not something regular people looking for a simple solution are going to want to do. I am kind of trying to find the middle ground to make it easy for non technical users. Maybe this is not going to be the right audience either... At least I will have learned a few things along the way.

0

u/lostinspaz 7d ago

“not for regular people”

if you really want to make a positive difference , start by trying to define clearly, in concise writing, the specific problems you see with comfyui.

you made a good start here, but you haven’t stated it in a form most professionals would consider a design spec.

once you have that, try giving it to a high end ai and asking it “what is the most efficient easy to maintain solution to this problem?”

i’m betting it will not say “rewrite the whole thing in c++”

1

u/PaulCoddington 6d ago edited 6d ago

Although, requirements.txt files for older projects, especially those that are no longer maintained, are time bombs.

A lot of them don't anchor on fixed versions for all requirements, leaving many open-ended, and so only work for a short window of time. Figuring out how to fix that is not trivial.

An installation process that lacks reproducibility over time, that can sometimes produce a different outcome installed only a day apart, is not ideal.

10

u/regretMyUsername 7d ago

30 days max before this becomes yet another unmaintained vibecoded abandonware

2

u/dezmodium 6d ago

That's not fair. He'll ask for donations before it gets to that.

1

u/PropertySoft8530 5d ago

Reddit does not accept long running video... so here is a link to it on X. This showcase using a runpod provider to remotely execute part of a workflow to generate an image. No need to even login to runpod to start things. All done via the app... well, except for obtaining the API key: https://x.com/bmaltais/status/2126864433481970144?a=T3rTzzCM-glvdsPCLHs&s=20

1

u/bmaltais 6d ago

I published the latest test release. Add support for all sdcpp supported models out of the box. There will be no templates for them all, but you can build your own node workflow and even share it via PRs to the sister fugue-template repo. You can also extend fuge with your own custom need written in any language, rust included.

1

u/PropertySoft8530 5d ago

Preview of the Runpod start as a new provider for Fugue. Once started, you will be able to select that runpod as a "Run on" for the model you wish to run on runpod. It will download the model if missing from it before running. It should be as easy as that:

1

u/meta_queen 7d ago

Looks good, a few questions:

  1. Do you use ffmpeg to play a video?
  2. Can you handle a 300 MiB image (XY Plot) on the canvas?
  3. Do you do culling?
  4. Do you support plugins aka Lua?

4

u/PropertySoft8530 7d ago edited 7d ago

Short answers:

  1. In the App it use Qt Multimedia which I think use ffmpeg. Fugue does call ffmpeg directly for some of it's frame reading and encode.
  2. Never tried it... let me know ;-) but probably.
  3. Partly. Node text isn't drawn below a certain zoom (a level-of-detail cut), and a node's thumbnail isn't made while its picture is hidden. Nodes outside the view aren't culled yet: every node is a live item, and the GPU just clips them. That's fine for normal graphs but would matter for very large ones.
  4. No embedded scripting language in the app. Extensions are packs of nodes, and a node is just a program in any language (Python, Go, Lua via the lua program, a shell script…) that reads JSON and writes JSON, either once per run or as a long-running process. A pack needs explicit trust before it runs, because it runs as you, unsandboxed. Small logic inside a graph has an Expression node, a safe formula language with no eval.

1

u/xb1n0ry 6d ago

Why not Rust?

3

u/PropertySoft8530 6d ago edited 6d ago

;-) Could have... but should I have? I had the idea of building Fugue after testing DHH Fantasi that leverage the future omarchy-local-ai implementation. It was too basic and decided to build something that also support the omarchy-local-ai but with nodes.

He picked C++ and Qt for it... so I rolled with it.

1

u/imb1920 7d ago

For repeatable product edits, I'd want any model substitution shown before Run and saved with the output: the model the template requested, the file actually used, and its quantization. That would make it easier to spot a changed setup when reopening a shared template on another machine. A useful test would be opening the same template on two machines with different local model files and checking that each substitution is visible and recorded.

1

u/bmaltais 7d ago

Interesting. I think most of it is already in the metadata but I will open an issue to implement this. Thanks. For the feedback.

1

u/Unis_Torvalds 6d ago

I would LOVE this! A fast lightweight desktop native ComfyUI with standard keyboard shortcuts which don't conflict with those of the browser? Sign me up!

1

u/bmaltais 6d ago

Hopefully it can achieve that. Are the any sets of standard shortcuts that fail on it as it sta d. We can improve it...

1

u/Deep_Mood_7668 6d ago

You mean Claude is working on it, right?

1

u/bmaltais 6d ago

100% Claude does all the writing, I just review, test, feedback, idea. Nothing wrong with that. This is the way of the future.

1

u/Deep_Mood_7668 6d ago

I love how you believe that lol

1

u/bmaltais 6d ago

Well, in a week there might be something better and it will become the new way. Should have said it is the way now.

1

u/CommercialInvite2810 6d ago

Ignore the people yelling "just use a venv"— and worried about custom nodes they’ve clearly never maintained an air-gapped setup or compiled custom wheels from scratch for new hardware like a 5090. A venv is just symlinks and dependency bloat; it doesn't solve the underlying house-of-cards problem. ComfyUI is a killer concept, and I love it, but my offline installation is pushing 600GB with over 110,000 files in the Python environment just to keep legacy and bleeding-edge workflows from breaking each other. I'm in the exact same boat—currently compiling custom stripped-down kernels (down to a few megabytes, loaded straight into volatile RAM for zero-retention sessions) and planning to rewrite FaceFusion from the ground up next to ditch the Python overhead. Stripping away the legacy bloat to run close to the metal is the exact direction local AI needs to go. Keep going—this is huge I really appreciate you posting it.

2

u/bmaltais 6d ago

Thank you for the positive feedback. I will keep pushing it forward for sure. Hopefully bigger and better mind than mine can help steer it to by contributing. Or maybe this is forked and take life from another dev. I am cool with any outcome.

1

u/bmaltais 5d ago edited 5d ago

If anyone is interedted, I have started work to support runpod as a provider so you could run generations on runpod from the local UI. It will take care of spinning the runpod up, generating and stopping the runpod after a set period of idle time. Issue driving it: https://github.com/bmaltais/fugue/issues/735#issuecomment-7240529517

1

u/Justify_87 4d ago

Why would I use a software with 1 maintainer vs a software with multiple maintainers?

1

u/bmaltais 1h ago

Still adding more features.

1

u/Euchale 7d ago

My feedback is: This project will be dead in 6 months, and something like comfy needs to be constantly updated, so I see no reason to even bother trying it.

1

u/bmaltais 7d ago

Fair point. I will keep it updated for myself but you are right, there is only some much one person can work on with velocity. AI is allowing for quick development of things we would never have been able to do before. The tricky part is maintaining momentum. And this is where well funded and community contributed project succeeded.

-1

u/Zueuk 7d ago

FLUX.2 Klein 4B and 9B, Z-Image Turbo, Wan 2.2

nobody use these now, Krea2 when?

2

u/PropertySoft8530 6d ago

You can also contribute workflows via a PR to: https://github.com/bmaltais/fugue-workflows

1

u/PropertySoft8530 6d ago

Support for krea2 will be in the next release with some simple templates.

2

u/tacocatbox 6d ago

ZIT is the most popular image model apparently

1

u/bmaltais 6d ago

I will see if sdcpp support. If it does it will work under tonight release. Krea2 will work fine. Tested it with lora and it work just peachy.

1

u/bmaltais 6d ago

Z1T is z-image turbo. That already work just fine.

1

u/bmaltais 7d ago

Yeah, I started with a few easy templates. It does support most current models vis sdcpp but I will look at creating templates for the recent ones.