Instructions to use pinecoresystems/Ming-Image-0.1-Design-Layer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use pinecoresystems/Ming-Image-0.1-Design-Layer with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("pinecoresystems/Ming-Image-0.1-Design-Layer", 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
Upload UPSTREAM-README.md with huggingface_hub
Browse files- UPSTREAM-README.md +96 -0
UPSTREAM-README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: custom
|
| 4 |
+
pipeline_tag: image-text-to-image
|
| 5 |
+
inference: false
|
| 6 |
+
tags:
|
| 7 |
+
- image-text-to-image
|
| 8 |
+
- layer-decomposition
|
| 9 |
+
- rgba
|
| 10 |
+
- graphic-design
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Ming-Image-0.1-Design-Layer
|
| 14 |
+
|
| 15 |
+
[🧩 ModelScope](https://www.modelscope.cn/models/inclusionAI/Ming-Image-0.1-Design-Layer) · [🤗 Hugging Face](https://huggingface.co/inclusionAI/Ming-Image-0.1-Design-Layer) · [📄 Blog](https://mp.weixin.qq.com/s/VGdtxfM8kbHIQJw50VD_Sw) · [🖥️ Demo](https://huggingface.co/spaces/Xiaolong-Wang/Ming-Image-0.1-Design-Layer)<br>
|
| 16 |
+
[🎨 Design Skill](https://github.com/inclusionAI/ling-cookbook/tree/main/resources/recommended-skills/ling-ui-design) · [📊 PPT Skill](https://github.com/inclusionAI/ling-cookbook/tree/main/resources/recommended-skills/image-to-editable-ppt)
|
| 17 |
+
|
| 18 |
+
Ming-Image-0.1-Design-Layer decomposes a flattened design image into a
|
| 19 |
+
requested number of RGBA layers using an image and a layer plan.
|
| 20 |
+
|
| 21 |
+
## Quick Start
|
| 22 |
+
|
| 23 |
+
Use the companion [Ming-Image repository](https://github.com/inclusionAI/Ming-Image)
|
| 24 |
+
for installation and inference:
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
git clone https://github.com/inclusionAI/Ming-Image
|
| 28 |
+
cd Ming-Image
|
| 29 |
+
pip install -r requirements.txt
|
| 30 |
+
|
| 31 |
+
python infer.py \
|
| 32 |
+
--model inclusionAI/Ming-Image-0.1-Design-Layer \
|
| 33 |
+
--task layer-decompose \
|
| 34 |
+
--input-image assets/layer_samples/card_making_input.png \
|
| 35 |
+
--prompt assets/layer_samples/card_making_prompt.txt \
|
| 36 |
+
--attn-implementation flash_attention_2 \
|
| 37 |
+
--resolution 1024 \
|
| 38 |
+
--output-dir outputs/layers
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
This runs the released six-layer card-making example. See the full
|
| 42 |
+
[layer-decomposition demo](https://github.com/inclusionAI/Ming-Image#layer-decomposition-demo)
|
| 43 |
+
for the output structure and layer-count behavior.
|
| 44 |
+
|
| 45 |
+
Prompt enhancement (PE) can use `Ling-3.0-flash-VL` or `qwen3.8-27B`; see
|
| 46 |
+
[layer-decomposition prompt rewriting](https://github.com/inclusionAI/Ming-Image#layer-decomposition-prompt-rewriting).
|
| 47 |
+
|
| 48 |
+
## Deployment
|
| 49 |
+
|
| 50 |
+
We recommend the following inference frameworks to serve the model:
|
| 51 |
+
|
| 52 |
+
- vLLM-Omni: see the [recipes](https://github.com/vllm-project/vllm-omni/blob/main/recipes/inclusionAI/Ming-Image.md)
|
| 53 |
+
and [installation guide](https://docs.vllm.ai/projects/vllm-omni/en/latest/getting_started/quickstart/).
|
| 54 |
+
|
| 55 |
+
## Recommended settings
|
| 56 |
+
|
| 57 |
+
- Working-resolution bucket: **1024** (recommended), or **512** for faster
|
| 58 |
+
layer decomposition. The output preserves the input image's aspect ratio.
|
| 59 |
+
- Sampling steps: **12**.
|
| 60 |
+
- CFG scale: **2.0**.
|
| 61 |
+
- Precision: **BF16**.
|
| 62 |
+
- Hardware: **one CUDA GPU with 80 GiB VRAM** (validated configuration).
|
| 63 |
+
|
| 64 |
+
Provide `--input-image` plus either a detailed layer specification through
|
| 65 |
+
`--prompt`, or omit `--prompt` and set `--num-layers N` to create the default
|
| 66 |
+
request. When `--prompt` is supplied, the layer count declared in that prompt
|
| 67 |
+
controls the output count. The standalone outputs are saved as RGBA PNG files.
|
| 68 |
+
|
| 69 |
+
## Gallery
|
| 70 |
+
|
| 71 |
+
<p align="center">
|
| 72 |
+
<img src="./assets/showcase.webp" width="100%" alt="Ming-Image-0.1-Design-Layer decomposition example">
|
| 73 |
+
</p>
|
| 74 |
+
|
| 75 |
+
The example shows the input design, six decomposed layers, and the recomposed
|
| 76 |
+
result.
|
| 77 |
+
|
| 78 |
+
<p align="center">
|
| 79 |
+
<img src="./assets/gallery.webp" width="100%" alt="Ming-Image-0.1-Design-Layer gallery">
|
| 80 |
+
</p>
|
| 81 |
+
|
| 82 |
+
The gallery shows additional flattened designs, their transparent layers, and
|
| 83 |
+
the corresponding recomposed results.
|
| 84 |
+
|
| 85 |
+
## Performance
|
| 86 |
+
|
| 87 |
+
<p align="center">
|
| 88 |
+
<img src="./assets/performance.webp" width="100%" alt="Layer-decomposition results on the Crello test set">
|
| 89 |
+
</p>
|
| 90 |
+
|
| 91 |
+
The table reports quantitative layer-decomposition results on the Crello test
|
| 92 |
+
set; lower RGB L1 and higher Alpha soft IoU are better.
|
| 93 |
+
|
| 94 |
+
## License
|
| 95 |
+
|
| 96 |
+
This model is released under the [MIT License](./LICENSE).
|