Text-to-Image
English
GEAR
autoregressive
LlamaGen
image-generation

GEAR β€” GEAR-T2I-GPIC-1B

GEAR

🏠 Homepage  |  πŸ’» GitHub  |  πŸ€— Models  |  πŸ“„ Paper

This repository

BinLin203/GEAR-T2I-GPIC-1B ships gear-t2i-gpic-1b.pt, a text-to-image autoregressive generator trained on GPIC. It is a LlamaGen-1B dual-stream AR (256Γ—256), trained from scratch on top of the frozen GEAR-VQ tokenizer with a frozen Qwen3-1.7B text encoder.

It is released as a reproducible reference for the paper's GPIC text-to-image results. To generate images you need three pieces, all wired up by the GEAR code:

  1. this AR checkpoint (gear-t2i-gpic-1b.pt),
  2. the frozen tokenizer GEAR-VQ (gear-vq.pt),
  3. the Qwen/Qwen3-1.7B text encoder (auto-downloaded).
huggingface-cli download BinLin203/GEAR-T2I-GPIC-1B --local-dir ckpts/GEAR-T2I-GPIC-1B
huggingface-cli download BinLin203/GEAR-VQ         --local-dir ckpts/GEAR-VQ

What's in the checkpoint

A sanitized, inference-ready .pt (no optimizer state, no training paths):

Key Contents
ema AR EMA weights (293 tensors, ~1.05B params, fp32) β€” used for sampling
args architecture-only snapshot (ar_model, vq_model, image_size, cls_token_num, text_encoder=Qwen/Qwen3-1.7B, …) β€” no server/data paths
steps 390625 (training step of this checkpoint)

The tokenizer (vq / vq_ema) is not bundled β€” pass it explicitly via --vq-ckpt-path (gear-vq.pt), matching how the AR was trained.


About GEAR

GEAR (Guided End-to-end AutoRegression) trains a vector-quantized (VQ) tokenizer and an autoregressive (AR) generator jointly, end-to-end, guided by representation alignment. The VQ index is a non-differentiable argmax (a straight-through estimator collapses), so GEAR uses a dual read-out of the codebook assignment: a hard one-hot branch trains the AR, while a differentiable soft branch carries a REPA loss that flows back to update only the tokenizer. The result is a tokenizer whose tokens are far easier for an AR to predict β€” on GPIC text-to-image a fresh AR on the frozen GEAR tokenizer reaches the baseline's NTP loss 2.5Γ— and REPA loss 11.1Γ— faster, with better gFID.

Model details

AR backbone LlamaGen-1B (dual-stream text-to-image)
Tokenizer GEAR-VQ (VQ-16, 16384-entry codebook, Γ—16 downsample) β€” frozen
Text encoder Qwen3-1.7B (frozen), max 300 tokens
Resolution 256 Γ— 256
Training data GPIC (from scratch)
Steps / batch 390,625 steps @ batch size 256

Quickstart

Clone the code and install the gear env (see the repo README), then sample images from prompts:

accelerate launch --num_processes 8 src/inference_t2i.py \
    --ckpt-path    ckpts/GEAR-T2I-GPIC-1B/gear-t2i-gpic-1b.pt \
    --vq-ckpt-path ckpts/GEAR-VQ/gear-vq.pt \
    --ar-model     LlamaGen-1B --image-size 256 \
    --text-encoder Qwen/Qwen3-1.7B --text-max-len 300 \
    --prompts-jsonl src/eval/gpic/eval_prompts/gpic_eval_50k.jsonl \
    --output-dir   infer_out \
    --cfg-scale    1.75

(--ar-model / --image-size / --text-encoder are also baked into the checkpoint's args, so you can omit them; they are shown here for clarity.)

GPIC FD-DINOv2 evaluation

The one-shot driver scripts/eval/eval_gpic.sh samples one image per prompt and scores FD-DINOv2 / PRDC / MMD in the gear env:

CKPT=ckpts/GEAR-T2I-GPIC-1B/gear-t2i-gpic-1b.pt \
VQ_CKPT=ckpts/GEAR-VQ/gear-vq.pt \
AR_MODEL=LlamaGen-1B IMAGE_SIZE=256 \
CFG_SCALE=1.75 \
bash scripts/eval/eval_gpic.sh

GPIC's headline metric (FD-DINOv2) is reported without CFG (CFG_SCALE=1); we also release CFG_SCALE=1.75 and 4.0 sweep points.

License

Released by Tencent under the Apache-2.0 License (Copyright Β© 2026 Tencent; see the LICENSE). "GEAR" refers to the code, parameters, and weights made publicly available under Apache-2.0. GEAR builds on LlamaGen, REPA / REPA-E, Open-MAGVIT2 and IBQ; the text encoder is Qwen3-1.7B and the training corpus is GPIC β€” please also respect those upstream licenses.

Citation

@misc{lin2026gearguidedendtoendautoregression,
  title         = {GEAR: Guided End-to-End AutoRegression for Image Synthesis},
  author        = {Bin Lin and Zheyuan Liu and Chenguo Lin and Sixiang Chen and Yunyang Ge and Yunlong Lin and Jianwei Zhang and Miles Yang and Zhao Zhong and Liefeng Bo and Li Yuan},
  year          = {2026},
  eprint        = {2606.32039},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2606.32039}
}

@article{ifsq_llamagenrepa,
  title   = {iFSQ: Improving FSQ for Image Generation with 1 Line of Code},
  author  = {Lin, Bin and Li, Zongjian and Niu, Yuwei and Gong, Kaixiong and
             Ge, Yunyang and Lin, Yunlong and Zheng, Mingzhe and Zhang, JianWei and
             Yang, Miles and Zhong, Zhao and others},
  journal = {arXiv preprint arXiv:2601.17124},
  year    = {2026}
}

Acknowledgements

Built on LlamaGen, REPA / REPA-E, Open-MAGVIT2, IBQ, iFSQ / LlamaGen-REPA; text-to-image experiments use the GPIC corpus and its evaluation toolkit; evaluation harness adapted from UniWorld.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train BinLin203/GEAR-T2I-GPIC-1B

Papers for BinLin203/GEAR-T2I-GPIC-1B