ControlVAR: Exploring Controllable Visual Autoregressive Modeling

Xiang Li, Kai Qiu, Hao Chen, Jason Kuen, Zhe Lin, Rita Singh, Bhiksha Raj

Abstract

Conditional visual generation has witnessed remarkable progress with the advent of diffusion models (DMs), especially in tasks like control-to-image generation. However, challenges such as expensive computational cost, high inference latency, and difficulties of integration with large language models (LLMs) have necessitated exploring alternatives to DMs. This paper introduces ControlVAR, a novel framework that explores pixel-level controls in visual autoregressive (VAR) modeling for flexible and efficient conditional generation. In contrast to traditional conditional models that learn the conditional distribution, ControlVAR jointly models the distribution of image and pixel-level conditions during training and imposes conditional controls during testing. To enhance the joint modeling, we adopt the next-scale AR prediction paradigm and unify control and image representations. A teacher-forcing guidance strategy is proposed to further facilitate controllable generation with joint modeling. Extensive experiments demonstrate the superior efficacy and flexibility of ControlVAR across various conditional generation tasks against popular conditional DMs, e.g., ControlNet and T2I-Adaptor.

Introduction

In the domain of AI-generated content, Diffusion Models (DMs) like Stable Diffusion, often augmented with ControlNet, represent the state-of-the-art for precise structural guidance. Despite their success, DMs suffer from high computational costs due to iterative denoising and present challenges for direct integration with Large Language Models (LLMs) due to differing data representations.

Autoregressive (AR) models offer a promising alternative, being computationally efficient and naturally compatible with LLMs. However, achieving precise spatial control (e.g., following an edge map) in AR models has historically been difficult. Previous methods often treated control information as a simple prefix, leading to poor alignment. ControlVAR addresses these issues by bringing pixel-level control to Visual Autoregressive (VAR) modeling.

Methodology

ControlVAR builds upon the Visual Autoregressive (VAR) paradigm, which generates images scale-by-scale—from low-resolution global structures to high-resolution details—rather than traditional scanline pixel-by-pixel generation.

ControlVAR enables high-quality image generation from multiple pixel-level controls such as segmentation masks, edges, depth, and normal maps.

The framework introduces three core innovations:

  1. Joint Modeling: ControlVAR models the joint distribution of the image and its control conditions. Image and control tokens are treated as pairs at every scale during training.
  2. Unified Representation: To simplify the architecture, all control types (e.g., Canny edges, depth maps, segmentation masks) are converted into an RGB-like format. This allows the model to utilize a single tokenizer and vocabulary for both images and controls.
  3. Teacher-Forcing Guidance (TFG): During inference, a strategy inspired by Classifier-Free Guidance is employed. By "forcing" the model to accept ground-truth control tokens at each scale, the generation process is precisely steered to match the input conditions.

Experiments and Results

The model was trained on ImageNet, pseudo-labeled with state-of-the-art models: SAM for masks, Canny for edges, and MiDaS/DPT for depth and normal maps. Evaluation was also conducted on the ADE20K dataset for complex scene understanding.

Performance and Efficiency

  • Speed: ControlVAR is significantly faster than diffusion-based alternatives. On an NVIDIA H100 GPU, it achieves inference speeds at least 5x faster than ControlNet or T2I-Adaptor.
  • Quality: ControlVAR outperformed previous AR methods like VQGAN. On ADE20K, it achieved an FID of 9.72, compared to VQGAN's 35.5.
  • Scalability: Performance consistently improved as the transformer depth increased (from 12 to 30 layers), indicating strong scaling properties.

Discussion: Versatility and Limitations

A key insight of ControlVAR is its bidirectional capability. Because it learns the joint relationship between images and controls, it functions as a multi-tool capable of both generation (Control → Image) and perception (Image → Control).

ControlVAR demonstrates versatility across various tasks: (a, c) generating images from controls, (b) zero-shot task handling, and (d) extracting control maps from images (perception).

The model also exhibits "zero-shot" versatility, such as converting a segmentation mask directly into a Canny edge map without explicit training for that specific task.

Limitations

The primary current limitation is the lack of natural language support. While effective at following spatial maps and class labels, it does not yet support text prompts. Future work involves integrating language-aligned tokens (e.g., from CLIP) to combine LLM reasoning with spatial control. Additionally, perception accuracy is currently bounded by the quality of the pseudo-labels used during training.

Summary updated

BibTeX
@misc{li2024controlvar,
  author = {Xiang Li and Kai Qiu and Hao Chen and Jason Kuen and Zhe Lin and Rita Singh and Bhiksha Raj},
  title = {{ControlVAR: Exploring Controllable Visual Autoregressive Modeling}},
  year = {2024},
  eprint = {2406.09750},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09750},
}
Figure