Introduction
Diffusion and flow-matching models generate incredible images but are notoriously slow due to their multi-step iterative nature. To address this, researchers introduce Solution Flow Models (SoFlow), a framework that directly learns the solution to the generative differential equation. This enables high-quality, one-step image generation from scratch. Crucially, SoFlow bakes Classifier-Free Guidance (CFG) directly into the training process and avoids computationally expensive Jacobian calculations, making it significantly faster and more memory-efficient to train than prior state-of-the-art one-step methods.
The Bottleneck in Few-Step Generation
Standard generative models work by slowly transforming a simple distribution (like static noise) into a complex one (like images). Generating a single image requires passing the data through a neural network dozens or hundreds of times, which is computationally expensive.
While researchers have tried building "few-step" or "one-step" models (like Consistency Models) that jump directly from noise to the final image, training them from scratch is unstable. Furthermore, they struggle to utilize Classifier-Free Guidance (CFG)—a standard trick that dramatically improves image quality—without requiring multiple steps during inference.
Recent attempts to fix this, such as MeanFlow, introduced a new bottleneck: their math requires calculating a Jacobian-Vector Product (JVP). Deep learning frameworks like PyTorch have not optimized JVPs well, meaning these models cannot use modern memory-saving tricks like FlashAttention, resulting in massive GPU memory consumption and slow training.
The SoFlow Approach
To solve these bottlenecks, the authors propose Solution Flow Models (SoFlow). Instead of learning the velocity of the noise-to-image trajectory and relying on a solver to take steps, SoFlow is parameterized to directly learn the solution function. It explicitly maps a noisy state at any time $t$ to its evolved state at any other time $s$.
- Hybrid Training Objective: The model is trained using a combination of a Flow Matching Loss and a Solution Consistency Loss.
- CFG During Training: Because the model uses a flow matching loss, it can estimate velocity fields during training. The authors use this to mix conditional and unconditional predictions during the training phase. This bakes the guidance directly into the model, allowing it to generate guided images in exactly one step during inference.
- JVP-Free Math: The authors use a Taylor expansion approximation to formulate their consistency loss. This completely sidesteps the need for Jacobian-Vector Products, making the model fully compatible with PyTorch's memory-efficient attention backends.
Key Results
SoFlow demonstrates superior image quality and efficiency, particularly on the ImageNet 256x256 dataset (operating in the latent space of a pre-trained VAE) and CIFAR-10 (unconditional generation in pixel space).
- State-of-the-Art 1-Step Generation: On ImageNet 256x256, SoFlow consistently outperforms the previous state-of-the-art (MeanFlow) across all model sizes when trained from scratch. The largest model tested (SoFlow-XL/2) achieved an impressive FID-50K score of 2.96 using exactly 1 function evaluation (1-NFE), and 2.66 with 2-NFE. On CIFAR-10, it achieved a highly competitive 1-step FID of 2.86.
- Massive Efficiency Gains: Because SoFlow avoids JVP calculations and can use memory-efficient attention, it reduces peak GPU memory usage by ~31% (35.4GB vs 51.4GB) and increases training speed by 23% (2.94 vs 2.39 iterations/sec) compared to MeanFlow on the same hardware.
Limitations and Future Work
While highly effective, the paper focuses exclusively on training models from scratch. Although the method could theoretically be used for distillation (compressing an already-trained multi-step model into a one-step model), this remains unexplored. Additionally, experiments are currently limited to standard academic image benchmarks up to 256x256 resolution. It remains to be seen how well SoFlow scales to highly complex, arbitrary text-to-image generation or higher resolutions.
Summary updated