Ming-Image-0.2-Design Diffusers

Diffusers version of inclusionAI/Ming-Image-0.2-Design: the transformer, the text encoder, the connector, the VAE, the tokenizer and the scheduler. Run it with the blocks in OzzyGT/ming_image_custom_blocks.

0.2 has the same architecture as 0.1 and improves complex composition, lighting and text rendering.

Sample image

A movie poster for a fictional adventure film generated with the code below

This image was generated with the following code, seed 2024:

import torch

from diffusers import ModularPipelineBlocks


blocks = ModularPipelineBlocks.from_pretrained(
    "OzzyGT/ming_image_custom_blocks",
    trust_remote_code=True,
    components_repo="OzzyGT/ming_image_0_2_design_diffusers",
    trust_components_code=True,
)
pipe = blocks.init_pipeline()
pipe.load_components(dtype=torch.bfloat16)
for name in ("text_encoder", "transformer"):
    getattr(pipe, name).enable_group_offload(
        onload_device="cuda", offload_type="block_level", num_blocks_per_group=1, use_stream=True
    )
pipe.connector.to("cuda")
pipe.vae.to("cuda")

prompt = r"""{
  "canvas_settings": {
    "aspect_ratio": "2:3, 1664 ร— 2496 px",
    "ambient_lighting": "Dramatic low-key cinematic lighting: a burning torch is the warm key light on the hero, thin shafts of cool daylight cut through dust from a cracked tomb ceiling, deep teal-black shadows.",
    "image_style": "Theatrical one-sheet movie poster for a big-budget action-adventure film: photorealistic key art with the hero centered, warm torch orange against deep teal shadows, polished blockbuster typography with clean hierarchy, full-bleed with no borders."
  },
  "layers": [
    {
      "description": "Background: the interior of a newly opened ancient tomb, a long corridor of towering crumbling sandstone statues and carved pillars sinking into deep shadow, thin shafts of daylight through a cracked ceiling lighting floating dust, the top of the poster fading to near-black for the credits and the bottom darkening behind the title.",
      "coordinates": "cx: 0.500, cy: 0.500, w: 1.000, h: 1.000",
      "hierarchy_and_relation": "Full-canvas background behind every other layer.",
      "color_specs": [
        "#0E1A1F",
        "#2B3A3D",
        "#8A6A45",
        "#C9A46B"
      ]
    },
    {
      "description": "Hero, waist-up, centered and facing the viewer in a three-quarter turn: a fictional tomb-raiding explorer in his late thirties, very muscular and built like an action-movie lead, with massive shoulders, a thick chest and big arms with visible veins, sunburned skin streaked with dust and grime. Square jaw, short dark tousled hair, a week of stubble, hazel eyes with a determined stare, lips pressed together. He wears a sleeveless faded olive canvas shirt darkened with sweat, a worn leather harness of crossed straps with a coiled climbing rope over one shoulder, and a canvas utility belt with brass buckles. His right hand raises a burning torch beside his head, lighting his face warmly from the side.",
      "coordinates": "cx: 0.500, cy: 0.500, w: 0.800, h: 0.560",
      "hierarchy_and_relation": "Main subject in the middle of the poster, in front of the background; his lower body fades behind the title block.",
      "color_specs": [
        "#6B6A45",
        "#5A3B28",
        "#C47A4A",
        "#FFB347"
      ]
    },
    {
      "description": "Top billing: the actor name \"JACK RENNER\" in widely letter-spaced off-white serif capitals.",
      "coordinates": "cx: 0.500, cy: 0.060, w: 0.500, h: 0.030",
      "hierarchy_and_relation": "Centered at the top of the poster, above the tagline.",
      "color_specs": [
        "#EDE6D6"
      ]
    },
    {
      "description": "Tagline in small letter-spaced warm gold capitals: \"SOME TREASURES ARE BURIED FOR A REASON\".",
      "coordinates": "cx: 0.500, cy: 0.105, w: 0.720, h: 0.020",
      "hierarchy_and_relation": "Centered below the top billing, above the hero's head.",
      "color_specs": [
        "#C9A46B"
      ]
    },
    {
      "description": "Movie title \"THE OBSIDIAN TOMB\" in huge bold chiseled serif capitals with a carved weathered-stone texture, warm gold rim light along the top edges and a dark drop shadow, set on two lines with THE smaller above OBSIDIAN TOMB.",
      "coordinates": "cx: 0.500, cy: 0.810, w: 0.880, h: 0.110",
      "hierarchy_and_relation": "Centered across the lower part of the poster, overlapping the bottom of the hero.",
      "color_specs": [
        "#D8B36A",
        "#3A2A1A",
        "#F4E3B5"
      ]
    },
    {
      "description": "Release line on two centered lines: \"SUMMER 2027\" in bold off-white capitals, and below it \"ONLY IN THEATERS\" in smaller gold capitals.",
      "coordinates": "cx: 0.500, cy: 0.885, w: 0.460, h: 0.035",
      "hierarchy_and_relation": "Centered directly below the title, above the billing block.",
      "color_specs": [
        "#EDE6D6",
        "#C9A46B"
      ]
    },
    {
      "description": "First billing line in tall condensed light-gray capitals: \"IRONPEAK PICTURES PRESENTS A GRANT HOLLOWAY FILM  MARA VOSS  DANIEL OKAFOR\".",
      "coordinates": "cx: 0.500, cy: 0.936, w: 0.840, h: 0.022",
      "hierarchy_and_relation": "Centered near the bottom of the poster, below the release line and above the second billing line.",
      "color_specs": [
        "#A9A9A9"
      ]
    },
    {
      "description": "Second billing line in the same tall condensed light-gray capitals: \"MUSIC BY ELENA MARSH  WRITTEN BY TOM HALE  DIRECTED BY GRANT HOLLOWAY\".",
      "coordinates": "cx: 0.500, cy: 0.964, w: 0.840, h: 0.022",
      "hierarchy_and_relation": "Centered at the very bottom of the poster, directly below the first billing line.",
      "color_specs": [
        "#A9A9A9"
      ]
    }
  ]
}"""

image = pipe(prompt=prompt, height=2496, width=1664, generator=torch.Generator().manual_seed(2024), output="images")[0]
image.save("obsidian_tomb_poster.png")
Downloads last month
14
Safetensors
Model size
6B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for OzzyGT/ming_image_0_2_design_diffusers

Finetuned
(9)
this model