Please rotate your device

To continue exploring this website, please rotate your device to a vertical orientation

Ming-Image-0.1-Design-Layer

inclusionAI/Ming-Image-0.1-Design-Layer

A 6B image-to-image model that decomposes flattened designs into independently editable RGBA layers using an image and layer plan.

large language

inclusionAI’s Ming-Image-0.1-Design-Layer is a 6B-parameter image-to-image model that decomposes flattened visual designs into independently editable RGBA layers. Guided by a text-based layer plan or requested layer count, it preserves the source image’s aspect ratio and produces transparent PNG assets for editing and recomposition. It is optimized for 1024-pixel processing with 12 sampling steps and a CFG scale of 2.0.⁠

Input

python
import base64
import os
from pathlib import Path

import requests

model_id = "<your-model-id>"
url = (
    f"https://model-{model_id}.api.baseten.co"
    "/environments/production/predict"
)

# Encode the flattened design image.
input_image = base64.b64encode(
    Path("design.png").read_bytes()
).decode("utf-8")

response = requests.post(
    url,
    headers={
        "Authorization": f"Bearer {os.environ['BASETEN_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "input_image": input_image,
        "prompt": "Decompose this image into 6 independently editable layers.",
        "resolution": 1024,
        "num_inference_steps": 12,
        "guidance_scale": 2.0,
    },
    timeout=300,
)
response.raise_for_status()

# Decode and save each generated RGBA layer.
layers = response.json()["data"]

for index, encoded_layer in enumerate(layers, start=1):
    # Handle either raw base64 or a data URL.
    if encoded_layer.startswith("data:"):
        encoded_layer = encoded_layer.split(",", 1)[1]

    output_path = Path(f"layer_{index:02d}.png")
    output_path.write_bytes(base64.b64decode(encoded_layer))
    print(f"Saved {output_path}")