Papers › ControlAR: Controllable Image Generation with Autoregressive Models

ControlAR: Controllable Image Generation with Autoregressive Models

3 Oct 2024arXiv:2410.02705archive 2025-07-28

Zongming Li, Tianheng Cheng, Shoufa Chen, Peize Sun, Haocheng Shen, Longjin Ran, Xiaoxin Chen, Wenyu Liu, Xinggang Wang

Autoregressive (AR) models have reformulated image generation as next-token prediction, demonstrating remarkable potential and emerging as strong competitors to diffusion models. However, control-to-image generation, akin to ControlNet, remains largely unexplored within AR models. Although a natural approach, inspired by advancements in Large Language Models, is to tokenize control images into tokens and prefill them into the autoregressive model before decoding image tokens, it still falls short in generation quality compared to ControlNet and suffers from inefficiency. To this end, we introduce ControlAR, an efficient and effective framework for integrating spatial controls into autoregressive image generation models. Firstly, we explore control encoding for AR models and propose a lightweight control encoder to transform spatial inputs (e.g., canny edges or depth maps) into control tokens. Then ControlAR exploits the conditional decoding method to generate the next image token conditioned on the per-token fusion between control and image tokens, similar to positional encodings. Compared to prefilling tokens, using conditional decoding significantly strengthens the control capability of AR models but also maintains the model's efficiency. Furthermore, the proposed ControlAR surprisingly empowers AR models with arbitrary-resolution image generation via conditional decoding and specific controls. Extensive experiments can demonstrate the controllability of the proposed ControlAR for the autoregressive control-to-image generation across diverse inputs, including edges, depths, and segmentation masks. Furthermore, both quantitative and qualitative results indicate that ControlAR surpasses previous state-of-the-art controllable diffusion models, e.g., ControlNet++. Code, models, and demo will soon be available at https://github.com/hustvl/ControlAR.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.02705")

Code

Syntology Ran 15 of 24 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · violated contract; 12 ran with no contract checked.

By repository: official repository: 24 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hustvl/controlar officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 15 ran; 2 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
1ran · violated contract
12ran
9unverified

Licence: 0 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from hustvl/controlar. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

CaptionEmbedder hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · 0a1aa4e4837aba74 · report
ConditionEmbedder hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · 28672d2f5d6d75b9 · report
DropPath hustvl/controlar/autoregressive/models/gpt.py official repository ran fingerprinted Apache-2.0 (permissive) · 76f9e42efc0d4711 · report
FeedForward hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · cf99c2811308e5e5 · report
KVCache hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · 0b441179596bf2b5 · report
LabelEmbedder hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · 7a710e6cde2ae35c · report
MLP hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · eec94bbc10306be0 · report
ModelArgs hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · 9e7e8b336fa1eb12 · report
RMSNorm hustvl/controlar/autoregressive/models/gpt.py official repository ran Apache-2.0 (permissive) · edd6b8543cc0d1ab · report
build_imagenet_code hustvl/ControlAR/dataset/imagenet.py official repository ran Apache-2.0 (permissive) · 489c6f42beab887e · report
create_npz_from_sample_folder hustvl/ControlAR/create_npz.py official repository ran Apache-2.0 (permissive) · 432162d12f959985 · report
find_multiple hustvl/controlar/autoregressive/models/gpt.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · f6ff7671338c9c92 · report
get_causal_mask hustvl/controlar/autoregressive/models/gpt.py official repository ran · violated contract Apache-2.0 (permissive) · 8e142bd1a80ed2ff · report
precompute_freqs_cis_2d hustvl/controlar/autoregressive/models/gpt.py official repository ran · honoured contract Apache-2.0 (permissive) · 7f53b2cdcd16fad9 · report
sample hustvl/ControlAR/autoregressive/models/generate.py official repository ran Apache-2.0 (permissive) · 2c1c9c90fbedc5d3 · report
Attention hustvl/controlar/autoregressive/models/gpt.py official repository unverified Apache-2.0 (permissive) · 8320019fce428945 · report
Transformer hustvl/controlar/autoregressive/models/gpt.py official repository unverified Apache-2.0 (permissive) · 152a894d1340f06b · report
TransformerBlock hustvl/controlar/autoregressive/models/gpt.py official repository unverified Apache-2.0 (permissive) · 7baa685224160fe5 · report
ViT_Adapter hustvl/controlar/autoregressive/models/gpt.py official repository unverified Apache-2.0 (permissive) · 7ea7bc571b41dc22 · report
apply_rotary_emb hustvl/controlar/autoregressive/models/gpt.py official repository unverified Apache-2.0 (permissive) · 29173bf6147634f3 · report
build_imagenet hustvl/ControlAR/dataset/imagenet.py official repository unverified Apache-2.0 (permissive) · 5cceaa9d0edbce06 · report
logits_to_probs hustvl/ControlAR/autoregressive/models/generate.py official repository unverified Apache-2.0 (permissive) · 9dac59261197935f · report
precompute_freqs_cis hustvl/ControlAR/autoregressive/models/gpt.py official repository unverified Apache-2.0 (permissive) · 0f0ff4e443413018 · report
top_k_top_p_filtering hustvl/ControlAR/autoregressive/models/generate.py official repository unverified Apache-2.0 (permissive) · f2fea48028c7ae80 · report

Tasks

Image Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections