← Latest papers
💻 computer science

Just-in-Time: Training-Free Spatial Acceleration for Diffusion Transformers

This paper introduces Just-in-Time (JiT), a training-free framework that accelerates Diffusion Transformers by leveraging spatial redundancy to compute updates on a sparse subset of anchor tokens, achieving up to a 7x speedup with nearly lossless image quality on the FLUX.1-dev model.

Original authors: Wenhao Sun, Ji Li, Zhaoqiang Liu

Published 2026-03-12
📖 5 min read🧠 Deep dive

Original authors: Wenhao Sun, Ji Li, Zhaoqiang Liu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are an artist tasked with painting a massive, hyper-realistic mural of a bustling city.

The Old Way (The Problem):
Currently, the most advanced AI artists (called Diffusion Transformers) work like a perfectionist who paints the entire mural one tiny square inch at a time, from the very first stroke to the last. They start with a blank canvas covered in static (noise) and slowly refine every single pixel simultaneously.

The problem? This is incredibly slow. Even for a simple image, the AI has to "think" about every single pixel thousands of times before the picture is done. It's like trying to fill a swimming pool by pouring water in one drop at a time, checking the level after every drop. It's accurate, but it takes forever and requires a massive amount of energy.

The New Idea (JiT - Just-in-Time):
The paper introduces a new method called JiT (Just-in-Time). Instead of painting the whole wall at once, JiT acts like a smart, efficient foreman who knows exactly when and where to send the painters.

Here is how JiT works, broken down into three simple concepts:

1. The "Big Picture First" Strategy (Spatial Redundancy)

When you look at a blurry photo coming into focus, what do you see first? You see the big shapes: the sky, the horizon, the outline of a building. You don't see the texture of the bricks or the individual leaves on a tree until the very end.

  • The Analogy: Imagine building a house. You wouldn't start by installing the doorknobs and painting the trim before you've even poured the foundation.
  • How JiT uses this: In the early stages of generating an image, JiT realizes that most of the "pixels" (called tokens) are just filling in empty space or repeating the same background information. So, it tells the AI: "Hey, don't waste brainpower on the empty sky or the blurry background yet. Just focus on the few key spots that define the main shape."
  • The Result: The AI only does the heavy math on a small, sparse set of "anchor" tokens (the important bits) and guesses the rest. This saves a massive amount of time.

2. The "Smart Guess" (SAG-ODE)

You might ask, "If it's only looking at a few spots, won't the rest of the image be a mess?"

  • The Analogy: Think of a jigsaw puzzle. If you have the corner pieces and a few key pieces in the middle, you can easily guess what the picture in between looks like without actually looking at every single piece.
  • How JiT uses this: JiT uses a clever mathematical trick (called a Lifter) to take the calculations from those few important "anchor" spots and smoothly "stretch" them to fill the whole image. It's like taking a low-resolution sketch and using a smart algorithm to fill in the gaps so it looks like a high-res photo, without actually doing the work for every single pixel.

3. The "Seamless Handoff" (Deterministic Micro-Flow)

As the image gets clearer, the AI needs to start paying attention to more details (like the texture of the bricks or the eyes of a person). JiT gradually "wakes up" more parts of the image.

  • The Analogy: Imagine a construction crew. At first, only the foundation crew is working. Then, the framing crew arrives. If the framing crew just jumps in and starts hammering randomly, the house might collapse. They need a smooth transition where the new workers fit perfectly with the old ones.
  • How JiT uses this: When JiT decides to "wake up" a new section of the image, it uses a special Micro-Flow process. It gently guides the new, inactive parts of the image to match the style and noise level of the active parts. This prevents "glitches" or weird artifacts (like a blurry face suddenly appearing on a sharp body). It ensures the transition is invisible to the human eye.

The "Just-in-Time" Magic

The name Just-in-Time comes from manufacturing (like Toyota's car factories), where parts are delivered exactly when they are needed, not before.

  • Old Way: The AI tries to process the whole image (all parts) at every single step, even when it doesn't need to.
  • JiT Way: JiT delivers the "computational power" (the parts) Just-in-Time.
    • Early stage: Only the "skeleton" of the image is processed.
    • Middle stage: The "muscles" and "skin" are added.
    • Final stage: The "makeup" and "jewelry" (fine details) are applied.

The Results

The paper tested this on FLUX.1-dev, one of the best image generators available today.

  • Speed: It made the AI 4 to 7 times faster.
  • Quality: The images looked almost identical to the slow, perfect version. There were no blurry patches or weird glitches.
  • No Training Needed: The best part? They didn't have to retrain the AI model. They just changed how the AI runs, like giving a supercomputer a better set of instructions rather than building a new computer.

In Summary:
JiT is like hiring a team of painters who stop trying to paint the whole wall at once. Instead, they focus on the big shapes first, guess the empty spaces, and only bring in the detailed painters when the picture is almost done. The result? A masterpiece created in a fraction of the time.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →