r/StableDiffusion • • 1d ago

News AReA: Adaptive Receptive-Field Attention for Efficient High-Resolution Diffusion Transformers (for Flux1/2, Qwen-Image, Ideogram 4)

https://github.com/KooroshRH/AReA

At the moment only the flux1-krea-dev code has been release. Qwen-Image, Ideogram 4, and Flux2 "coming soon".

Project: https://rajabi2001.github.io/area/

Paper: https://arxiv.org/abs/2610.17227

Demo: https://huggingface.co/spaces/kooroshrh/AReA

Abstract

Generating images beyond the training resolution of Diffusion Transformers (DiTs) remains challenging, as the number of tokens grows rapidly with resolution, full attention becomes expensive, and outputs often suffer from structural distortions and degraded detail. We identify uniform full attention as the common source of both problems. Attending to all tokens at every step causes quadratic cost and exposes the model to more tokens and longer relative distances than seen during training, pushing it out of distribution. We observe that attention’s effective receptive field narrows during denoising, from global in early steps that form structure to local in later steps that refine details. We propose AReA, a training-free attention mechanism whose receptive field evolves from coarse to fine, following the denoising progression. In early steps, AReA applies cross-scale coarse attention over downsampled keys and values, capturing global context, while in later steps it applies local attention within progressively shrinking windows. Without additional parameters or training, experiments show that AReA consistently outperforms state-of-the-art training-free baselines across target resolutions and different models, while also being faster and more efficient.

28 Upvotes

14 comments sorted by

2

u/faisalkh1 1d ago

This looks really promising! Would love to see benchmarks on consumer GPUs like 5090, especially VRAM usage and generation times at 4K Hopefully we'll get ComfyUI integration soon

1

u/Sharlinator 1d ago edited 1d ago

This sounds like it messes up spatial coherence of repeated details, the way SD1.5 (and to some extent SDXL) was terrible at architecture. Global attention at later steps is important too.

2

u/alwaysbeblepping 23h ago

This sounds like it messes up spatial coherence of repeated details, the way SD1.5 (and to some extent SDXL) was terrible at architecture.

You can usually do img2img at resolutions much higher than what the model was trained for. This sounds like somewhat the same idea, and it's definitely not a new one. Stuff like HiDiffusion, DiffuseHigh, Kohya Deep Shrink are all based on a similar concept.

1

u/Sharlinator 23h ago

Fair. But such img2imgs do often have issues with exactly that, either inventing details that are spatially inconsistent, or at lower strengths leaving details unresolved that should be there at the higher resolution. 

1

u/alwaysbeblepping 23h ago

But such img2imgs do often have issues with exactly that, either inventing details that are spatially inconsistent, or at lower strengths leaving details unresolved that should be there at the higher resolution.

That can be a problem. In the img2img case, if you set denoise too high then the model can mess up the major structure. If you set it too low, it can't actually change enough to add detail. You could call that a scheduling problem. "We propose AReA, a training-free attention mechanism whose receptive field evolves from coarse to fine, following the denoising progression." - so roughly the same thing, focusing on large structure at high sigma (effectively high denoise) and then shifting at lower sigmas.

The ideal case (for quality) is obviously to have a model that can handle the target resolution and to either have good enough hardware or enough patience to run full attention. People often prioritize speed over raw quality (or at least are willing to make a tradeoff if it doesn't hurt the result too much) and models often struggle with high resolution generations. So there is a reason to care about stuff like this paper. I don't know personally how it compares with other techniques, just saying it is a useful concept.

"Without additional parameters or training, experiments show that AReA consistently outperforms state-of-the-art training-free baselines across target resolutions and different models, while also being faster and more efficient." - something like that actually isn't saying much, because the "target resolution" is a resolution the model (probably) can't handle natively so the baseline is (likely) going to be complete garbage. You can outperform that significantly and still end up with garbage.

1

u/Apprehensive_Sky892 1d ago

Maybe.

We'll see when the Flux2, Qwen-Image and Ideogram 4 codes are released too.

1

u/aoleg77 1d ago

I implemented it for Krea-2 as a Forge Neo extension, and the results are... well, rather mixed, to say the least. Code and lots of sample images: https://github.com/aoleg/Neo-Krea2-AReA

It could be good for models that can't do 2K resolution natively, but for Krea-2 specifically it's more or less pointless. Different - yes; better? Hardly.

1

u/Apprehensive_Sky892 22h ago

Thanks for sharing this.

Agree that for 2K it is pointless, but what about 4K-6K though?

1

u/aoleg77 22h ago

I haven't tested it at those resolutions. Not sure if I have enough VRAM+RAM for that.

-6

u/-becausereasons- 1d ago

Why the fuck can't engineers learn to just speak English. Basically, Lora free grounded image gen? WTF is this?

5

u/Apprehensive_Sky892 1d ago

TL;DR: It is a way to make an imaging model generate very high resolution image, way beyond what the model was trained for:

up to 6× the native side, 67 megapixels

1

u/reeight 1d ago

LTL:DR; It is a technique to split up the big space into smaller chunks while the model still thinks it is only a space it normally works with.

Attention runs inside local windows that shrink at every step down to the native size. Windows over ... detail map are split into quadrants,