AI Engineering for Art - with comfyanonymous

Latent Space

Summary

In his first podcast interview, Comfyanonymous joins Alessio and swyx to trace the evolution of ComfyUI from a solo January 2023 coding project to the dominant open-source workflow engine for generative media. Originally built because Automatic1111's Gradio codebase was too rigid for multi-model high-res fix passes, ComfyUI gained early notice through latent-space area conditioning before Stability AI hired Comfyanonymous in June 2023 to support SDXL. When SDXL 0.9 leaked and 1.0 launched, Automatic1111 struggled on consumer GPUs below an RTX 4090, forcing users onto ComfyUI's memory-optimized backend.

The conversation explores key architectural details across the diffusion stack, including CLIP 77-token chunking, why numeric prompt weighting fails on deep T5-XXL encoders, LoRA matrix multiplication, Windows Nvidia VRAM paging, and 3D temporal VAEs in video models like Mochi. Looking ahead, Comfyanonymous discusses ComfyOrg's upcoming packaged V1 desktop installer for Windows and Mac alongside plans for cloud inference and enterprise monetization.

How time-sensitive the topic is: Evergreen

By the numbers

  • 2.5B and 8B parameters: Parameter sizes of the small and large Stable Diffusion 3.5 image generation models. (Mentioned at 10:31)
  • 3 months: Duration that Stable Cascade was held up in internal red-teaming at Stability AI before its delayed release. (Mentioned at 12:30)
  • 3 text encoders: Number of text encoders used in Stable Diffusion 3, compared to two in SDXL. (Mentioned at 19:49)
  • 77 tokens: Maximum token context length of the standard CLIP text encoder before chunking is required. (Mentioned at 20:38)
  • 256 tokens: Extended token context length supported by the fine-tuned Long-CLIP model in ComfyUI. (Mentioned at 20:42)
  • 10 gigabytes: Typical large model size that takes several seconds to load and unload on an RTX 4090 if not kept in GPU memory. (Mentioned at 31:29)
  • 4 sampler nodes: Number of distinct sampler nodes in ComfyUI ranging from easiest to most advanced. (Mentioned at 35:54)
  • 1.0 CFG multiplier: Classifier-Free Guidance value at which negative prompts are bypassed and sampling runs twice as fast. (Mentioned at 38:11)

Questions this video answers

Why did Comfyanonymous create ComfyUI instead of contributing to Automatic1111?

Comfyanonymous wanted to experiment with Automatic1111's high-res fix by using different samplers and chaining a second model for the refinement pass. Because Automatic1111's Gradio-based codebase made multi-model chaining harder to implement than starting from scratch, he began writing ComfyUI on January 1, 2023, and released it on GitHub on January 16, 2023.

YouTube: Latent Space, 1:10 to 5:25

From this keypoint: Outgrowing Automatic1111 Inspired ComfyUI

How did ComfyUI overtake Automatic1111 in popularity?

When Stability AI's SDXL 0.9 weights leaked and SDXL 1.0 launched in mid-2023, Automatic1111's quick implementation was too memory-inefficient to run on standard consumer GPUs below an RTX 4090. Because Comfyyanonymous had optimized ComfyUI's memory management while working at Stability AI, users with regular GPUs were forced to switch to ComfyUI to run SDXL locally.

YouTube: Latent Space, 44:30 to 48:10

From this keypoint: How the Leaked SDXL 0.9 Forced ComfyUI Adoption

Why doesn't ComfyUI use Gradio or Streamlit for its user interface?

Comfyanonymous avoids Gradio because it couples frontend interface logic and backend execution logic together, which leads to a messy, hard-to-maintain codebase for complex applications. Instead, ComfyUI separates its Python execution engine from its LiteGraph.js frontend via a clean API, enabling headless execution and custom frontends.

YouTube: Latent Space, 25:57 to 30:51

From this keypoint: Comfyanonymous Rejects Gradio for Clean APIs

Why does Stable Diffusion or Flux suddenly slow down when GPU memory fills up on Windows?

By default, the Windows Nvidia driver automatically pages overflow GPU memory to system RAM rather than throwing an out-of-memory error, which slows generation to a crawl. ComfyUI combats this by estimating the VRAM required before sampling and unloading only the minimum necessary cached models from the GPU.

YouTube: Latent Space, 30:51 to 35:12

From this keypoint: GPU Memory Management and AMD Windows Woes

Why did Stability AI's Stable Cascade model fail to gain traction?

Although Stable Cascade was an architectural improvement over SDXL and was ready three months prior to launch, it got delayed in internal red-teaming at Stability AI. By the time it launched, Stability AI announced SD3 just one week later, which stole all of Stable Cascade's community momentum.

YouTube: Latent Space, 10:06 to 14:41

From this keypoint: Comparing Flux, SD 3.5, and Stable Cascade

How does ComfyUI handle prompts longer than CLIP's 77-token limit?

Standard CLIP text encoders only accept 77 tokens at a time, though ComfyUI also supports Long-CLIP up to 256 tokens. For standard CLIP, ComfyUI splits long prompts into 77-token chunks, runs each chunk through the encoder separately, and concatenates the resulting vectors together.

YouTube: Latent Space, 20:05 to 25:57

From this keypoint: CLIP Token Chunking, T5, and LoRA Variants

Why doesn't numeric prompt weighting work well on Flux or T5-XXL models?

Prompt weighting in ComfyUI works by interpolating between an empty prompt vector and the target token vector, which relies on the shallow architecture of CLIP-L where input and output tokens remain closely correlated. In deeper language models like T5-XXL, token representations are heavily contextualized across layers, causing vector interpolation weighting to fail.

YouTube: Latent Space, 20:05 to 25:57

From this keypoint: CLIP Token Chunking, T5, and LoRA Variants

What is the difference between Mochi and Stable Video Diffusion or AnimateDiff?

Stable Video Diffusion and AnimateDiff add temporal attention layers onto 2D spatial latents, effectively generating moving 2D images without temporal compression. True video models like Mochi use 3D latents paired with a temporal VAE that compresses across both space and time.

YouTube: Latent Space, 41:37 to 44:30

From this keypoint: True 3D Video Latents in Mochi vs 2D Models

What does setting CFG to 1.0 do in ComfyUI samplers?

Classifier-Free Guidance (CFG) acts as a multiplier on the difference between the positive prompt prediction and the negative prompt prediction. Setting CFG to 1.0 means the negative prompt is not applied at all, which makes diffusion sampling run twice as fast.

YouTube: Latent Space, 35:12 to 41:37

From this keypoint: Sampler Parameters, CFG Math, and Custom Nodes

How does ComfyOrg plan to make money while keeping ComfyUI open source?

Comfyanonymous states that local execution of ComfyUI will remain free and open source, supported by an upcoming packaged V1 desktop installer for Windows and Mac. ComfyOrg plans to generate revenue by offering hosted cloud inference and enterprise features.

YouTube: Latent Space, 48:10 to 51:57

From this keypoint: ComfyOrg V1 Desktop App and Cloud Monetization

Credible AI™ signals

Confidence: Direct Creator Technical Deep. Comfyanonymous provides direct, first-hand technical accounts of building ComfyUI, working inside Stability AI during the SDXL and Stable Cascade launches, and implementing low-level PyTorch memory optimizations.

Bias: Open-Source Builder Pragmatism. The conversation strongly favors open-source, locally executed diffusion models and clean backend separation over rapid prototyping frameworks like Gradio or closed-source model APIs.

Originality (90%): First-Ever Creator Interview. This is the first podcast appearance by Comfyanonymous, offering previously unshared behind-the-scenes details on ComfyUI's creation, Stability AI's internal releases, and the architecture of node-based diffusion workflows.

Depth (85%): Granular Architecture Analysis. The hosts and guest dissect specific technical mechanisms including latent space compositing, CLIP token chunking, T5-XXL prompt weighting limitations, LoRA matrix multiplication, Windows VRAM paging, and 3D temporal VAEs.

Key points (12)

  • Short (17 min): key points 1, 7, 8 and 11
  • Medium (26 min): key points 1, 3, 7, 8, 11 and 12
  • Relaxed (51 min): all 12 key points

1. Outgrowing Automatic1111 Inspired ComfyUI

Timestamp: 00:01:10 to 00:05:25 (4 min)

Speaker: YouTube: Latent Space

Comfyanonymous discovered Stable Diffusion in October 2022 with no prior PyTorch experience and began modifying Automatic1111's high-res fix to test different samplers and models on second passes. Finding Automatic1111's codebase too rigid for multi-model chaining, he started coding ComfyUI on January 1, 2023, and released it on GitHub on January 16, 2023. The node graph interface emerged naturally as the cleanest way to represent diffusion pipelines.

Impact: High. Why it matters: Exposing the internal building blocks of diffusion pipelines turned image generation from simple prompt tweaking into modular visual engineering.

“so I started writing the code the January 1 2023 and then I released the first version on GitHub January 16 2023 that's how things got started”

In the video, at 4:58

Neutral: swyx

2. Area Conditioning and Joining Stability AI

Timestamp: 00:05:28 to 00:10:06 (5 min)

Speaker: YouTube: Latent Space

Comfyanonymous gained early traction on Reddit by demonstrating area conditioning, which applies distinct prompts to specific image regions at each diffusion step and averages them in latent space. He notes that multi-model compositing only works when models share the same latent space, which is why Stable Diffusion succeeded over slower pixel-space models. In June 2023, Stability AI hired him to chain SDXL's base and refiner models together.

Impact: Medium. Why it matters: Built-in support for multi-model chaining made ComfyUI the ideal proving ground for Stability AI's two-stage SDXL architecture.

“yeah well I used to work at stability oh I actually know yeah I used to work at stability I got uh I got hired uh in June 2023”

In the video, at 8:32

Neutral: swyx

3. Comparing Flux, SD 3.5, and Stable Cascade

Timestamp: 00:10:06 to 00:14:41 (5 min)

Speaker: YouTube: Latent Space

Evaluating the model landscape, Comfyanonymous ranks Flux as the best for consistency while recommending SD 3.5 (in 2.5B and 8B sizes) for smaller, more creative outputs. He reveals that Stable Cascade was ready three months early at Stability AI but got stuck in red-teaming and was announced just one week before SD3, killing its momentum. He adds that the community only switches models when improvements are substantial, keeping SD 1.5 and SDXL popular.

Impact: High. Why it matters: Internal release bottlenecks and poorly timed announcements can sink strong model architectures like Stable Cascade before an ecosystem forms.

“inside still ability actually that model was ready uh like three months before but it got stuck in uh red teaming”

In the video, at 12:27

Neutral: swyx

4. Why Aesthetic Vibes Beat Formal Evals

Timestamp: 00:14:41 to 00:16:54 (2 min)

Speaker: YouTube: Latent Space

When asked how the ComfyUI community evaluates models and workflows, Comfyanonymous explains that users rely on visual vibes rather than formal benchmarks. Because most images on the internet are ugly, training indiscriminately on all web images yields a smart, consistent model that produces unattractive pictures. Consequently, model creators must curate training data to match the aesthetic look artists expect.

Impact: Medium. Why it matters: In generative art tooling, subjective visual appeal outweighs academic benchmark metrics for driving user adoption.

“most the images on the internet are ugly so if you if that's like if you just oh I have the best model that can like it's super smart I train it on all the like I train on just all the images on the internet the images are not going to look good”

In the video, at 16:22

Neutral: swyx

5. Textual Inversion and Multi-Encoder Dilution

Timestamp: 00:16:54 to 00:20:05 (3 min)

Speaker: YouTube: Latent Space

Comfyanonymous breaks down textual inversion as training a new token vector for the text encoder to represent a visual concept from sample images. While Stability AI internally trained effective textual inversions on T5-XXL, community usage has largely faded. He notes that SD 1.5 textual inversions still function on SDXL and SD3 because they share the CLIP-L encoder, but their effect is diluted across two or three text encoders.

Impact: Low. Why it matters: As diffusion architectures scale to multiple text encoders, single-encoder embedding tricks lose potency without full multi-encoder training.

“sd3 has three text encoders so it works it still you can still use your text from version SD 1.5 on sd3 but it's just a lot weaker because now there's three text encoders so it gets even more diluted”

In the video, at 19:49

Neutral: swyx

6. CLIP Token Chunking, T5, and LoRA Variants

Timestamp: 00:20:05 to 00:25:57 (6 min)

Speaker: YouTube: Latent Space

Standard CLIP limits prompts to 77 tokens, though Long-CLIP fine-tunes extend this to 256 tokens, and ComfyUI works around the 77-token limit by splitting long prompts into 77-token chunks and concatenating the outputs. Comfyanonymous explains that prompt weighting works on shallow CLIP-L encoders by interpolating between empty and prompted vectors, but fails completely on deep encoders like T5-XXL used in Flux. He then explains how LoRA, LoHa, and LoCon represent weight differences via low-rank matrices.

Impact: Medium. Why it matters: Deeper language encoders in newer models like Flux make legacy numeric prompt-weighting hacks obsolete in favor of natural language descriptions.

“so that's how how it does a promptu waiting but this stops working the deeper your text encoder is so on T5 XSL it doesn't work at all”

In the video, at 23:06

Neutral: swyx

7. Comfyanonymous Rejects Gradio for Clean APIs

Timestamp: 00:25:57 to 00:30:51 (5 min)

Speaker: YouTube: Latent Space

While competitors tried to build simple interfaces, Comfyanonymous intentionally built a powerful, complex interface backed by smart partial re-execution and asynchronous queues, using LiteGraph.js for the initial frontend. He criticizes Gradio and Automatic1111 because Gradio mixes frontend interface logic and backend execution logic together into an unmaintainable mess. While fine for quick ML demos, he argues long-lasting software requires a strict API separation between frontend and backend.

Impact: High. Why it matters: Decoupling the execution backend from the UI allowed ComfyUI to scale into a headless workflow engine for startups and plugins.

“well it's cuz like front end and back end front end and back end should be well separated with a defined API like that's that's how we supposed to do it”

In the video, at 29:34

Neutral: swyx

8. GPU Memory Management and AMD Windows Woes

Timestamp: 00:30:51 to 00:35:12 (4 min)

Speaker: YouTube: Latent Space

Comfyanonymous identifies GPU memory management as the hardest engineering challenge in ComfyUI, requiring the engine to estimate sampling VRAM needs and unload the minimum number of cached models. On Windows, overflowing VRAM triggers Nvidia's driver to page to system RAM by default, drastically slowing generation without throwing an error. He also notes that while Nvidia dominates usage, AMD GPUs work on Linux but struggle on Windows until AMD completes native Windows ROCm PyTorch builds.

Impact: High. Why it matters: Dynamic VRAM estimation prevents Windows driver paging bottlenecks, allowing large 10GB+ models to run smoothly on consumer GPUs.

“if you start loading you can overflow your GPU memory and then it's the driver is going to automatically start paging to Ram but the problem with that is it it makes everything extremely slow”

In the video, at 32:29

Neutral: swyx

9. Sampler Parameters, CFG Math, and Custom Nodes

Timestamp: 00:35:12 to 00:41:37 (6 min)

Speaker: YouTube: Latent Space

ComfyUI exposes four tiers of sampler nodes from basic to custom advanced, where users tune diffusion steps for speed and Classifier-Free Guidance (CFG) as a multiplier on positive minus negative predictions. Setting CFG to 1.0 disables the negative prompt and doubles sampling speed. Comfyanonymous also highlights the ecosystem of third-party integrations, such as the Krita plugin, Wolfenstein texture generators, and the new official Node Registry replacing manual GitHub scraping.

Impact: Medium. Why it matters: Making custom nodes easy to author transformed ComfyUI from an image generator into an extensible visual data pipeline.

“so the only thing you know with CFG is if it's 1.0 then that means the negative prpt isn't applied also mean sampling is two times faster”

In the video, at 38:09

Neutral: swyx

10. True 3D Video Latents in Mochi vs 2D Models

Timestamp: 00:41:37 to 00:44:30 (3 min)

Speaker: YouTube: Latent Space

Distinguishing between video architectures, Comfyanonymous argues that Stable Video Diffusion and AnimateDiff are not true video models because they only add temporal attention on top of 2D spatial latents from SD2. In contrast, true video models like Mochi use 3D latents and a temporal VAE that compresses across both spatial and temporal dimensions. He implemented Mochi in ComfyUI as the strongest open video model alongside contenders like CogVideo.

Impact: Medium. Why it matters: Shifting from 2D frame-by-frame latents to 3D temporal VAEs enables coherent motion and camera movement in open-source video generation.

“why I say it's not a true video models you still have like the 2D latens like a true video model like Mochi for example would have 3D latens so you can like move through the space”

In the video, at 42:21

Neutral: swyx

11. How the Leaked SDXL 0.9 Forced ComfyUI Adoption

Timestamp: 00:44:30 to 00:48:10 (4 min)

Speaker: YouTube: Latent Space

Recounting ComfyUI's growth, Comfyanonymous notes an early March 2023 YouTube video by Olivio brought initial users, but the true inflection point was the SDXL release after he joined Stability AI in June 2023. Stability AI released SDXL code before checkpoints and restricted SDXL 0.9 weights to .edu emails, which immediately leaked. Because Automatic1111's quick implementation was too inefficient to run SDXL on standard consumer GPUs below an RTX 4090, users were forced to adopt ComfyUI.

Impact: High. Why it matters: Hardware efficiency during a flagship model launch proved far more decisive for market share than user-friendly onboarding.

“automatic was so like inefficient and bad that most people couldn't act like it just wouldn't wouldn't work like cuz he he did a quick implementation so people were forced to use kyui and that's how it became popular because people had no choice”

In the video, at 47:34

Neutral: swyx

12. ComfyOrg V1 Desktop App and Cloud Monetization

Timestamp: 00:48:10 to 00:51:57 (4 min)

Speaker: YouTube: Latent Space

Comfyanonymous outlines the roadmap for ComfyOrg, which is currently focused on polishing the long-neglected frontend for an upcoming packaged V1 desktop application with easy installation on Windows and Mac. While committed to keeping open-source local execution the best way to run diffusion models, the team plans to hire backend engineers and monetize through cloud inference and enterprise features. He welcomes third-party startups building on ComfyUI because they expand the ecosystem, and remains open to adding text diffusion models if open weights emerge.

Impact: High. Why it matters: Packaging ComfyUI into an easy desktop installer while offering cloud inference bridges the gap between power users and enterprise teams.

“we're still going to continue like doing the open source like makingi the best way to run uh like stable diffusion models like at least the the open source side and like it's going to be best way to run or models locally but we will have a few like a few things to to make money from it like uh Cloud inference”

In the video, at 49:35

Neutral: swyx

Conflicts of interest (2)

Creator Stake in ComfyUI and ComfyOrg

Commercial conflict, Medium severity

Comfyanonymous is the creator and lead developer of ComfyUI and ComfyOrg, which plans to monetize via cloud inference and enterprise offerings.

Significance: His commercial and reputational stake in ComfyUI informs his sharp criticism of rival tools like Automatic1111 and Gradio and his favorable framing of ComfyUI's architecture.

Past Employment at Stability AI

Professional conflict, Low severity

Comfyanonymous worked as an engineer at Stability AI starting in June 2023 to build SDXL support.

Significance: His insider tenure shapes his assessment of Stability AI models like SD 3.5 and Stable Cascade relative to competing models.

Key sources

  • swyx: Founder of Smol AI, Co-host of Latent Space
  • YouTube: Latent Space

Who's in this

  • ComfyUI
  • Automatic1111
  • Stability AI
  • Stable Diffusion
  • Flux
  • Gradio
  • PyTorch
  • Nvidia
  • AMD
  • Mochi

Also mentioned

  • SDXL (First mentioned at 7:47)
  • LoRA (First mentioned at 16:54)
  • CLIP (First mentioned at 19:38)
  • Latent Space (First mentioned at 0:04)
  • Stable Cascade (First mentioned at 12:03)
  • T5-XXL (First mentioned at 18:58)
  • LiteGraph.js (First mentioned at 28:23)
  • Windows (First mentioned at 32:17)
  • ComfyOrg (First mentioned at 44:33)
  • Python (First mentioned at 2:11)
  • GitHub (First mentioned at 5:05)
  • Reddit (First mentioned at 6:07)
  • Würstchen (First mentioned at 13:20)
  • Long-CLIP (First mentioned at 20:20)
  • Streamlit (First mentioned at 28:48)
  • Linux (First mentioned at 34:10)
  • ROCm (First mentioned at 34:46)
  • AnimateDiff (First mentioned at 38:38)
  • Krita (First mentioned at 38:56)
  • Stable Video Diffusion (First mentioned at 41:44)
  • CogVideo (First mentioned at 43:20)
  • Decibel Partners (First mentioned at 0:08)
  • Smol AI (First mentioned at 0:10)
  • Chroma (First mentioned at 0:12)
  • MultiDiffusion (First mentioned at 7:14)
  • Robin Rombach (First mentioned at 8:28)
  • DALL-E (First mentioned at 11:19)
  • Vienna (First mentioned at 13:29)
  • SigLIP (First mentioned at 20:07)
  • BLIP (First mentioned at 20:09)
  • React Flow (First mentioned at 28:28)
  • Lisa Su (First mentioned at 35:09)
  • IP-Adapter (First mentioned at 38:38)
  • Wolfenstein (First mentioned at 39:42)
  • Kling (First mentioned at 43:38)
  • OmniGen (First mentioned at 44:24)
  • Midjourney (First mentioned at 51:41)

This analysis was generated by skim (skim.plus), an AI-powered content analysis platform by Credible AI. Scores and classifications represent the platform's AI-generated assessment and should be considered alongside other sources.