Skip to main content
Use casesIntermediate5 min read

Local Images: ComfyUI 0.40 and comfy_attention — new for all models

i
iaLocale Team
•
Local Images: ComfyUI 0.40 and comfy_attention — new for all models

Generating images locally is no longer news. What still is, is a less visible aspect: the engine that drives the models. ComfyUI 0.40, released on October 13, touches exactly that — and in a way that concerns every model, not just one.

The starting point is simple: the quality of open models (SDXL, FLUX, Qwen-Image) is no longer the bottleneck. The infrastructure that runs them is: how they handle VRAM, which attention kernel they use, and how results come out. ComfyUI 0.40 answers all three.

comfy_attention: one attention engine for all models

Until now, ComfyUI's support for the new attention container (AttentionTensorContainer) was limited to a subset of models. In 0.40 it is extended to all models (0.40.0 release).

What changes in practice:

  • Per-model configuration — model files can declare which attention kernel to use: the new comfy_attention config can select the "kitchen sol attention" kernel, on top of flash attention and SDPA.
  • LoRA override — a LoRA can replace the base model's per-layer attention configuration: you train a personalization that also changes execution behavior, not just the aesthetic result.

Why it matters: the attention kernel is one of the few places where the same GPU produces very different speeds depending on how the math is written. Having the choice — per model, and modifiable with a LoRA — means optimizing the same workflow on an AMD laptop and an NVIDIA workstation without touching the rest of the pipeline.

An honest note: the release publishes no official benchmarks for comfy_attention. The benefit is in the unification and the configurability, not in a number that ComfyUI has measured and published.

The asset API, locally

Version 0.40 implements the asset export API locally (CORE-454): workflow results come out as system-managed assets, on by default in this release — disable it with --disable-assets.

In practice: if you connect ComfyUI to an external tool (an interface, a script, a service that consumes your outputs), the exchange format becomes standard and local. No image passes through an external service to be "registered" or served. For anyone assembling a small graphics production line on their own hardware — a catalog, variants, site assets — this is the missing piece to automate the last mile.

Standardized 3D outputs

All 3D nodes now export the model as a standard 3D output item (PR 16200), and two new camera nodes arrive: CreateCameraInfo and CameraAngle.

3D locally is still a niche — open 3D models remain far from the photographic quality of DiTs — but standardizing the output means 3D workflows compose with the same connectors as 2D. Those experimenting with product renders or prototyping have less friction wiring a 3D generator into an image.

Real VRAM: the table that counts

ComfyUI 0.40 also ships low-VRAM performance improvements for Qwen 3.5 LLMs (PR 16820) and a native LoRA stack loader (CORE-186). But the question stays the same: how many GB do you really need?

This is the reference table we have used in our image-model articles, still valid today:

ModelParametersNative resolutionRecommended VRAMArchitecture
SD 1.5~0.9B512px6-8GBU-Net
SDXL 1.02.6B1024px12GBU-Net
FLUX.1 [schnell]12B1024px16GBDiT
FLUX.1 [dev]12B1024px16-24GBDiT
Qwen-Image 2.17B2048px16GBDiT

With Qwen-Image 2.1 the details matter: in bfloat16 the model occupies about 14GB of VRAM. With 16GB (RTX 4060 Ti 16GB, RTX 5080) it runs, with offload to CPU if the scene is 2K; with 24GB (RTX 4090, 3090) it is comfortable without offload; below 16GB you drop the output to 1024×1024 or use CPU offload. As explained in Qwen-Image 2.1: Generate and Edit Images Locally, the full reasoning — and the choice by budget — is in the guide Local Image Models: From SDXL to Qwen-Image.

And the limits?

  • No official numbers — ComfyUI has not published speedups for comfy_attention; expect improvements, not a guaranteed multiplier.
  • The asset API is young — on by default, but the ecosystem of external tools consuming it is still being born.
  • 3D is experimental — standardized outputs, yes; quality comparable to photography, no.

While this is being written: 0.43 is already out

0.40 is from October 13; today 0.43.0 is already available, with MOSS-Image support (rope scaling, color-depth and edit LoRAs), FLUX 3 Max and FLUX 3 Video 2K/4K nodes, Fibo 2.0 support, and the first part of dynamic-VRAM KV caches (0.43.0 release). ComfyUI's pace is a major release per month: a workflow that uses comfy_attention today can, in a month, count on the new nodes too without redoing the infrastructure.

Sources

In summary

ComfyUI 0.40 extends comfy_attention to all models, with kernels selectable per model and overridable via LoRA; turns on the asset system by default with a local API; and standardizes 3D node output. VRAM remains the variable that decides what runs: the table above is the reference. If your setup has 16GB, quantized FLUX and Qwen-Image 2.1 are the starting point; with 24GB, DiTs at full quality without offload. To squeeze more from your hardware, quantization remains the most direct lever.

Article generated with AI

#comfyui#diffusion#generazione#immagini#vram
Share:

Enjoyed this article?

Subscribe to the newsletter for new tutorials and guides.

After signing up you receive a confirmation email (double opt-in). Without confirmation we send nothing. No spam, we promise.

Related Articles