Run this model with HF Jobs
Run mlx-community/Ming-Image-0.2-Design-Layer-8bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/mlx-community/Ming-Image-0.2-Design-Layer-8bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/Ming-Image-0.2-Design-Layer-8bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use mlx-community/Ming-Image-0.2-Design-Layer-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Ming-Image-0.2-Design-Layer-8bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/Ming-Image-0.2-Design-Layer-8bit --local-dir Ming-Image-0.2-Design-Layer-8bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
mlx-community/Ming-Image-0.2-Design-Layer-8bit
Pre-quantized MLX tier (8-bit MLLM, connector and DiT) of inclusionAI/Ming-Image-0.2-Design-Layer (MIT) for Apple Silicon, loaded by the Swift/MLX port ming-image-swift. It splits a flat design, or a character illustration, into editable straight-alpha RGBA layers, front-most first, plus its own composite.
0.2 against 0.1. The architecture and every config are the same; the MLLM (with its vision tower) and the VAE are
byte-identical to 0.1's, and the connector, the query tokens and projection heads and the DiT are retrained. New in
0.2: bounding-box-guided layers and character-rigging decomposition, both asked for in the plan text.
Converted from upstream revision 8cee63bf. Part of the Ming-Image (MLX) collection; text-to-image is
Ming-Image-0.2-Design.
Total size: 28.3 GB; the bf16 repo is 49.8 GB and its card has the parity numbers. A Mac never has to hold the bf16 weights to use this tier.
What is quantized
Weight-only affine quantization, group size 64: the MLLM at 8 bits, the connector and the DiT's attention and feed-forward at 8. Kept at full precision: the MoE routers, embeddings, norms, the vision tower, the projection heads, the VAE and the DiT's conditioning layers. The DiT never goes below 8 bits. Loading this repo gives parameters bit-identical to quantizing the bf16 snapshot at load time (verified for every parameter).
Gates, against 0.1
The 0.1 jobs (six decompositions of real signage stills), same seeded noise and scorer, rendered by this port:
| Recomposite PSNR (layers put back together vs the input) | 0.1 | 0.2 bf16 | 0.2 8-bit | 0.2 4-bit |
|---|---|---|---|---|
| Customer spotlight, 512 | 28.1 dB | 29.3 | 29.3 | 29.4 |
| Keynote, 512 | 30.0 | 30.8 | 30.8 | 30.8 |
| Keynote, 1024 | 33.7 | 34.3 | 34.3 | 34.3 |
| Public sector, 512 | 29.8 | 30.9 | 30.8 | 30.9 |
| RBC photo, 512 (5 layers) | 24.4 | 25.8 | 26.7 | 26.4 |
| SNS, 512 | 31.3 | 32.2 | 32.0 | 32.0 |
0.2 recomposes better on every job at every tier. One job does not follow its plan at bf16 and 8-bit: on the RBC still the headline lands in the logo layer and the small caption text takes the headline's layer (the 4-bit tier and 0.1 follow the plan). The other five split exactly as planned, with the same coverage per layer as 0.1.
One thing to check for at the 1024 bucket: now and then 0.2 returns the back-most layer partly transparent (one seed in four on a poster with a terse three-layer plan; never at 512, never on 0.1). Another seed, the 512 bucket or the model's composite avoids it.
Upstream's three 0.2 samples, through the Swift package at 8-bit, 512 bucket:
- Bounding boxes (5 objects + background): each object comes out alone on its layer and the background is filled in behind them. 0.1 put two objects on one layer and left three layers empty.
- Character rigging (11 parts): hair, eyes, brows, mouth, head, top, arms, skirt, legs, back hair and background, one per layer, in the plan's order. 0.1 repeats the whole figure across layers.
- Poster (6 layers): 25.1 dB recomposite (0.1: 24.2).
Memory
Measured on the 0.1 tier, whose tensor shapes are identical (M5 Max, process phys_footprint, MLX cache capped at
2 GB): post-load resident 7.6 GB; peak 28.4 GB through 12 layers at the 1024 bucket. MLXEngine declares 7.9 GB resident plus 25.1 GB activation,
which is admitted on a 48 GB Mac.
Use (Swift / MLXEngine)
import MLXMingImage
import MLXToolKit
let layers = MingImageLayerPackage(configuration: MingImageLayerConfiguration(quant: .int8))
try await layers.load()
let stack = try await layers.run(LayerDecomposeRequest(
image: Image(format: .png, data: try Data(contentsOf: designURL)),
spec: "Decompose this image into 3 layers with the following specifications:\n\nNumber of layers: 3\n"
+ "Layer 1: The foreground element at bbox [491, 546, 624, 813] (normalized 0-999 coordinates on a 1000x1000 "
+ "scale, xyxy); target: The cat figurine.\nLayer 2: the vase.\nLayer 3: The remaining background.",
resolution: 512)) as! LayerDecomposeResponse
// stack.layers: straight-alpha RGBA PNGs, front-most first; stack.composite: the model's own composite
Plans are plain text, front-most layer first. A layer is described in words, or by a box in normalized 0β999
xyxy coordinates as above. Up to 12 layers. ming-image-swift 0.5.0 and later default to this release.
License
MIT, as the upstream weights. The upstream LICENSE is included.
- Downloads last month
- 56
8-bit
Model tree for mlx-community/Ming-Image-0.2-Design-Layer-8bit
Base model
inclusionAI/Ming-Image-0.2-Design-Layer