Shaobin Zhuang1,*
Zhipeng Huang3,*
Canmiao Fu3,†
Xiaoqiang Zhou3
Hao Lu3
Ying Zhang3
Chen Li3,‡
Jing LYU3
Yali Wang2,‡
1 SJTU 2 MMLab @ SIAT 3 WeChat Vision, Tencent Inc.
* Equal contribution · Shaobin Zhuang and Zhipeng Huang
† Project leader · Canmiao Fu
‡ Co-corresponding authors · Chen Li and Yali Wang
One model for generation, editing, and composition. WeGen2 works directly in native pixel space, bringing prompts, reference images and earlier outputs into a shared context. 61B total parameters · approximately 7B activated per generation token.
Visual tour · Inside the model · Quick start · Authors
Photographs, typography, crafted worlds and continuing edits—all from WeGen2. The examples below show complete images and their actual reference inputs.
Explore the complete collection · Read the original prompts
A-MoT connects understanding and generation through joint attention. A-MoE combines shared and token-routed experts. Learned patch modules connect RGB images directly to the backbone, without a separate pretrained vision encoder or latent autoencoder at inference. View the architecture at full size →
Top-tier results across 11 benchmarks — generation, editing, and composition
Each benchmark uses its own metric. Individual scores, comparison settings, and prompt-enhancement reporting are described in the paper. Benchmark overview →
01 · Install. Use Python 3.10 or newer and install PyTorch for your accelerator environment, then:
git clone https://github.com/WeChatCV/WeGen2.git
cd WeGen2
pip install -e .02 · Download and create. The command below downloads the public WeGen2 weights and its BF16 prompt enhancer together. Qwen3-VL-30B-A3B-Instruct rewrites each image request in the user’s language, using the supplied references and recent edits. WeGen2 renders the resulting instruction.
hf download GrayShine/WeGen2 --local-dir ./weights/WeGen2Start a session to carry generated images into later edits.
from wegen2 import WeGen2Pipeline
pipe = WeGen2Pipeline.from_pretrained(
"./weights/WeGen2", devices="auto"
)
session = pipe.session()
image = session.generate(
"An intricate paper mountain city, "
"a red train on a curved bridge, "
"layered jade-green paper, warm studio light."
)
image.save("paper-world.png")
night = session.generate(
"Change the scene to night. Light the windows."
)
night.save("paper-world-night.png")03 · Make it yours. The same interface supports a single edit, multiple references, and longer sessions.
Edit an image or compose from multiple references
# Single-image editing
edited = pipe.generate(
"Turn this landscape into a monochrome ink painting.",
images=["landscape.png"],
)
edited.save("ink-painting.png")
# Multiple visual references, in instruction order
composed = pipe.generate(
"Place the person from the first image in the setting of the second image.",
images=["person.png", "setting.png"],
)
composed.save("composition.png")| Resource | Availability |
|---|---|
| Project page | Public |
| Inference code | Public |
| Paper | Public |
| BF16 model weights | Public |
About the examples
Selected examples illustrate visual capabilities. Fine details and long edit sequences can drift. The architectural rendering is a visual concept, not a dimensionally verified reconstruction; reference highlights indicate visible correspondence rather than exact product replication. The featured sequence uses successive image edits. Comic panels on the project page are assembled from separate image generations, and robot sequences are image edits. Experimental text decoding may produce repeated punctuation and is not a validated capability of this checkpoint.