Skip to content
WeChatCVPublic

About

No description, website, or topics provided.

Resources

Stars

23 stars

Watchers

0 watching

Forks

Latest commit

 

History

53 Commits

Folders and files

Repository files navigation

WeGen2 — Many worlds. One model. Native pixel-space generation, editing and composition. 61B total parameters; approximately 7B activated per generation token. Three unretouched example outputs: a Chinese handwritten letter, a layered paper lantern festival, and an embroidered portrait.

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

Project Page Weights Paper Watch the film Inference guide 中文说明

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

A visual tour

Photographs, typography, crafted worlds and continuing edits—all from WeGen2. The examples below show complete images and their actual reference inputs.

Six complete WeGen2 generations: cinematic laundrette, snowy owl in flight, Chinese flower-market poster, English pet-event poster, lighthouse oil painting, and a hand-cut WeGen2 inscription.

Image editing: the original fox and heron composition, followed by a two-colour woodcut reinterpretation. Both complete images are shown.

Multi-reference composition: two independent couture portraits are combined into a shared gallery scene. Both reference images and the complete generated result are shown.

Virtual try-on with the source portrait, eight full shopping-page screenshots and the outfit generated by WeGen2.

An Art Nouveau playbill goes through three edits. A white peacock replaces the phoenix, a new title and subtitle fill the upper cartouche, and a ticket panel adds the venue and performance time.

Explore the complete collection · Read the original prompts

Inside the model

Native pixel-space modeling. A-MoT connects understanding and generation through joint attention, with image and timestep residual pathways inside generation. A-MoE combines an always-active shared expert with a router-selected subset of experts. Expert count is schematic.

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

The paper's benchmark overview, with separate groups for text-to-image generation and for editing and reference composition.

Each benchmark uses its own metric. Individual scores, comparison settings, and prompt-enhancement reporting are described in the paper. Benchmark overview →

Build with WeGen2. Your next idea starts here: Python API, command line, and multi-turn sessions.

Quick start

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/WeGen2

Start 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")

Full inference guide 中文使用说明

Release status

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.

About

No description, website, or topics provided.

Resources

Stars

23 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages