Skip to content
AI Engineering for Art — with comfyanonymous, of ComfyUI episode artwork

Jan 4, 2025 55 min

AI Engineering for Art — with comfyanonymous, of ComfyUI

from Latent Space: The AI Engineer Podcast Hosted by Latent.Space

Applications for the NYC AI Engineer Summit, focused on Agents at Work, are open! When we first started Latent Space, in the lightning round we’d always ask guests: “What’s your favorite AI product?”. The majority would say Midjourney. The simple UI of...

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

AI Engineering for Art — with comfyanonymous, of ComfyUI

0:00 55:03
of matches

Transcript Auto-generated, may contain errors

Happy New Year, friends. Thanks for all the love on the Latent Space Live and 100th episode end of year recap. Your support has boosted us 30 places in the podcast charts, and that always helps us book great guests and organize more industry events for you. We don't say this enough, but thank you to everyone who has left a review on Apple Podcasts or subscribed to our new YouTube channel. Last year, we broke new ground when we interviewed our first public company CEO with Drew Houston and first technology cabinet member with Minister Josephine Teo, and first year with full coverage of leading labs across Meta, OpenAI, Anthropic, Raker, Liquid, and Google DeepMind. For our 101st episode, we are proud to introduce another first with our first anonymous guest. As Swix mentions in the episode, latent space was started in the immediate aftermath of stable diffusion, and the uncredentialed software engineers it enabled set the stage for the LLM wave that was to come with ChatGPT.

The earliest winner of the stable diffusion tooling wars was SD Web UI, a radio app by the anonymous young creator Automatic 1111 that quickly amassed over 100,000 GitHub stars for how it rapidly shipped plugins and usable interfaces for the rapidly growing stable diffusion ecosystem. However, these days, the power tool of choice is now Comfy UI by today's guest, Comfy Anonymous, who is gracing us with his first ever podcast appearance today. The shift from Automatic 11.11 to Comfy UI reflects a shift away in the image diffusion space from prompting and tweaking settings in 2022 to more complex and parallel workflows chaining together different models and orchestrating long-running operations that can also include video processing, visualized on an intuitive canvas instead of long YAML or code blocks. Because Comfy UI is open source, there are now multiple Y Combinator startups built off of a Comfy workflow or offering Comfy UI as a service directly.

Interestingly enough, this same workflow tooling has not seemed to take off for other modalities yet, but perhaps 2025 is the year diffusion tooling diffuses to non-image domains. In other news, we have just announced the second AI Engineer Summit in New York City. We are bringing back the surprisingly successful AI leadership track from World's Fair. And also, the single-track AI engineering track is now wholly focused on agents at work. If you are building agents in 2025, this is the single best conference to attend. Head to apply.ai.engineer and see you there. Watch out and take care.

Hey, everyone. Welcome to the Latest Space Podcast. This is Alessio, partner and CTO at Decibel Partners, and I'm joined by my co-host, Swix, founder of Small AI. Hey, everyone. We are in the Chrome Studio again, but with our first ever anonymous guest, Comfy Anonymous. Welcome. Yeah. Well, hello. I feel like that's your full name. You just call Comfy, right? Yeah. Well, a lot of people just call me Comfy, even when they know my real name. Hey, Comfy. Swix is the same. Not a lot of people call you Sean. Yeah. You have a professional name, right? People know you by, and you have a legal name. Yeah, that's fine.

How do I phrase this? People who are in the know know that Comfy is the tool for image generation and now other multimodality stuff. I would say that when I first got started with Stable Diffusion, the star of the show was Automatic 111, right? And I actually looked back at my notes from 2022-ish. Comfy was already getting started back then, but it was kind of like the up-and-comer and your main feature was the flowchart. Can you just kind of rewind to that moment, that year, and how you looked at the landscape there and decided to start Comfy? Yeah, I discovered Stable Diffusion in 2022, in October 2022. And I kind of started playing around with it. Yes, I am.

And back then I was using automatic, which was what everyone was using back then. And so I started with that. Because when I started, I had no idea how diffusion models work, how any of this works. Oh, yeah. What was your prior background as an engineer? Just a software engineer. Yeah, boring software engineer. But any image stuff, any orchestration, distributed systems, GPUs? No, I was doing basically nothing interesting. Web development? Well, not web development, just some basic automation stuff. Okay.

Yeah, no big companies or anything. Yeah, but already some interest in automations, probably a lot of Python. Yeah, yeah, of course, Python. But I wasn't actually used to the Node graph interface before I started ConfiUI. I just thought it was like, oh, what's the best way to represent the diffusion process in the user interface? And I'm like, oh, well, this is the best way I found. And this was with the Node interface. So how I got started was

Yeah, so basically October 2022, just like I hadn't written a line of PyTorch before that, so it's completely new. What happened was I kind of got addicted to generating images. As we all did. And then I started experimenting with the high-res fixed in Otto, which was, for those that don't know, the high-res fixed is just since the diffusion models back then could only generate at low resolution. So what you would do, you would generate low-resolution image, then upscale, then kind of patent.

refine it again and that was kind of the hack to generate high resolution images i really liked generating like higher resolution images so i was experimenting with that and so i modified the code a bit okay what happens if i if i use different samplers on the second pass i was edited the code of auto so what happens if i use a different sampler what happens if i use a different like a different settings and different number of steps Because back then, the high-res fix was very basic. Now there's a whole library of just upsamplers. I think they added a bunch of options to the high-res fix since then. But before that, it was just so basic. So I wanted to go further. I wanted to track it. What happens if I use a different model for the second pass? And then, well, then the auto codebase wasn't good enough for it. It would have been harder to implement that in the auto interface than to create my own interface.

That's when I decided to create my own. And you were doing that mostly on your own when you started, or did you already have kind of like a subgroup? No, I was on my own, because it was just me experimenting with stuff. Yeah, that was it. So I started writing the code January 1, 2023. And then I released the first version of GitHub January 16, 2023. That's how things got started. And was the name ComfyUI right away? Yeah, ComfyUI. The reason my name is Comfy is people thought my pictures were Comfy. So I just named it. It's my ComfyUI.

Is there a particular segment of the community that you targeted as users, like more intensive workflow artists compared to the automatic crowd? This was my way of experimenting with new things, like the high-risk fix thing I mentioned, which was like in Confi. The first thing you could easily do was just chain different models together. And then one of the first things, I think the first times it got a bit of popularity was when I started experimenting with different, like applying props to different areas of the image. Yeah, I called it area conditioning. Posted it on Reddit, and it got a bunch of upvotes. So I think that's when people first learned of ConfiUI. Is that mostly like fixing hands? I don't know. That was just like, let's say, well, it was very, well, it still is kind of difficult to, like, let's say you want a mountain. You have an image, and then, OK, I want a mountain here. And I want, like, a fox here. Yeah.

compositing the image. Yeah, by the way, it was very easy. It was just like when you run the diffusion process, you kind of generate, OK, you do one pass through the diffusion model. Every step you do one pass, OK, this place of the image with this prompt, this place of the image with the other prompt, and then the entire image with another prompt, and then just average everything together every step. And that was area composition, which I call it. And then a month later, there was a paper that came out called multi-diffusion, which was the same thing. But yeah.

Could you do area composition with different models? Or because you're averaging out, you kind of need the same model? You could do it with, but yeah, I hadn't implemented it for different models. But you can do it with different models if you want, as long as the models share the same latent space. We're supposed to ring a bell every time someone says latent space. Yeah. Like, for example, you couldn't use Excel and SD 1.5, because those have a different latent space. But yeah, SD 1.5 models, different ones, you could do that. There's some models that

try to work in pixel space, right? Yeah, they're very slow. Of course. That's the problem. The reason why stable diffusion actually became popular was because of the latent space. Yeah, because there used to be latent diffusion models and then they trained it up. Yeah, because the pixel diffusion models are just too slow. Have you ever tried to talk to Stability, the latent diffusion guys, like Robin Rombach, that group? Yeah, well, I used to work at Stability. Oh, I actually know. Yeah, I used to work at Stability. I got hired.

In June, 2023. Ah, that's the part of the story I didn't know about. Okay. So the reason I was hired is because they were doing SDXL at the time. And they were basically, SDXL, I don't know if you remember, it was a base model and then a refiner model. Basically, they wanted to experiment, like changing them together. And then they saw, oh, we can use this to do that. Well, let's hire that guy. But they didn't pursue it for like SD3. What do you mean? Like the SDXL approach. Yeah. The reason for that approach was because basically they had two models.

And then they wanted to publish both of them. So they trained one on lower time steps, which was the refiner model. And then the first one was trained normally. And then during their test, they realized, oh, if we string these models together, our quality increases. So let's publish that. It worked. Yeah. But right now, I don't think many people actually use the refiner anymore, even though it is actually a full diffusion model. You can use it on its own, and it's going to generate images. I don't think anyone, people have mostly forgotten about it.

Can we talk about models a little bit? So stable diffusion, obviously, is the most known. I know Flux has gotten a lot of traction. Are there any underrated models that people should use more? Or what's the state of the union? Well, the latest state of the art, at least, yeah, for images, there's, yeah, there's Flux. There's also SD 3.5. SD 3.5 is two models. There's a small one, 2.5B, and there's the figure one, 8B. So it's smaller than Flux. And it's more creative in a way. But Flux, yeah, Flux is the best. People should give SD 3.5 a try because it's...

It's different. I won't say it's better. Well, it's better for some specific use cases. If you want to make something more creative, maybe as a 3.5. If you want to make something more consistent, then Flux is probably better. Do you ever consider supporting the closed source model APIs? Well, we do support them as custom nodes. We actually have some official custom nodes from different... Ideogram. Yeah. I guess Dali would have one.

Yeah, it's just not the person that handles that. Sure, sure. Quick question on SD. There's a lot of community discussion about the transition from SD 1.5 to SD 2 and then SD 2 to SD 3. People still very loyal to the previous generations of SDs? Yeah, SD 1.5 and still has a lot of users. The last-based model. Yeah, then SD 2 was mostly ignored because it wasn't a big enough improvement over the previous one.

Okay, so SD1.5, SD3, Flux, and whatever else. SDXL, that's a big one. Stable Cascade? Stable Cascade, that was a good model. The problem with that one is it got, like SD3 was announced one week after. Yeah, it was like a weird release. What was it like inside of Stability, actually? I mean, Statue of Limitations expired, you know, management has moved somewhere. It's easier to talk about now. Yeah, inside Stability, actually that model was ready like three months before, but it got stuck in red teaming.

So basically, if that mall had released or was supposed to be released by the authors, then it would probably have gotten very popular since it's a step up from SDXL. But it got all of its momentum stolen by the SD3 announcement. So people kind of didn't develop anything on top of it, even though it's, yeah. It was a good model, at least completely, mostly ignored for some reason. I think the naming as well matters. It seemed like a branch off of the main tree of developments. Yeah, well, it was different researchers that did it. Very, like, a good model. Like, it's the Worcestershire authors. I'm not pronouncing it correctly. I actually met them in Vienna. Yeah, they worked at Stability for a bit, and they left right after the Cascade release. This is Dustin, right? No. Dustin's SD3. No, Dustin is SD3, SDXL.

That's Pablo and Dome. I think I'm pronouncing the same correctly. That's very good. It seems like the community is very, they move very quickly. Like when there's a new model out, they just drop whatever the current one is and they just all move wholesale over. Like they don't really stay to explore the full capabilities. Like if the stable cascade was that good, they would have A-B tested a bit more. Instead, they're like, okay, SD3's out, let's go. Well, I find the opposite, actually. The community doesn't, like they only jump on a new model when there's a significant improvement.

If there's only an incremental improvement, which is what most of these models are going to have, especially if you stay the same parameter count, you're not going to get a massive improvement unless there's something big that changes. How are they evaluating these improvements? Because it's a whole chain of comfy workflows. How does one part of the chain actually affect the whole process? Are you talking on the model side specific? Model specific, right? But once you have your whole workflow based on a model, it's very hard to move.

not well not really depends on your uh depends on their specific kind of workflow yeah So I do a lot of, like, text and image. Yeah. When you do change, like, most workflows are kind of going to be compatible between different models. It's just, like, you might have to completely change your prompt, completely change. Okay. Well, I mean, maybe the question is really about evals. Like, what does the Comfy community do for evals? Just, you know... Well, they don't really do. It's more like, oh, I think this image is nice. They just subscribe to Fofur to see, like, you know, what Fofur is doing. They just generate, like, I don't see anyone really doing it. At least on the Comfy side, Comfy users, it's more like, oh, generate...

images and say oh this one's not yeah it's not like the more like scientific like checking that's more specifically on like model side Yeah. But there is a lot of vibes also because it is artistic. You can create a very good model that doesn't generate nice images. Because most of the images on the internet are ugly. So if you just, oh, I have the best model. It's super smart. I train it on all the images on the internet. The images are not going to look good. They're going to be very consistent. But it's not going to be the look that people are going to be expecting from a model.

Can we talk about LoRa's? Because we talked about models, and the next step is probably LoRa's. Actually, I'm kind of curious how LoRa's entered the toolset of the image community, because the LoRa paper was 23.1, and then there was other methods like textual inversion that was popular at the early SD stage. Yeah, I can explain the difference between that. Textual inversions, that's basically what you're doing is you're training a, because, well, yeah, stable diffusion, you have the diffusion model, you have the text encoder. So basically what you're doing is training a vector that you're going to pass to the text decoder. It's basically you're training a new word.

Yeah, it's a little bit like representation engineering now. Basically, yeah, you're just, so yeah, if you know how the text encoder works, basically you have a, you take your words of your prompt, you convert those into tokens with the tokenizer, and those are converted into vectors. Basically, each token represents a different vector, so each word presents a vector, and those, depending on your words, that's the list of vectors that get passed to the text encoder, which is just, yeah, just a stack of attention. Like, basically, it's very close to LLM architecture. Yeah, yeah, so.

Basically, what you're doing is just training a new vector. You're saying, well, I have all these images, and I want to know which word does that represent. And it's going to get, like, you train this vector, and then when you use this vector, it hopefully generates something similar to your images. I would say it's surprisingly sample efficient in picking up the concept that you're trying to train it on. Yeah, well, people have kind of stopped doing that, even though back when I was in stability, we actually did train internally some textual inversions on T5XXL. It actually worked pretty well.

But for some reason, yeah, people don't use them. And also, they might also work, like, yeah, this is something you'd probably have to test, but maybe if you train a textual version like on T5XXL, it might also work with all the other models that use T5XXL. Because same thing with, like, the textual versions that... that we're trained for SD 1.5, they also kind of work on SDXL, because SDXL has two text encoders, and one of them is the same as the SD 1.5 clip L. So those, they actually don't work as strongly, because they're only applied to one of the text encoders. And the same thing for SD 3.3. SD 3 has three text encoders, so it works. You can still use your text from version SD 1.5 on SD 3, but it's just a lot weaker, because now there's three text encoders, so it gets even more diluted.

Do people experiment a lot on, just on the Clip side, there's like Siglip, there's Blip. Do people experiment a lot on those? You can't really replace. Yeah, because they're trained together, right? Yeah, they're trained together. So you can't, like, what I've seen people experimenting with is a long Clip. So basically someone fine-tuned the Clip model to accept longer prompts. Oh, it's kind of like long context fine-tuning. Yeah, so it's actually supported in Core Comfy. How long is long? Regular Clip is 77 tokens. Long Clip is 256.

But the hack that, like, if you use stable diffusion 1.5, you've probably noticed, oh, it still works if I use long prompts, prompts longer than 77 words. Well, that's because the hack is to just, well, you split it up in chunks of 77, your whole big prompt. Let's say you give it, like, the massive text, like the Bible or something. And it would split it up in chunks of 77 and then just pass each one through the clip and then just cut anything together at the end. It's not ideal, but it actually works.

Like the positioning of the words really, really matters then, right? Like this is why order matters in prompts. Yeah. Yeah, like it works, but it's not ideal, but it's what people expect. Like if someone gives a huge prompt, they expect at least some of the concepts at the end to be like present in the image. But usually when they give long prompts, they don't expect like detail, I think. So that's why it works very well. And while we're on this topic, prompt waiting, negative prompting, all sort of similar part of this layer of the stack. Yeah, the hack for that, which works on clip.

Basically, it's just for SD 1.5, well, for SD 1.5, the prompt waiting works well because clip L is not a very deep model. So you have a very high correlation between you have the input token, the index of the input token vector and the output token. The concepts are very close, closely. So that means if you interpolate the vector from what, well, the way Comfy UI does it is it has, okay, you have the vector, you have an empty prompt. So you have a...

It turns like a clip output for the NP prompt, and then you have the one for your prompt. And then it interpolates from that, depending on your prompt weight, the weight of your tokens. So that's how it does prompt waiting. But this stops working the deeper your text encoder is. So on T5XXL, it doesn't work at all. Wow. Is that a problem for people? Because I'm used to just moving up numbers. So you just use words to describe, right? Because it's a bigger language model. Yeah.

Yeah, so honestly, it might be good, but I haven't seen many complaints on Flux now. It's not working. Because I guess people can sort of get around it with language. Yeah. And then coming back to LoRa's, now that the popular way to customize models is LoRa's. And I saw you also support LoCon and LoHa, which I've never heard of before. There's a bunch of, because what LoRa is essentially is instead of like, okay, you have your model, and then you want to fine-tune it. So instead of like, what you could do is you could fine-tune the entire thing. Yeah, full fine-tune. But that's a bit...

heavy so to speed things up and make things less heavy what you can do is just fine-tune some smaller weights like basically two two matrices that when you multiply like two low-rank matrices and when you multiply them together gives a represents a difference between trained weights and your base weights so by training those two smaller matrices that's a lot less heavy and they're portable so you can share them yeah and also smaller yeah that's how lora's work so Basically, when inferencing, you can inference with them pretty efficiently, like how ComfyWide does it. When you use a LoRa, it just applies it straight on the weights, so that there's only a small delay before the sampling when it applies the weights, and then it's just the same speed as before. So for inference, it's not that bad. And then you have basically all the LoRa types, like LoRa, LoCon, everything, that's just different ways of representing that.

Basically, you can call it kind of like compression, even though it's not really compression. It's just different ways of representing like just, okay, I want to train a difference on the weights. What's the best way to represent that difference? There's the basic moral, which is just, oh, let's multiply these two matrices together. And then there's all the other ones, which are all different algorithms.

So let's talk about what config UI actually is. I think most people have heard of it. Some people might have seen screenshots. I think fewer people have built very complex workflows. So when you started, automatic was like the super simple way. What were some of the choices that you made? So the node workflow, is there anything else that stands out as like, this was like a unique take on how to do image generation workflows? Well, I feel like, yeah, back there, everyone was trying to make like easy to use interface. Everyone's trying to make an easy to use interface. Let's make a hard to use interface.

I don't need to do that. Everyone else is doing it, so let me try something. Let me try to make a powerful interface that's not easy to use. So like, yeah, there's a sort of node execution engine. Your README actually lists a really good list of features of things you prioritize, right? Like, let me see, like sort of re-executing from any parts of the workflow that was changed, asynchronous queue system, smart memory management. Like all this seems like a lot of engineering then. Yeah, there's a lot of engineering in the backend to make things. Because I was always focused on making things work locally very well because I was using it locally. So everything, yeah. So there's a lot of thought and work.

getting everything to run as well as possible. So yeah, ComfyUI is actually more of a back-end. At least, well, now the front-end is getting a lot more development, but before it was, I was pretty much only focused on the back-end. Yeah, so v0.1 was only August this year. Yeah, before there was no versioning. And so what was the big rewrite for the 0.1 and then the 1.0? Well, that's more on the front-end side. Because before that, it was just like the UI.

When I first wrote it, I just, I said, okay, how can I make, like, I can do web development, but I don't like doing it. Like, what's the easiest way I can slap a node interface on this? And then I found this library, LightGraph, like JavaScript library. LightGraph? LightGraph. Usually people will go for, like, React Flow for, like, a flow build. Yeah, but that seems, like, too complicated. So I didn't really want to spend time, like, developing the frontends. I'm like, wow, oh, LightGraph, this has the whole node interface. So, okay, let me just plug that into my backend. I feel like if Streamlit or Gradio offered something, you would have used Streamlit or Gradio, because it's Python.

Extremely in Gradio, I don't like Gradio. That's one of the reasons why Automatic was very bad. It's great because the problem with Gradio, it forces you to, well, not forces you, but it kind of makes your... your interface logic and your backend logic and what just sticks them together. It's supposed to be easy for you guys if you're a Python main. You know, I'm a JS main, right? If you're a Python main, it's supposed to be easy. Yeah, it's easy, but it makes your whole software a huge mess. I see, I see. So you're mixing concerns instead of separating concerns? Well, it's because... Like front-end and backend. Your front-end and backend should be well-separated with a defined API. That's how you're supposed to do it. Smart people disagree. It just sticks everything together. It makes it easy to make a huge mess. And also, there's a lot of issues with radio.

It's very good if all you want to do is just slap a quick interface to show off your ML project. That's what it's made for. There's no problem using it like, oh, I have my code. I just want a quick interface on it. That's perfect. Use Gradio. But if you want to make something that's a real software that will last a long time and will be easy to maintain, then I would avoid it. So your criticism is Streamlit and Gradio the same. I mean, those are the same.

Yeah, I haven't used it. Yeah, I just looked a bit... Similar philosophy. Yeah, it's similar. It just seems to me like, okay, for quick AI demos, it's perfect. Yeah, going back to the core tech, like asynchronous queues, flow re-execution, smart memory management, anything that you're very proud of or was very hard to figure out? Yeah, the thing that's the biggest pain in the ass is probably the memory management. Yeah, were you just paging models in and out? Yeah, before it was just, okay, load the model, completely unload it.

load a new model, completely unload it, then OK, that works well when your models are small. But if your models are big and it takes, let's say, if someone has a A4090 and the model size is 10 gigabytes, that can take a few seconds to load and load and load and load. So you want to try to keep things in the GPU memory as much as possible. What ConfiUI does right now is that it tries to estimate, okay, you're going to sample this model. It's going to take probably this amount of memory. Let's remove the models like this amount of memory that's been loaded on the GPU and then just execute it. So there's a fine line between just trying to remove the least amount of models that are already loaded. Because as parents, like Windows, driver, and another problem is...

the NVIDIA driver on Windows by default, because there's an option to disable that feature. But by default, if you start loading, you can overflow your GPU memory, and then the driver is going to automatically start paging to RAM. But the problem with that is it makes everything extremely slow. So when you see people complaining, oh, this model, it works, but oh, shit, it starts slowing down a lot, that's probably what's happening. So it's basically you have to just try to get Use as much memory as possible, but not too much, or else things start slowing down or people get out of memory. And then just try to find that line where the drive-around window starts paging and stuff. And the problem with PyTorch is it's high levels. I don't have that much fine-grained control over specific memory stuff, so I kind of have to leave the memory freeing to Python and PyTorch, which can be annoying sometimes.

So, you know, I think one thing is, as a maintainer of this project, like, you're designing for a very wide surface area of compute. Like, you even support CPUs. Yeah, well, that's just PyTorch. PyTorch supports CPUs. Yeah, it's just, that's not hard to support. First of all, is there a market share estimate? Like, is it, like, 70% NVIDIA and, like, 30% AMD and then, like, miscellaneous on Apple Silicon or whatever? For Comfy? Yeah, I don't know the market share. Can you guess? I think it's mostly NVIDIA. Because the problem, like, AMD works horribly on Windows.

Like on Linux, it works fine. It's lower than the price equivalent, the video GPU, but it works. Like you can use it, generate images, everything works. On Linux, on Windows, you might have a hard time. So that's the problem. And most people, I think most people who haven't bought AMD.

Probably use Windows. They probably aren't going to switch to Linux. So until AMD actually ports their ROKM to Windows properly, and then there's actually PyTorch. I think they're doing that. They're in the process of doing that. But until they get a good PyTorch ROKM build that works on Windows, they're going to have a hard time. We've got to get George on it. Yeah, well, he's trying to get Lisa Suwe to do it. Let's talk a bit about the node design. So unlike all the other text to image, you have a very

like deep so you have like a separate node for like clip and code you have a separate node for like the case sampler you have like all these notes going back to like the making it easy versus making it hard but like how much do people actually play with all the settings you know kind of like how do you guide people to like hey this is actually going to be very impactful versus this is maybe like less impactful but we still want to expose it to you uh well i try to expose like i try to expose everything or but so yeah at least for the but for things like for example for the samplers like there's uh Like, yeah, four different sampler nodes, which go in easiest to most advanced. So, yeah, if you go, like, the easy node, the regular sampler node, that's, you have just basic settings. But if you use, like, the sampler advanced, custom advanced node, that one you can actually, you'll see you have, like, different nodes. I'm looking it up now. Yeah. What are, like, the most impactful parameters that you use? So, it's like, you know, you can have more, but, like...

Which ones, like, really make a difference? Yeah, they all do. They all have their own, like, for example, yeah, steps. Usually you want steps, you want them to be as low as possible. But you want, if you're optimizing your workflow, you lower the steps until, like, the images start deteriorating too much. Because that, yeah, that's the number of steps you're running the diffusion process. So if you want things to be faster.

Lower is better. But yeah, CFG, that's more, you can kind of see that as the contrast of the image. Like if your image looks too burnt out, then you can wear the CFG. So yeah, CFG, that's how, yeah, that's how strongly the negative versus positive prompt. So when you sample the diffusion model, it's basically a negative prompt. It's just, yeah, positive prediction minus negative prediction. Contrastive loss. Yeah, positive minus negative, and the CFG does the multiplier. Yeah, so.

What are good resources to understand what the parameters do? I think most people start with automatic, and then they move over and it's like, snap CFG, sampler name, scheduler, denoise. Read it. Honestly, well, it's something you should try out yourself. You don't necessarily need to know how it works to like what it does, because even if you know CFG, it's like positive minus negative prop. So the only thing you know with CFG is if it's 1.0, then that means the negative prop isn't applied.

It also means sampling is two times faster. But other than that, it's more like you should really just see what it does to the images yourself, and you'll probably get a more intuitive understanding of what these things do. Any other nodes or things you want to shout out? Like, I know the AnimateDiff IP Adapter, those are like some of the most popular ones. Yeah, what else comes to mind? Not nodes, but there's, like, what I like is when some people, sometimes they make things that use Compute UI as their backend. Like, there's a plugin for Krita that...

uses Confio as its back-end. So you can use all the models that work in Comfy and Krita. And I think I've tried it once. But I know a lot of people use it and find it really nice. What's the craziest node that people have built and the most complicated? Craziest node? Yeah, I know some people have made video games in Comfy and stuff like that. So someone, I remember, I think it was last year, someone made like a

like Wolfenstein 2D in Confuse. And then one of the inputs was, oh, you can generate the texture, and then it changes the texture in the game. So I could plug it to Wordflow. And there's a lot of, I feel like there's a lot of crazy things people do. So, yeah. And now there's like a node register that people can use to like download nodes. Yeah, like, well, there's always been the Confuse Manager, but we're trying to make this more like, I don't know, official, like with...

Yeah, with the node registry, because before the node registry, it's like, OK, how did your custom node get it to become PY manager? That's the guy running it who, like, every day he searched GitHub for new custom nodes and added them manually to his custom node manager. So we're trying to make it less effort for him, basically. Yeah, but I was looking. I mean, there's a YouTube download node. This is almost like a data pipeline, more than an image generation thing at this point. It's like you can get data in. You can apply filters to it. You can generate data out.

Yeah, you can do a lot of different things. Yeah, something I think what I did is I made it easy to make custom nodes. So I think that helped a lot for the ecosystem because it is very easy to just make a node. So yeah, a bit too easy sometimes. Then we have the issue where there's a lot of custom node packs which share similar nodes.

Yeah, something we're trying to solve by maybe bringing some of the functionality into core. Yeah. And then there's like video. People can do video generation. Yeah, video that's, well, the first video model was like stable video diffusion, which was last, yeah, exactly last year, I think, like one year ago. But that wasn't the true video model. So it was like moving images. Yeah, generated video. What I mean by that is it's like, it's still 2D latents. It's basically what they did is they took SD2.

And then they added some temporal attention to it. And then I trained it on videos. So it's kind of like animate, diff, same idea, basically. Why I say it's not a true video model is that you still have a 2D latence. A true video model like Mochi, for example, would have 3D latence. So you can move through the space, basically. It's the difference. You're not just kind of reorienting. Yeah, it's also because you have a temporal VAE. Also, Mochi has a temporal VAE that compresses on the temporal direction also.

See, that's something you don't have with, like, yeah, AdMateDiff and Stable Video Diffusion. They only, like, compress spatially, not temporally. So, yeah, so these models, that's why I call them, like, true video models. There's actually a few of them, but the one I've implemented in Comfy is Mochi, because that seems to be the best one so far. We had AJ come and speak at the Stable Diffusion Meetup. Other open one I think I've seen is CogVideo. Yeah, CogVideo. Yeah, that's one. Yeah, it also seems decent, but, yeah.

Chinese so we don't use it. No, it's fine. It's just that it's not the only one. There's also a few others. The rest are closed doors, right? Yeah, closed doors. There's a bunch of them. But I mean, open. I've seen a few of them.

I can't remember their names, but there's CogVideos, the big one, and there's also a few of them that released at the same time. There's one that released at the same time as SD 3.5, same day, which is why I don't remember the name. We should have a release schedule so we don't conflict on each of these things. I think SD 3.5 and Mochi released on the same day. So everything else was kind of completely drowned out. So for some reason, lots of people picked that thing to release their stuff.

Yeah, which is a shame for those. I think OmniGen also released the same day, which also seems interesting. Yeah, what's Comfy? So you are Comfy, and then there's like Comfy.org. I know we do a lot of things for like news research, and those guys also have kind of like a more open source thing going on. How do you work? Like you mentioned, you mostly work on like the core.

Maybe I should fit in because I feel like maybe I only explained part of the story. Maybe I should explain the rest. So yeah, basically January, that's when the first January 2023, January 16th, 2023, that's when Amphi was first released to the public. And yeah, did a Reddit post about the area composition thing somewhere in, I don't remember exactly, maybe end of January, beginning of February. And then somewhere a YouTuber made a video about it.

like olivio he made a video about comfy in march 2023 i think that's when it was a real burst of attention and by yeah that time i was continuing to developing it and it was getting uh people were starting to use it more which unfortunately meant that i i was i had first written it to do like experiments but then my time to do experiments when i started going down Yeah, because people were actually starting to use it, and I had to. And I said, well, yeah, time to add all these features and stuff. Yeah, and then I got hired by Stability in June 2023. Then I made, basically, yeah, they hired me because they wanted SDXL. So I got SDXL working very well with the UI because they were experimenting with it. Actually, how the SDXL released worked is they released, for some reason, they released the code first, but they didn't release the model checkpoint.

So they released a couple. And then, well, since the research was ready to code, I released the code in Comfy, too. And then the checkpoints were basically early access. People had to sign up, and they only allowed a lot of people from Edu emails. If you had an Edu email, they gave you access, basically, to the SDXL 0.9. And, well, that leaked, of course, because, of course, it's going to leak if you do that. Well, the only way people could easily use it was with Comfy.

Yeah, people started using it, and then I fixed a few issues people had. So when the big 1.0 release happened, and, well, ComfyUI was the only way a lot of people could actually learn it on their computers. Because it just, like, Automatic was so, like, inefficient and bad that most people couldn't actually, like, it just wouldn't work. Because he did a quick implementation. So people were forced to use ConfiUI. And that's how it became popular because people had no choice. The growth hack. Yeah, like everywhere, like people who didn't have the 4090, who had just regular GPUs, they didn't have a choice. Yeah, I got a 4070. So think of me. And so today, is there like a core Confi team? Yeah, well, right now, yeah, we are hiring, actually. So right now, like on the core itself, it's me.

But because the reason where all the focus has been mostly on the front end right now, because that's the thing that's been neglected for a long time. So most of the focus right now is all on the front end, but we will soon get more people to help me with the actual backend stuff. Because once we have our V1 release, which is going to be the package ComfyUI with the nice interface and easy to install on Windows, and hopefully Mac, yeah. Once we have that... We're going to have lots of stuff to do on the back-end side and also the front-end side. What's the release date? I'm on the wait list. What's the timing? Soon. Soon-ish. I don't want to promise a release date. We do have a release date we're targeting, but I'm not sure if it's public.

Yeah. Yeah. And how we're going to, like, we're still going to continue, like, doing the open source, like, making Humvee UI the best way to run, like, stable effusion models, like, at least the open source side. And, like, it's going to be the best way to run models locally. But we will have a few, like, a few things to make money from it.

Cloud inference or that type of thing. And maybe some things for some enterprises. I mean, a few questions on that. How do you feel about the other Comfy startups? I mean, I think it's great. It's better to use Comfy than to use something else. It's fine. We're going to try not to... We don't want to... We want people to use Comfy. Like I said, it's better that people use Comfy than something else. So as long as they use Comfy, it's...

I think it helps. It helps the ecosystem. Because more people, even if they don't contribute directly, the fact that they are using country means that people are more likely to join the ecosystem. So, yeah. And then would you ever do text? Yeah, well, you can already do text with some custom nodes. So, yeah, it's something we, like, yeah, it's something I've wanted to eventually add to core, but it's more, like, not a very high priority. But because a lot of people use text for, like, prompt enhancement and, like, other things like that.

Yeah, it's just that my focus has always been on diffusion models, unless some text diffusion model comes out. Yeah, David Holtz is investing a lot in text diffusion. Yeah, if a good one comes out, then he'll probably implement it since it fits with the whole thing. I mean, I imagine it's going to be a close source to the journey. Yeah, well, if an open one comes out, then I'll probably implement it. Cool, Confi. Thanks so much for coming on. This was fun.

Frequently asked questions

How long is this episode of Latent Space: The AI Engineer Podcast?

This episode is 55 minutes long.

When was this Latent Space: The AI Engineer Podcast episode published?

This episode was published on January 4, 2025.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this Latent Space: The AI Engineer Podcast episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.