Abstract
For faster sampling and higher sample quality, we propose DiNof (Diffusion with Normalizing flow priors), a technique that makes use of normalizing flows and diffusion models. We use normalizing flows to parameterize the noisy data at any arbitrary step of the diffusion process and utilize it as the prior in the reverse diffusion process. More specifically, the forward noising process turns a data distribution into partially noisy data, which are subsequently transformed into a Gaussian distribution by a nonlinear process. The backward denoising procedure begins with a prior created by sampling from the Gaussian distribution and applying the invertible normalizing flow transformations deterministically. To generate the data distribution, the prior then undergoes the remaining diffusion stochastic denoising procedure. Through the reduction of the number of total diffusion steps, we are able to speed up both the forward and backward processes. More importantly, we improve the expressive power of diffusion models by employing both deterministic and stochastic mappings. Experiments on standard image generation datasets demonstrate the advantage of the proposed method over existing approaches. On the unconditional CIFAR10 dataset, for example, we achieve an FID of 2.01 and an Inception score of 9.96. Our method also demonstrates competitive performance on CelebA-HQ-256 dataset as it obtains an FID score of 7.11.
Introduction
Generative modeling has recently been dominated by Diffusion Models, which achieve high-fidelity synthesis by learning to reverse a gradual noising process. However, these models face two primary challenges: slow sampling speeds due to the requirement of many discretization steps, and the use of a "blind" Gaussian prior. Standard diffusion starts the reverse process from pure, unstructured noise, forcing the model to reconstruct the entire data distribution from scratch in every generation cycle.
To address these bottlenecks, we introduce DiNof (Diffusion with Normalizing Flow priors). By integrating deterministic Normalizing Flows (NFs) with stochastic diffusion, we create a hybrid framework that utilizes a structured, data-dependent prior, enabling faster and more accurate image generation.
Methodology: The Split-Trajectory Approach
The core innovation of DiNof lies in its split-trajectory architecture, which divides the generative process into two distinct mathematical regimes:
- Stochastic Diffusion (SDEs): For the steps closest to the data manifold ($t=0$ to an intermediate step $T_m$), the model employs standard linear Stochastic Differential Equations. This stochasticity is essential for capturing the fine-grained, high-frequency details of the target distribution.
- Deterministic Normalizing Flows (ODEs): For the transition between the intermediate point ($T_m$) and the latent Gaussian space ($T$), the model utilizes a Normalizing Flow (specifically the Glow architecture). NFs provide a deterministic and invertible mapping, effectively "nonlinearizing" the diffusion process.
In the forward process, data is partially noised stochastically before being deterministically mapped to a Gaussian distribution. During generation (the backward process), a sample from the Gaussian distribution is transformed via the Flow to provide a "structured prior" at $T_m$. The process then concludes with stochastic denoising to produce the final image.
Experiments and Results
We evaluated DiNof on two benchmark datasets: CIFAR-10 (32x32) and CelebA-HQ-256 (256x256).
Performance and Efficiency
DiNof demonstrates superior performance in both image quality and sampling efficiency. On CIFAR-10, the model achieves a state-of-the-art FID of 2.01 and an Inception Score of 9.96. Notably, it outperforms established baselines like DDPM and LSGM while requiring fewer sampling steps.
As shown in the comparative analysis, DiNof (represented by the red diamond) achieves a lower FID at 600 steps than many competing models achieve at 1000 steps. In practical terms, DiNof generated CIFAR-10 samples in 24 seconds, compared to 43 seconds for the DDPM++ baseline—a 1.7x speedup accompanied by a significant improvement in FID (2.01 vs 2.78).
On the high-resolution CelebA-HQ-256 dataset, DiNof remains competitive, yielding an FID of 7.11 and producing sharp, diverse facial images.
Discussion and Conclusion
The success of DiNof stems from its ability to optimize the transition between noise and data. By identifying a "sweet spot" at $T_m = 0.6$, the model balances the deterministic efficiency of Normalizing Flows with the expressive power of stochastic diffusion.
While the addition of the Glow architecture increases the parameter count by approximately 7 million, the resulting gains in sampling speed and quality justify the increased memory footprint during training. Future research will explore extending this hybrid approach to conditional generation tasks, video synthesis, and image inpainting.
Code is available at https://github.com/MohsenZand/DiNof.
Summary updated