Source-linked AI summary

UFOGen: You Forward Once Large Scale Text-to-Image Generation via Diffusion GANs

Yanwu Xu, Yang Zhao, Zhisheng Xiao, Tingbo Hou

arXiv:2311.09257v5cs.CV

TL;DR

Text-to-image diffusion models offer high-quality synthesis but require costly iterative inference. UFOGen combines diffusion models with a GAN objective and pre-trained Stable Diffusion initialization to enable one-step generation, with reported versatility across text-to-image and downstream tasks. Its evaluation also cautions that MS-COCO zero-shot FID alone may not reliably measure visual quality.

  • Problem

    Iterative denoising makes large-scale text-to-image diffusion models slow and computationally demanding, limiting deployment efficiency.

  • Method

    UFOGen combines a diffusion model with a GAN objective and initializes its generator and discriminator using pre-trained Stable Diffusion models.

  • Results

    UFOGen generates high-quality text-conditioned images in one inference step while largely preserving generated-content quality after Stable Diffusion initialization.

  • Takeaways & Limitations

    UFOGen extends one-step inference to text-to-image synthesis and downstream applications including image-to-image and controllable generation.

  • Takeaways & Limitations

    MS-COCO zero-shot FID alone may not reliably evaluate visual quality, motivating qualitative assessment alongside that metric.

Abstract

from arXiv · show

Text-to-image diffusion models have demonstrated remarkable capabilities in transforming textual prompts into coherent images, yet the computational cost of their inference remains a persistent challenge. To address this issue, we present UFOGen, a novel generative model designed for ultra-fast, one-step text-to-image synthesis. In contrast to conventional approaches that focus on improving samplers or employing distillation techniques for diffusion models, UFOGen adopts a hybrid methodology, integrating diffusion models with a GAN objective. Leveraging a newly introduced diffusion-GAN objective and initialization with pre-trained diffusion models, UFOGen excels in efficiently generating high-quality images conditioned on textual descriptions in a single step. Beyond traditional text-to-image generation, UFOGen showcases versatility in applications. Notably, UFOGen stands among the pioneering models enabling one-step text-to-image generation and diverse downstream tasks, presenting a significant advancement in the landscape of efficient generative models.

1. Introduction

Diffusion models produce high-quality text-conditioned images but remain slow because iterative denoising makes large-scale deployment computationally demanding. UFOGen addresses this challenge with a diffusion-GAN hybrid that fine-tunes pre-trained diffusion models for one-step generation and related applications.

  • Motivation: Diffusion models generate high-quality text-conditioned images, but iterative denoising slows inference and increases computational demands.These costs impede deployment of large-scale diffusion models.
  • Motivation: One- or two-step sampling remains challenging, motivating changes to diffusion-model formulations beyond the ODE-based approach.Earlier diffusion-GAN hybrids reached four steps on small-scale datasets but had not resolved one-step text-to-image generation.
  • UFOGen: UFOGen combines diffusion models with a GAN objective to produce high-quality text-conditioned images in a single inference step.The model is designed as a one-step text-to-image generative model.
  • UFOGen: UFOGen fine-tunes pre-trained Stable Diffusion models into one-step inference models while largely preserving generated-content quality.The paper presents Stable Diffusion initialization as a route to one-step generation.
  • Applications: The model also targets image-to-image and controllable generation, extending one-step inference beyond standard text-to-image synthesis.These applications are listed among UFOGen’s contributions.

2. Related Works

Related work accelerates diffusion models mainly through improved numerical solvers or knowledge distillation, while text-to-image GANs have progressed from small datasets to larger-scale models. UFOGen is positioned as a distinct diffusion-GAN approach for fast, large-scale text-to-image generation.

  • Accelerating Diffusion Models: Diffusion-model acceleration primarily uses improved numerical solvers or knowledge distillation to reduce sampling steps.Solvers increase discretization size, while distillation condenses a solver’s sampling trajectory.
  • Text-to-image GANs: Early text-to-image GANs were limited to small-scale datasets, while later architectures achieved promising results on large datasets.The related-work discussion contrasts early dataset limitations with later GAN progress.
  • Concurrent Work: Latent Consistency Model enables four-step Stable Diffusion sampling, but further step reduction causes a significant quality drop.This positions four-step sampling as a quality-efficiency boundary for that approach.
  • Concurrent Work: InstaFlow achieves single-step text-to-image generation by modifying the diffusion model through an extension of Rectified Flow models.The passage identifies InstaFlow as concurrent work addressing slow diffusion sampling.

3. Background

Diffusion models learn reverse denoising from progressively corrupted data, typically using Gaussian transitions and an ELBO objective. Diffusion-GAN hybrids replace restrictive Gaussian denoising parameterizations with adversarial modeling, enabling larger denoising steps but introducing stability concerns.

  • Diffusion Models: Diffusion models progressively add Gaussian noise and generate samples through a reverse denoising process.The forward process corrupts data across T steps, while the reverse process gradually recovers cleaner data.
  • Diffusion Models: The reverse denoising distribution is modeled as Gaussian because sufficiently small denoising steps make the true transition approximately Gaussian.Training can therefore minimize a negative ELBO objective based on these transitions.
  • Diffusion-GAN Hybrids: Diffusion-GAN hybrids use conditional GANs when large denoising steps make the true denoising distribution non-Gaussian.Adversarial divergence replaces KL matching against a parameterized Gaussian distribution.
  • Diffusion-GAN Hybrids: Flexible GAN-based denoising distributions enable more aggressive steps, and DDGAN reduces sampling to four steps.The discriminator is conditional, and expectations over unknown transitions are approximated by forward-process sampling.
  • Diffusion-GAN Hybrids: Purely adversarial DDGAN training introduces instability, motivating joint-distribution matching with adversarial marginal matching and KL conditional matching.The reconstruction objective derived from the KL term improves training stability.

4. Methods

UFOGen modifies diffusion-GAN parameterization and reconstruction training to make one-step sampling possible, then scales the approach by initializing generator and discriminator components from Stable Diffusion. The resulting objective combines adversarial matching of noisy samples with reconstruction at the clean sample.

  • Method Overview: UFOGen’s method focuses on enabling one-step sampling and scaling diffusion-GAN hybrids to text-to-image generation.The paper presents these as the two primary enhancement domains.
  • Enabling One-step Sampling: Prior diffusion-GAN models could not use one denoising step because that setting reduces training to a conventional GAN.UFOGen modifies generator parameterization and reconstruction terms while retaining several denoising steps during training.
  • Enabling One-step Sampling: UFOGen’s generator predicts x0 and samples xt−1 from the forward diffusion process q(xt−1|x0), enabling distribution matching at x0.This differs from posterior-based sampling used in earlier parameterizations.
  • Improved Reconstruction Loss: Replacing SIDDM’s reconstruction term with clean-sample reconstruction ||x0 − x′0||2 makes matching at x0 explicit and produces one-step samples on toy data.The authors motivate the change by hypothesizing that additive Gaussian noise introduces variance when sampling xt−1 with x0.
  • Training and Sampling: The UFOGen objective combines adversarial loss for noisy samples at t−1 with diffusion-style reconstruction loss at time 0.The reconstruction term is interpreted as the diffusion-model training objective, with adversarial refinement added.
  • Scaling to Text-to-image: Stable Diffusion initialization uses a consistent UNet structure for generator and discriminator, producing stable training dynamics and fast convergence.The initialization is intended to transfer text-image information from the pre-trained model and simplify scaling.

5. Experiments

UFOGen is evaluated for one-step text-to-image synthesis using Stable Diffusion-based comparisons, ablations, and qualitative assessments. The experiments also examine image-to-image and controllable generation, finding that UFOGen combines fast inference with competitive image quality and broader task coverage.

  • 5.1. Text-to-image Generation: UFOGen is benchmarked against few-step Stable Diffusion methods using zero-shot FID on MS-COCO and CLIP score evaluation.The experimental setup uses the LAION-Aesthetics-6+ subset for training and evaluates zero-shot FID on MS-COCO with a ViT-g/14 CLIP backbone.
  • 5.1. Text-to-image Generation: The authors report that UFOGen outperforms Progressive Distillation across one, two, and four steps, and exceeds InstaFlow-0.9B on both FID and CLIP scores.UFOGen remains competitive with InstaFlow-1.7B despite the latter using stacked UNet structures and roughly twice the parameter count.
  • 5.1. Text-to-image Generation: UFOGen achieves one-step generation at 0.09 seconds with FID-5k 22.5 and CLIP 0.311.These values are reported for UFOGen with one sampling step in the Stable Diffusion-based comparison.
  • 5.1. Text-to-image Generation: Qualitative comparisons report sharper textures and finer details for UFOGen than two-step and four-step LCM, while one-step LCM reportedly fails to generate textures.The comparisons also report a substantial image-quality advantage over InstaFlow in one-step generation.
  • 5.1. Text-to-image Generation: Across a broader MS-COCO comparison, UFOGen is presented as competitive while offering faster inference through one-step generation.The authors caution that the Table 3 results are not directly comparable because architectures, parameter counts, and training data differ substantially.
  • 5.2. Ablation Studies: UFOGen’s ablation compares the SIDDM and UFOGen objectives, with the reported modifications facilitating one-step sampling.Additional experiments examine qualitative samples and the denoising step size used during training.
  • 5.3. Applications: UFOGen also produces samples aligned with both prompts and input images in single-step image-to-image generation.Following SDEdit, the method adds a suitable amount of noise to the input before single-step generation.
  • 5.3. Applications: With an additional adapter network, fine-tuned UFOGen aligns controllable outputs with both prompts and depth-map or Canny-edge signals.The adapter takes control signals as input to guide generation.

6. Conclusions

UFOGen combines diffusion models with a GAN objective to enable ultra-fast, one-step text-to-image generation. Its one-step synthesis and downstream-task capabilities support its broader versatility.

  • UFOGen combines diffusion models with a GAN objective for ultra-fast, one-step generation of high-quality images conditioned on text.
  • Comprehensive evaluations consistently affirm UFOGen’s superiority over existing accelerated diffusion-based methods.
  • UFOGen supports one-step text-to-image synthesis and downstream tasks, underscoring its versatility.

A.1. Deriving the KL objective in Equation 4

The appendix derives a reconstruction objective from the KL term by recognizing that the relevant conditional distributions are Gaussian with shared covariance. Minimizing the KL objective therefore becomes a weighted reconstruction loss.

  • The appendix derives a reconstruction objective from the KL term in Equation 4.
  • q(xt|xt−1) is Gaussian under forward diffusion, while pθ(xt|x′t−1) follows the same forward-diffusion distribution for a given x′t−1.
  • The KL divergence between the two distributions can be computed in closed form because their covariances are both βtI.
  • Minimizing the KL objective is equivalent to minimizing a weighted reconstruction loss between x′t−1 and xt−1.
  • The cited prior work reaches the same objective through an entropy and cross-entropy decomposition, with an additional entropy-related term.

A.2. Analysis of the distribution matching at x0

The analysis explains why aligning noisy intermediate distributions encourages alignment of their underlying clean-image distributions. Both intermediate variables arise from independently noise-corrupted base images.

  • Aligning the distributions of xt−1 and x′t−1 implicitly encourages matching the distributions of x0 and x′0.
  • The appendix presents a subsequent formal analysis to substantiate this distribution-matching rationale.

A.2.1 Adversarial term

The adversarial objective matches noisy intermediate distributions formed by convolving clean-image distributions with a shared Gaussian kernel. Under the stated lemma, equality after convolution implies equality of the original distributions.

  • The adversarial objective is intended to match q(x0) and pθ(x′0) by matching their noisy intermediate distributions.
  • q(xt−1) is expressed as the convolution of q(x0) with a Gaussian kernel from the forward diffusion process.
  • The generator distribution pθ(xt−1) is similarly the convolution of pθ(x0) with the same kernel.
  • The lemma states that, for a positive absolutely continuous kernel, zero divergence between convolved distributions is equivalent to equality of the original distributions.
  • When JSD(q(xt−1)||pθ(xt−1)) = 0, the analysis obtains q(x0) = pθ(x0) almost everywhere.
  • Gaussian smoothing is necessary for stable GAN training, so the adversarial objective is not applied directly at x0.

A.2.2 KL term

The appendix derives an equivalence between the reconstruction objective and matching clean data distributions, then identifies variance as a weakness of the noisy formulation and motivates direct clean-sample reconstruction.

  • KL term: The reconstruction loss over q(x_t) is equivalent to reconstruction between x_0 and x′_0, up to a model-independent constant.The derivation rewrites the expectation using Gaussian forward-diffusion samples.
  • KL term: Matching clean samples through Gaussian-noise expectations can introduce substantial sampling variance.The resulting learning signal for clean-data distribution alignment may be less robust.
  • KL term: The proposed refinement directly enforces reconstruction between x_0 and x′_0 to address this variance.
  • KL term: This equivalence implicitly matches the distributions of x_0 and x′_0.

A.3. Experimental Details

Experiments initialize UFOGen from Stable Diffusion 1.5 and train in latent space, while evaluating training denoising-step choices, qualitative comparisons, diversity, and failure cases. The results support sharp, diverse single-step generation, but also reveal object, attribute, and counting failures.

  • Experimental setup: Both generator and discriminator start from Stable Diffusion 1.5, use its VAE and frozen CLIP ViT-L/14 text encoder, and operate in latent space.
  • Experimental setup: Training uses multiple denoising steps while inference generates samples in one step, with denoising step size 250 in the main experiments.The scheduler has 1000 discrete steps, and t−1 is set to max(0, t−250).
  • Qualitative comparison: Compared with one-step SIDDM, UFOGen produces sharp samples, whereas SIDDM samples are blurry and over-smoothed.The qualitative comparison is presented in Tables 7 and 8.
  • Ablation on denoising step-size: A denoising step size of 1000 fails, indicating that adversarial loss on noisy data is important for stabilizing diffusion-GAN training.The ablation compares step sizes 125, 250, 500, and 1000 while generating all samples in one step.
  • Ablation on denoising step-size: Denoising step size 250 is identified as the sweet spot in the ablation study.
  • Additional qualitative results: Supplementary samples show high-quality, diverse outputs aligned with prompts across painting, photorealistic, and anime styles and varied contents.The appendix also extends comparisons using four images per prompt and reports updated LCM results separately.
  • Failure cases: UFOGen failure cases include missing objects, attribute leakage, and counting errors, which are described as common issues in Stable-Diffusion-based models.
Loading 2311.09257v5…