How inclusionai/ming-image works
Ming Image is a model-inference repository for visual-design generation and editable-layer decomposition. The principal workflow accepts a prompt or input image through the inference CLI, loads a checkpoint under a capability contract, and produces a generated design or transparent editable layers. The repository also includes multimodal input processing and the image-generation diffusion stack. The README documents both task paths, but sampled excerpts do not show the CLI’s full dispatch or the layer-decomposition implementation, so those links are omitted rather than inferred.
Main entry points: infer.py Inference CLI · modeling_bailingmm2.py Multimodal model · transformer.py Diffusion transformer · modeling_bailing_moe_v2.py MoE language model
Components 21
Inference entry
- Inference CLI
infer.py - Device placement
mllm_device_map.py
Multimodal model
- Multimodal model
modeling_bailingmm2.py - MoE language model
modeling_bailing_moe_v2.py - Vision encoder
qwen2_5_vit.py - Multimodal config
configuration_bailingmm2.py - MoE config
configuration_bailing_moe_v2.py - Model utilities
modeling_utils.py
Image generation
- Image generator
diffusion/generator.py - Denoising pipeline
diffusion/pipeline.py - Diffusion transformer
diffusion/transformer.py - Image autoencoder
diffusion/autoencoder_kl_qwenimage.py - Sequence padding
diffusion/padding.py
Input and contracts
- Checkpoint contract
inference_profile.py - Multimodal processor
processing_bailingmm2.py - Image preprocessing
image_processing_bailingmm2.py - Media utilities
bailingmm_utils.py - Bailing tokenizer
tokenization_bailing.py
Other components
- User
- Generated design
- Editable layers
Connections 8
- User → Inference CLI: submits task
README.md - Inference CLI → Checkpoint contract: validates checkpoint
README.md - Multimodal model → MoE language model: constructs
modeling_bailingmm2.py - Multimodal model → Vision encoder: constructs
modeling_bailingmm2.py - Multimodal model → Image generator: constructs
modeling_bailingmm2.py - Diffusion transformer → Sequence padding: uses
diffusion/transformer.py - Inference CLI → Generated design: writes result
- Inference CLI → Editable layers: writes result