SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.20313 · 2025

FlexVAR: Flexible Visual Autoregressive Modeling without Residual Prediction

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 8 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2502.20313.json · badge: /api/ran/2502.20313.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
jiaosiyu1999/FlexVAR canonical (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
FunctionStatusWhere it lives
Normalize Ran
ran; our contract draft was wrong, not the code
jiaosiyu1999/FlexVAR/models/vq_llama.py
pointer only (licence: MIT); the stored copy get_code serves, from gogoduan/got-r1, is pointer only (licence: NONE) · get_code("01b5cf639b6bac89")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from gogoduan/got-r1, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

allgather Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jiaosiyu1999/FlexVAR/dist.py
code served (permissive licence) · get_code("e847ee15f089dee6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributed as tdist

torch.manual_seed(0)

# Create a small tensor for testing
# The function checks t.is_cuda and uses it in all_gather and torch.cat
# Shape: (2, 4) - small batch with 4 dimensions
tensor_arg = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "t": tensor_arg,
    "cat": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
center_crop_arr Ran
ran; our contract draft was wrong, not the code
jiaosiyu1999/FlexVAR/dataset/augmentation.py
code served (permissive licence) · get_code("1712a07966b542ee")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Image. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from PIL import Image

# Create a small test image
width, height = 256, 256
pil_image = Image.new('RGB', (width, height), color='red')

# Define arguments
ARGS = {
    'pil_image': pil_image,
    'image_size': 64
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_entropy_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jiaosiyu1999/FlexVAR/models/vq_llama.py
pointer only (licence: MIT); the stored copy get_code serves, from gogoduan/got-r1, is pointer only (licence: NONE) · get_code("774c95b77d7621f3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from gogoduan/got-r1, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jiaosiyu1999/FlexVAR/models/helpers.py
code served (permissive licence) · get_code("971ae8d2d8313e30")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor for testing
# Shape: (batch_size=2, channels=4, height=3, width=3) - 4D tensor
x = torch.randn(2, 4, 3, 3)

ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": True,
    "scale_by_keep": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gumbel_softmax_with_rng Ran
ran; our contract draft was wrong, not the code
jiaosiyu1999/FlexVAR/models/helpers.py
code served (permissive licence) · get_code("e543491ea064c733")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small logits tensor (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

# Create an RNG generator
rng = torch.Generator()
rng.manual_seed(42)

ARGS = {
    "logits": logits,
    "tau": 1.0,
    "hard": False,
    "eps": 1e-10,
    "dim": -1,
    "rng": rng
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
nonlinearity Ran
ran; our contract draft was wrong, not the code
jiaosiyu1999/FlexVAR/models/vq_llama.py
code served (permissive licence) · get_code("3137073275f8c21a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a single parameter 'x' which is used with:
# - multiplication operator (*)
# - torch.sigmoid() function
# This means x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
random_crop_arr Ran
ran on a synthesized input
jiaosiyu1999/FlexVAR/dataset/augmentation.py
code served (permissive licence) · get_code("5c39d5cf4b4b2a41")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Image. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
import random
import numpy as np
from PIL import Image

# Create a simple PIL image for testing
# The function expects a PIL Image object
pil_image = Image.new('RGB', (256, 256), color=(73, 109, 137))

# Define parameters
image_size = 64
min_crop_frac = 0.88
max_crop_frac = 1.0

ARGS = {
    'pil_image': pil_image,
    'image_size': image_size,
    'min_crop_frac': min_crop_frac,
    'max_crop_frac': max_crop_frac
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_with_top_k_top_p_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jiaosiyu1999/FlexVAR/models/helpers.py
code served (permissive licence) · get_code("80371584448f2f6e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family int, shape (2, 3, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create logits tensor with shape (B, l, V) = (batch_size, sequence_length, vocab_size)
# Using distinct dimensions: B=2, l=3, V=4
logits_BlV = torch.randn(2, 3, 4)

# top_k parameter: filter to keep only top k logits
top_k = 2

# top_p parameter: nucleus sampling threshold
top_p = 0.9

# rng parameter: random number generator (None or torch.Generator)
rng = None

# num_samples parameter: number of samples to draw per position
num_samples = 1

ARGS = {
    "logits_BlV": logits_BlV,
    "top_k": top_k,
    "top_p": top_p,
    "rng": rng,
    "num_samples": num_samples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (2, 3, 1) — shape (2, 3, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
allreduce Not yet run
unverified (harvested, no recorded run)
jiaosiyu1999/FlexVAR/dist.py
code served (permissive licence) · get_code("ff4c548fd07140d0")
How it ran

no invocation recorded.

build_openimage Not yet run
unverified (harvested, no recorded run)
jiaosiyu1999/FlexVAR/dataset/openimage.py
pointer only (licence: MIT); the stored copy get_code serves, from ThisisBillhe/ZipAR, is pointer only (licence: NONE) · get_code("0a65aaf586d4f90b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ThisisBillhe/ZipAR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

new_group Not yet run
unverified (harvested, no recorded run)
jiaosiyu1999/FlexVAR/dist.py
code served (permissive licence) · get_code("826ea3fc406a6a09")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 2 the same month, 11 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
nonlinearity 156 other papers
123 dated earlier, 33 later · 25 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 153 more not named here
drop_path 66 other papers
49 dated earlier, 1 the same month, 13 later, 1 same year, order not determinable, 2 undated · 15 only as an assembly brick
1906.01502 (2019-06)
How multilingual is Multilingual BERT?
2011.10566 (2020-11)
Exploring Simple Siamese Representation Learning
2103.03230 (2021-03)
Barlow Twins: Self-Supervised Learning via Redundancy Reduction
and 63 more not named here
center_crop_arr 37 other papers
24 dated earlier, 2 the same month, 9 later, 2 same year, order not determinable
2211.17091 (2022-11)
Refining Generative Process with Discriminator Guidance in Score-based Diffusion Models
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
2311.09257 (2023-11)
UFOGen: You Forward Once Large Scale Text-to-Image Generation via Diffusion GANs
and 34 more not named here
compute_entropy_loss 10 other papers
2 dated earlier, 8 later · 2 only as an assembly brick
2408.12245 (2024-08)
Scalable Autoregressive Image Generation with Mamba
2411.15867 (2024-11)
PanoLlama: Generating Endless and Coherent Panoramas with Next-Token-Prediction LLMs
2503.08686 (2025-03)
OmniMamba: Efficient and Unified Multimodal Understanding and Generation via State Space Models
and 7 more not named here
Normalize 9 other papers
2 dated earlier, 7 later · 3 only as an assembly brick
2408.12245 (2024-08)
Scalable Autoregressive Image Generation with Mamba
2411.15867 (2024-11)
PanoLlama: Generating Endless and Coherent Panoramas with Next-Token-Prediction LLMs
2503.08686 (2025-03)
OmniMamba: Efficient and Unified Multimodal Understanding and Generation via State Space Models
and 6 more not named here
allgather 8 other papers
6 dated earlier, 2 later
2404.02905 (2024-04)
Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
and 5 more not named here
allreduce 8 other papers
6 dated earlier, 2 later
2404.02905 (2024-04)
Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
and 5 more not named here
gumbel_softmax_with_rng 8 other papers
5 dated earlier, 3 later
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
2410.10812 (2024-10)
HART: Efficient Visual Generation with Hybrid Autoregressive Transformer
2411.10433 (2024-11)
M-VAR: Decoupled Scale-wise Autoregressive Modeling for High-Quality Image Generation
and 5 more not named here
new_group 8 other papers
6 dated earlier, 2 later
2404.02905 (2024-04)
Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
and 5 more not named here
sample_with_top_k_top_p_ 8 other papers
5 dated earlier, 3 later
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
2410.10812 (2024-10)
HART: Efficient Visual Generation with Hybrid Autoregressive Transformer
2411.10433 (2024-11)
M-VAR: Decoupled Scale-wise Autoregressive Modeling for High-Quality Image Generation
and 5 more not named here
build_openimage 4 other papers
3 dated earlier, 1 later
2406.06525 (2024-06)
Autoregressive Model Beats Diffusion: Llama for Scalable Image Generation
2412.03069 (2024-12)
TokenFlow: Unified Image Tokenizer for Multimodal Understanding and Generation
2412.04062 (2024-12)
ZipAR: Parallel Auto-regressive Image Generation through Spatial Locality
and 1 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

This work challenges the residual prediction paradigm in visual autoregressive modeling and presents FlexVAR, a new Flexible Visual AutoRegressive image generation paradigm. FlexVAR facilitates autoregressive learning with ground-truth prediction, enabling each step to independently produce plausible images. This simple, intuitive approach swiftly learns visual distributions and makes the generation process more flexible and adaptable. Trained solely on low-resolution images ($\leq$ 256px), FlexVAR can: (1) Generate images of various resolutions and aspect ratios, even exceeding the resolution of the training images. (2) Support various image-to-image tasks, including image refinement, in/out-painting, and image expansion. (3) Adapt to various autoregressive steps, allowing for faster inference with fewer steps or enhancing image quality with more steps. Our 1.0B model outperforms its VAR counterpart on the ImageNet 256$\times$256 benchmark. Moreover, when zero-shot transfer the image generation process with 13 steps, the performance further improves to 2.08 FID, outperforming state-of-the-art autoregressive models AiM/VAR by 0.25/0.28 FID and popular diffusion models LDM/DiT by 1.52/0.19 FID, respectively. When transferring our 1.0B model to the ImageNet 512$\times$512 benchmark in a zero-shot manner, FlexVAR achieves competitive results compared to the VAR 2.3B model, which is a fully supervised model trained at 512$\times$512 resolution.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2502.20313")
get_code_for_paper("2502.20313")
have("2502.20313")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2502.20313.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2502.20313.svg)](https://syntology.ai/paper/2502.20313)

Connect an agent — have() is free.