Image-Text-to-Image
Diffusers
Safetensors
bailingmm_moe_v2_lite
ming-image
layer-decomposition
character-rigging
fp8
Instructions to use jmcgomes/Ming-Image-0.2-Design-Layer-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use jmcgomes/Ming-Image-0.2-Design-Layer-fp8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("jmcgomes/Ming-Image-0.2-Design-Layer-fp8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Ming-Image-0.2-Design-Layer, fp8
An fp8 build of inclusionAI/Ming-Image-0.2-Design-Layer
(MIT, revision 8cee63bf56703672f8a3a3b0a92fb34b9424d1ec), sized for 24 GB GPUs.
ming_dit_fp8.safetensors(6.5 GiB): the DiT, with the attention and FFN Linears of its 30 main blocks in float8_e4m3fn with a per-tensor scale (<module>._wscale). The other DiT tensors are bf16 (the original ships the whole DiT in fp32).ming_mllm_grouped_fp8.safetensors(17.4 GiB): the MLLM, with each MoE layer's 256 routed experts stacked into<layer>.mlp.grouped.{gu,dn}in float8_e4m3fn with per-row bf16 scales ({gu,dn}_s). Everything else is unchanged. The original MLLM is byte-identical to Ming-Image-0.2-Design's, so this file is the same as in jmcgomes/Ming-Image-0.2-Design-fp8.ming_mllm_grouped_nf4-0000[0-3].safetensors(11.2 GiB together): the same MLLM with its routed experts in bitsandbytes NF4 instead (block 64, fp32 absmax{gu,dn}_s, packed uint8{gu,dn}, no double quantization), for smaller downloads and host RAM; dequantized per layer on the GPU. On 17 character-rigging decompositions it gave the same results as the fp8 MLLM. Use either this orming_mllm_grouped_fp8.safetensors.connector/,mlp/,vae/,scheduler/, the configs and the tokenizer are the original files. The originalmllm/andtransformer/weight shards are left out (their configs and index files are kept).
Dequantization error per quantized tensor: 2.6-2.7% relative. The expert layout is not a standard transformers or
diffusers format: it needs a loader that knows about it (a stacked-expert bmm MoE and an fp8 Linear for the DiT).
The original inference code is at inclusionAI/Ming-Image.
License: MIT, as the original model (LICENSE).
- Downloads last month
- -
Model tree for jmcgomes/Ming-Image-0.2-Design-Layer-fp8
Base model
inclusionAI/Ming-Image-0.2-Design-Layer