Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
**Tuna-2** is the Apache-2.0 reference implementation of the paper *"Pixel Embeddings Beat Vision Encoders for Unified Understanding and Generation"*, released by **Meta** with collaborators at the University of Hong Kong and the University of Waterloo. The repository opened on **22 April 2026** and holds roughly **739 stars and 29 forks** — modest numbers that undersell the claim, which cuts against how nearly every unified multimodal model is currently built. The author list includes Luke Zettlemoyer, Wenhu Chen, Ping Luo and Tao Xiang, and the work follows the original Tuna paper accepted at CVPR 2026. ## The Claim: Subtract the Encoder Unified multimodal models — those handling both image understanding and image generation in one network — conventionally stack two visual components: a **VAE** to compress images into a latent space for generation, and a **representation encoder** such as SigLIP to produce semantic features for understanding. Both are pretrained, both add parameters, and both sit between raw pixels and the model. Tuna-2 arrives at its design by **progressively removing** them: | Variant | Visual pathway | Flag | |---|---|---| | **Tuna** | VAE latents plus representation encoder | `--variant vae` | | **Tuna-R** | Representation encoder only, VAE removed | `--variant siglip_pixel` | | **Tuna-2** | Direct patch embedding on raw pixels, no encoder | `--variant none_encoder` | The reported result is the interesting part: **Tuna-2 outperforms both Tuna-R and the original Tuna** across a diverse suite of multimodal benchmarks. Removing components improved the model rather than trading quality for simplicity. This runs against standard practice. Pretrained vision encoders are usually treated as free semantic grounding — a component you would not build yourself. Tuna-2's finding is that at sufficient scale, a plain patch embedding layer on raw pixels learns a better shared representation for joint understanding and generation than a frozen encoder trained for a different objective imposes. The architectural payoff is a genuinely single-stack model: one set of weights from pixels to output, no separately-trained visual frontend to maintain, distill, or version. ## Running It Setup uses `uv` and a single script: ```bash git clone https://github.com/facebookresearch/tuna-2.git cd tuna-2 bash scripts/setup_uv.sh # creates .venv with all dependencies source .venv/bin/activate ``` All inference goes through one unified entry point covering both text-to-image and instruction-based editing: ```bash bash scripts/launch/predict.sh --ckpt <PATH> --prompt <TEXT> [OPTIONS] ``` The flags are straightforward: `--task` selects `t2i` or `edit`, `--variant` picks which of the three architectures to run, `--size` chooses `7b` or `2b` (2B exists only for the `vae` variant), and `--steps`, `--guidance`, `--seed` and `--negative` control the diffusion sampling. Supported output resolutions cover a 512-class set (512×512, 448×576, 576×448, 384×672, 672×384) and a 1024-class set at double those dimensions. Having all three variants behind one flag is a practical strength — the ablation that motivates the paper is reproducible by changing a single argument rather than checking out different branches. ## The Significant Caveat: Weights Are Not Released This is the point that determines whether the repository is usable today, and it is stated plainly in the README's TODO list. **No model weights have been published yet.** Three items remain open: releasing some Tuna-2 weights, some Tuna weights, and the fully restored weights. The explanation is organizational policy rather than technical delay. Meta cannot release the full production-trained weights. The stated plan is to publish a **foundation checkpoint with a small number of layers removed from both the LLM backbone and the diffusion flow head**. Everything else — vision encoder, projections, embeddings — is preserved, and the removed layers are intended to be re-learned through a short fine-tuning pass on the user's own data, with a training guide provided. The team says it is separately fine-tuning those layers on external data to release complete weights later. The same constraint applies to video: the **complete video training and inference codebase is included** (`configs/train/video_t2v.yaml`, `configs/predict/t2v_2b.yaml`) but the video generation model cannot be released. The practical consequence is that Tuna-2 today is a **research codebase, not a deployable model**. Every inference command requires a `--ckpt` path that no one outside Meta currently has. Reproducing the headline claim means training from scratch, and even once the foundation checkpoint lands it will need a fine-tuning pass before it performs as described. Anyone reading "pixel embeddings beat vision encoders" and expecting to test it this afternoon should recalibrate. Secondary limitations: the repository is CUDA-oriented (the manual setup pins a cu121 PyTorch index), there is no quantization or memory-optimization path documented for the 7B model, and with 15 open issues against a research release, support is best-effort. ## Verdict The contribution is a negative result made positive — evidence that a component the field treats as necessary may be an unnecessary intermediary. If it holds up under independent replication, the implication for unified multimodal architectures is real: one less pretrained dependency, one less representational mismatch between the understanding and generation paths, and a simpler training story. The gap between that claim and what a reader can verify is wide, and it is entirely about weights. The code is complete and Apache-2.0 licensed, the ablation is cleanly parameterized, and the video codebase is a usable starting point for teams with their own data and compute. But the central result cannot be checked by anyone lacking the budget to train a 7B unified multimodal model. Research groups working on unified multimodal architectures should read the paper (arXiv 2604.24763) and treat the repository as a reference implementation worth building on. Practitioners looking for a deployable image understanding-and-generation model should watch the TODO list and revisit when the foundation checkpoint ships.