deepgenteam/DeepGen-1.0-diffusers
π‘ DeepGen 1.0 (Diffusers Format): A Lightweight Unified Multimodal Model for Advancing Image Generation and Editing
This is the diffusers-compatible version of DeepGen-1.0. The model weights are stored in safetensors format with a self-contained pipeline script (deepgen_pipeline.py) β no need to clone the DeepGen repository.
DeepGen 1.0 is a lightweight unified multimodal model with only 5B parameters (3B VLM + 2B DiT). It integrates five core capabilitiesβgeneral image generation, general image editing, reasoning image generation, reasoning image editing, and text renderingβwithin a single model. Across multiple authoritative benchmarks, DeepGen 1.0 is competitive with or surpassing the state-of-the-art unified multimodal models that are 3Γ to 16Γ larger.
π οΈ Quick Start
Installation
pip install torch diffusers transformers safetensors einops accelerate huggingface_hub
# Flash Attention (recommended)
pip install flash-attn --no-build-isolationLoad Pipeline
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"deepgenteam/DeepGen-1.0-diffusers",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
)
pipe.to("cuda")
# Optional: enable CPU offload for GPUs with limited memory (< 24GB)
# pipe.enable_model_cpu_offload()Text-to-Image
result = pipe(
prompt="a racoon holding a shiny red apple over its head",
height=512, width=512,
num_inference_steps=50,
guidance_scale=4.0,
seed=42,
)
result.images[0].save("output.png")Image Editing
from PIL import Image
source_image = Image.open("guitar.png").convert("RGB")
result = pipe(
prompt="Take a photo of this guitar placed on a sandy beach with the sunset in the background.",
image=source_image,
height=512, width=512,
num_inference_steps=50,
guidance_scale=4.0,
seed=42,
)
result.images[0].save("edited.png")π Parameters
πΎ Memory Requirements
π Directory Structure
DeepGen-1.0-diffusers/
βββ transformer/ # SD3 DiT weights (safetensors)
βββ vae/ # AutoencoderKL weights
βββ connector/ # SCB Connector weights + config
βββ scheduler/ # FlowMatchEulerDiscreteScheduler config
βββ tokenizer/ # Qwen2.5-VL tokenizer
βββ prompt_template.json # Prompt formatting template
βββ model_index.json # Model metadata
βββ deepgen_pipeline.py # Self-contained pipeline scriptNote: The VLM (Qwen2.5-VL-3B-Instruct) is loaded separately from Qwen/Qwen2.5-VL-3B-Instruct. You can override the VLM path using thevlm_model_pathparameter infrom_pretrained().
π§ Method
Our core observation is that a lightweight model, when empowered by synergistic architecture design and data-centric training strategies, can achieve comprehensive capabilities competitive with or even surpassing much larger counterparts. To overcome the limitations of lightweight models in semantic understanding and fine-grained control, we introduce Stacked Channel Bridging (SCB), a deep alignment framework that extracts hierarchical features from multiple VLM layers and fuses them with learnable "think tokens" to provide the generative backbone with structured, reasoning-rich guidance.
π Benchmarks
1. General Image Generation
2. General Image Editing
3. Reasoning Image Generation
4. Reasoning Image Editing
β Citation
@article{wang2026deepgen,
title={DeepGen 1.0: A Lightweight Unified Multimodal Model for Advancing Image Generation and Editing},
author={Wang, Dianyi and Li, Ruihang and Han, Feng and Ma, Chaofan and Song, Wei and Wang, Siyuan and Wang, Yibin and Xin, Yi and Liu, Hongjian and Zhang, Zhixiong and others},
journal={arXiv preprint arXiv:2602.12205},
year={2026}
}License
Apache 2.0
