Skip to content

Repository files navigation

OmniGen2-Unofficial

Unofficial PyTorch Reproduction of

OmniGen2: Towards Instruction-Aligned Multimodal Generation

[CVPR 2026]
Python PyTorch License Status

Paper · Project / Reference · Official Code · PDF · Issues

This is an unofficial implementation maintained by @StaryMoon. If this repository helps your reading, reproduction, or course project, please consider giving it a star and following my GitHub profile.

Paper / Project Preview

OmniGen2-Unofficial paper or project page preview

Image source: public paper/project page screenshot, Project / Reference. Captured/organized on 2026-07-02. This repository is unofficial and is not affiliated with the paper authors.

At a Glance

Item Details
Paper OmniGen2: Towards Instruction-Aligned Multimodal Generation
Venue / Source CVPR 2026
Focus This repository organizes a PyTorch implementation for OmniGen2: Towards Instruction-Aligned Multimodal Generation, focusing on instruction-aligned multimodal generation and edi...
Repository type Unofficial PyTorch reproduction starter
Local entry point python scripts/smoke_test.py

News

  • 2026-06-10: Initial public release with model interfaces, configuration, smoke test, and reproduction roadmap.

Overview

This repository organizes a PyTorch implementation for OmniGen2: Towards Instruction-Aligned Multimodal Generation, focusing on instruction-aligned multimodal generation and editing. The codebase is structured like a standard research repository so that each paper component can be replaced, tested, and extended independently.

Main goals:

  • provide a clean PyTorch module layout for the paper;
  • keep training, inference, evaluation, and configuration entry points explicit;
  • track paper-reported metrics separately from local reproduction logs;
  • make it easy for contributors to fill in missing paper-specific details.

Repository Structure

OmniGen2-Unofficial/
├── configs/
│   └── default.yaml
├── scripts/
│   └── smoke_test.py
├── src/omnigen2_unofficial/
│   ├── __init__.py
│   └── model.py
├── README.md
├── requirements.txt
└── pyproject.toml

Installation

git clone https://github.com/StaryMoon/OmniGen2-Unofficial.git
cd OmniGen2-Unofficial
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

For CUDA-enabled experiments, install the PyTorch build matching your CUDA version from the official PyTorch website before installing the rest of the dependencies.

Quick Check

Run the minimal forward-pass check:

python scripts/smoke_test.py

Expected output:

output: (...)
loss: ...

This confirms that the package import path, model interface, and tensor flow are working.

Data Preparation

Create a local data directory:

mkdir -p data checkpoints outputs

Recommended layout:

data/
├── train/
├── val/
└── test/

Dataset-specific converters will be added under scripts/ as the reproduction becomes more complete. Please do not commit private datasets, downloaded checkpoints, or generated outputs.

Training

Current minimal module usage:

import torch
from omnigen2_unofficial import StarterConfig, UnofficialModel, reconstruction_loss

config = StarterConfig(hidden_dim=128, num_layers=2, num_heads=4)
model = UnofficialModel(config)
optimizer = torch.optim.AdamW(model.parameters(), lr=1e-4)

x = torch.randn(2, 3, 64, 64)
token_ids = torch.randint(0, config.vocab_size, (2, 8))
target = torch.zeros(2, config.output_dim)

pred = model(x, token_ids=token_ids)
loss = reconstruction_loss(pred, target)
loss.backward()
optimizer.step()

Full training scripts will be added as paper-specific datasets and loss terms are implemented.

Inference

import torch
from omnigen2_unofficial import UnofficialModel

model = UnofficialModel().eval()
with torch.no_grad():
    x = torch.randn(1, 3, 64, 64)
    y = model(x)
print(y.shape)

Evaluation

Planned evaluation entry points:

python scripts/smoke_test.py
# future:
# python scripts/evaluate.py --config configs/default.yaml --ckpt checkpoints/model.pt

Metrics and protocols will follow the original paper as closely as possible. Paper-reported values and local reproduction values should be kept in separate columns.

Paper Results

For copyright and license clarity, this repository links to the original paper figures and tables instead of redistributing screenshots copied from the PDF. The table below tracks the paper-reported result locations so readers can quickly compare against future local logs.

Result Type Paper Location Source
Main quantitative comparison Main paper tables Original paper / project page
Ablation study Ablation section Original paper / project page
Qualitative examples Main paper figures and supplement Original paper / project page

Reproduction Log

Date Config Dataset Split Metric Value Notes
2026-06-10 configs/default.yaml smoke check forward pass ok package interface validation

Implementation Status

  • Package layout and install metadata
  • Core PyTorch module interfaces
  • Config file and smoke test
  • Dataset-specific preprocessing
  • Paper-specific losses and heads
  • Training script
  • Evaluation script
  • Model zoo / checkpoints
  • Reproduction logs

Model Zoo

Model Checkpoint Config Notes
default TBA configs/default.yaml compact implementation interface

Citation

If you find this repository useful, please cite the original paper:

@article{omnigen2unofficial,
  title = {OmniGen2: Towards Instruction-Aligned Multimodal Generation},
  author = {Chenyuan Wu, Jiahao Wang, Pengfei Zheng, Ruiran Yan, Shitao Xiao, Xin Luo, Yueze Wang, Wanli Li, Xiyan Jiang, Yexin Liu, Junjie Zhou, Ziyi Xia, Ze Liu, Chaofan Li, Haoge Deng, Kun Luo, Bo Zhang, Defu Lian, Xinlong Wang, Zhongyuan Wang, Tiejun Huang, Zheng Liu},
  year = {2026},
  note = {CVPR 2026}
}

Acknowledgements

  • Thanks to the authors of OmniGen2: Towards Instruction-Aligned Multimodal Generation for the original research.
  • This repository is inspired by standard open-source PyTorch research codebases.
  • The implementation is unofficial and all paper names, datasets, and trademarks belong to their respective owners.

License

This repository is released under the MIT License. The original paper, datasets, official code, and project assets remain governed by their own licenses.

Keywords

multimodal-generation, image-generation, instruction-following, diffusion, pytorch, cvpr-2026, unofficial-pytorch, reproduction

About

Unofficial PyTorch reproduction for OmniGen2, instruction-aligned multimodal generation and editing.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages