CLEAR: Conv-Like Linearization Revs Pre-Trained Diffusion Transformers Up

Songhua Liu, Zhenxiong Tan, Xinchao Wang

TL;DR

CLEAR (Conv-Like Linearization) is a new strategy that converts the slow, quadratic attention of pre-trained Diffusion Transformers (DiTs) into a fast, linear-complexity mechanism. By restricting attention to a local circular window and distilling knowledge from a teacher model using just 10,000 samples, CLEAR achieves a 6.3x speedup for 8K image generation while maintaining the high visual quality of state-of-the-art models like FLUX.1.

What Problem Does This Paper Address?

Diffusion Transformers (DiTs) have recently overtaken U-Nets as the gold standard for high-quality image generation. However, they have a massive Achilles' heel: quadratic complexity.

In a standard DiT, every "token" (a small patch of pixels) must attend to every other token. If you double the image resolution, the number of tokens quadruples, and the computational cost of attention increases by 16 times. This makes ultra-high-resolution generation (like 4K or 8K) prohibitively slow—sometimes taking over 30 minutes for a single image on a top-tier H100 GPU.

While researchers have proposed "efficient attention" methods before, most fail when applied to pre-trained models. They often produce blurry details, distorted textures, or require massive amounts of data to retrain. The authors of CLEAR set out to find a way to linearize these pre-trained giants without losing the "magic" that makes them work.

Methods

The authors first identified four pillars for successful linearization:

  1. Locality: Pixels mostly care about their neighbors.
  2. Formulation Consistency: Stick to the standard softmax attention math.
  3. High-Rank Attention: Don't assume the attention matrix is "simple" or low-rank.
  4. Feature Integrity: Don't compress or downsample the raw features.

Based on these, they developed CLEAR. Instead of global self-attention, CLEAR uses a convolution-like local attention. For every image token, the model only looks at other tokens within a predefined circular radius ($r$). This changes the complexity from $O(N^2)$ to $O(N)$, making the compute cost scale linearly with the number of pixels.

To make this work with a pre-trained model (like FLUX.1-dev), they used Knowledge Distillation. They took the original model as a "teacher" and fine-tuned the attention layers of a "student" model. Crucially, they found that the student only needed to see 10,000 images—generated by the teacher itself—to learn how to produce nearly identical results.

Datasets

  • Training: 10,000 synthetic images self-generated by the FLUX.1-dev model.
  • Evaluation: The COCO2014 validation set (5,000 images) was used to benchmark standard metrics like FID (Fréchet Inception Distance) and CLIP scores.
  • Prompts: They used GPT-4o to generate diverse, descriptive prompts for qualitative testing.

Key Insights and Ideas

  • The Locality Discovery: The authors found that pre-trained DiTs are surprisingly local. If you "break" the connections between distant pixels, the image stays fine. If you break the connections between nearby pixels, the image collapses. This justifies why a local window works so well.
Visualizing the Locality Discovery: Perturbing remote features preserves the image, while perturbing local features destroys it.
  • Synthetic Data is Better: Surprisingly, distilling the model using its own generated images worked better than using high-quality real-world datasets. This is likely because the student is learning to mimic the teacher's specific internal "logic" rather than just learning to see the world.
  • Zero-Shot Generalization: Once the CLEAR layers are trained on one model (like FLUX.1-dev), they can be dropped into related models (like the faster FLUX.1-schnell) or used with plugins like ControlNet without any extra training.
  • Circular > Square: Using a circular window instead of a square one reduces the computation by about 21% ($\pi/4$ factor) with no loss in quality.

Key Results

  • Massive Speedups: For 8K resolution images, CLEAR is 6.3x faster than the original FLUX.1-dev.
  • Compute Efficiency: It reduces the number of attention GFLOPS by 99.5% for ultra-high-resolution tasks.
CLEAR achieves up to 6.3x faster generation and saves 99.5% of GFLOPS at 8K resolution compared to the original FLUX.1-dev.
  • Quality Retention: On the COCO benchmark at 1024x1024, CLEAR achieved an FID of 8.85, actually outperforming the original model's baseline in some configurations while using significantly less compute.
  • Parallel Power: CLEAR supports a new "patch-parallel" inference mode, allowing multiple GPUs to work on different parts of an image with very little communication overhead.

Limitations and Future Work

The biggest hurdle is hardware optimization. While CLEAR reduces the theoretical amount of math (GFLOPS) by 99.5%, the actual speedup is "only" 6.3x. This is because modern GPUs are highly optimized for "dense" global attention (via kernels like FlashAttention). CLEAR's "sparse" local pattern doesn't yet have a custom-fused CUDA kernel, meaning there is still a lot of performance left on the table.

Additionally, because the model is now "local," it might eventually struggle with global symmetry or long-range coordination in extremely complex scenes. The authors suggest that future work could involve adding a few "global tokens" (similar to a summary of the whole image) to help the local windows stay coordinated.

Summary updated

BibTeX
@inproceedings{liu2025clear,
  author = {Songhua Liu and Zhenxiong Tan and Xinchao Wang},
  title = {{CLEAR: Conv-Like Linearization Revs Pre-Trained Diffusion Transformers Up}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=B9Aj2aWLKi},
}
Figure