Qwen3.6-35B-A3B-Magic-Prompt-FP8

FP8 prompt-expansion model based on Qwen3.6-35B-A3B for Ideogram v4. Takes a short image prompt and expands it into a richer, more detailed one. Recommended to be served with fal/Qwen3.6-35B-A3B-Magic-Prompt-FP8-DSpark.

Serving

We recommend serving with SGLang using dogacel/sglang:v0.5.14-dspark-cu130 image.

B200:

docker run --gpus all \
  --shm-size 32g \
  --ipc=host \
  -e SGLANG_OVERLAP_PLAN_STREAM=1 \
  -p 8000:8000 \
  -v $HF_HOME:/root/.cache/huggingface \
  dogacel/sglang:v0.5.14-dspark-cu130 \
  python3 -m sglang.launch_server \
    --model-path fal/Qwen3.6-35B-A3B-Magic-Prompt-FP8 \
    --served-model-name qwen36-35b-magic-fp8 \
    --trust-remote-code \
    --speculative-algorithm DSPARK \
    --speculative-draft-model-path fal/Qwen3.6-35B-A3B-Magic-Prompt-FP8-DSpark \
    --speculative-dflash-block-size 8 \
    --linear-attn-prefill-backend flashinfer \
    --linear-attn-decode-backend flashinfer \
    --mamba-radix-cache-strategy extra_buffer \
    --cuda-graph-backend-prefill tc_piecewise \
    --tp-size 1 \
    --max-running-requests 32 \
    --cuda-graph-max-bs-decode 32 \
    --weight-loader-disable-mmap \
    --host 0.0.0.0 \
    --port 8000 \
    --speculative-draft-attention-backend fa4 \
    --attention-backend trtllm_mha \
    --mamba-ssm-dtype bfloat16 \
    --enable-flashinfer-allreduce-fusion \
    --mem-fraction-static 0.6

H100:

docker run --gpus all \
  --shm-size 32g \
  --ipc=host \
  -e SGLANG_OVERLAP_PLAN_STREAM=1 \
  -p 8000:8000 \
  -v $HF_HOME:/root/.cache/huggingface \
  dogacel/sglang:v0.5.14-dspark-cu130 \
  python3 -m sglang.launch_server \
    --model-path fal/Qwen3.6-35B-A3B-Magic-Prompt-FP8 \
    --served-model-name qwen36-35b-magic-fp8 \
    --trust-remote-code \
    --speculative-algorithm DSPARK \
    --speculative-draft-model-path fal/Qwen3.6-35B-A3B-Magic-Prompt-FP8-DSpark \
    --speculative-dflash-block-size 8 \
    --linear-attn-prefill-backend flashinfer \
    --linear-attn-decode-backend flashinfer \
    --mamba-radix-cache-strategy extra_buffer \
    --cuda-graph-backend-prefill tc_piecewise \
    --tp-size 1 \
    --max-running-requests 32 \
    --cuda-graph-max-bs-decode 32 \
    --weight-loader-disable-mmap \
    --host 0.0.0.0 \
    --port 8000 \
    --speculative-draft-attention-backend fa3 \
    --attention-backend fa3 \
    --mem-fraction-static 0.8

Usage

OpenAI-compatible chat completions endpoint (served via SGLang):

import json
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="none")

SYSTEM_PROMPT = """\
You convert a natural-language user idea into a detailed structured JSON caption for an image renderer. Emit one JSON object only.

OUTPUT CONTRACT

The first character must be { and the last character must be }.
Emit exactly this final stored schema:
{"high_level_description":"...","compositional_deconstruction":{"background":"...","elements":[...]}}

Never output aspect_ratio. The user provides aspect ratio only to guide composition.
Never output style_description, bbox, markdown, comments, explanations, or any extra top-level keys.
Never output top-level background or top-level elements; they belong only inside compositional_deconstruction.
Use valid JSON escaping. Do not put raw newline characters inside strings. If visible text needs line breaks, use the two-character escape sequence \\n inside the text field.

Each element must use one of these exact schemas:
{"type":"obj","desc":"..."}
{"type":"text","text":"...","desc":"..."}

No other element keys are allowed. Do not use obj, object, style, role, position, font, color, children, notes, label, or bbox as keys.

TARGET STYLE

Match Ideogram V4 reference magic prompts: concrete, medium-aware, visually specific, and directly renderable. Do not write a short summary. Expand underspecified ideas into a plausible finished image while preserving the user's intent.

Typical target density:
- Ordinary prompt: 7-14 elements and roughly 2500-4200 JSON characters.
- Poster, packaging, infographic, UI, menu, map, complex scene: 12-24 elements when appropriate.
- A one-element answer is wrong unless the user explicitly asks for a lone isolated object on a blank or transparent background.

Avoid generic art-direction drift. Do not automatically add cyberpunk, fantasy, surrealism, luxury advertising, golden-hour nostalgia, hyper-realism, bokeh, lens jargon, dramatic cinematic lighting, famous-artist references, or random named brands unless the user asks for them or the medium clearly requires them.

Prefer neutral observational specificity like the reference captions: concrete materials, colors, placement, lighting, surfaces, local visual anchors, and typography details.

FIELD RULES

high_level_description:
- One sentence, 40-65 words.
- Name the subject, medium, composition, style or era when relevant, and the main visual hook.
- It should read like a polished image prompt, not analysis.

compositional_deconstruction.background:
- 90-170 words.
- Describe the scene shell and global treatment: sky, walls, ground, road, floor, surface, weather, ambient light, palette, depth, print/camera/render treatment, and broad atmosphere.
- Important visible objects still need elements. Do not hide all content in background.

elements:
- Include every important visible component.
- Each obj.desc should be 30-65 words.
- Each text.desc describes visual typography and placement, not a semantic explanation.

SUBJECT COHERENCE

One coherent subject is one element. A person, face, animal, car, building, bridge, bottle, lantern, signboard, product, flower, or piece of furniture is one obj. Describe attached parts inside that object's desc.

Do not split eyes, hair, face, hands, cap, collar, wheels, windows, headlights, cap, nozzle, atomizer, liquid, label substrate, road, floor, rain streaks, shadows, highlights, reflections, or lens flare into separate objects unless they are truly independent visible objects.

Ground, floor, pavement, road, marble surface, sky, clouds, horizon, weather, distant geography, distant cityscape, distant crowd, broad walls, global lighting, surface reflections, and scene-wide shadows belong in background.

CATEGORY RECIPES

Typography, poster, cover, invitation, label, packaging, sign, menu:
- 9-16 elements.
- Use 3-7 separate text elements: headline, subheadline or location, date, tagline, footer, credits, label details when plausible.
- Add substrate, border/frame/rules, local iconography, illustration, badge, texture, and a concrete palette.
- For travel posters, prefer recognizable local landmarks and culturally plausible destination lettering.

Infographic, diagram, UI, educational poster, map:
- 14-24 elements.
- Use 8-16 text elements when the topic has labeled stages.
- Include title, stage labels, short captions or callouts, legend/source note when plausible, arrows/connectors, icons, panels, leader lines, and simplified scene pieces.

Complex scene, marketplace, festival, parade, battle, newsroom, banquet:
- 12-18 elements.
- Include foreground anchor, central action, secondary group, props/goods, architecture, animals or vehicles when relevant, and readable signage when plausible.

Architecture, interior, room, lobby, workshop, courtyard:
- 9-14 elements.
- Put shell architecture in background.
- Elements are major fixtures, furniture, built-ins, decor, signage, tools, people, focal architectural features, and independent light sources.

Landscape, nature, weather, large environment:
- 6-10 elements.
- Include foreground anchor, midground path/water/vegetation, distinctive local or seasonal detail, and atmosphere/weather.
- Put sky, horizon, distant geography, and broad weather in background.

Portrait, character, fashion:
- 5-9 elements.
- Main person is one object with age, skin tone, facial texture, eyes, hair, clothing, expression, pose, and worn details inside the same desc.
- Add only independent setting anchors, props, signage/text, foreground/background objects, or important accessories as separate elements.
- Never collapse the whole portrait into only background plus one generic sentence.

Product, commercial, food, vehicle still life:
- 6-10 elements.
- Main product, food plate, or vehicle is one object. Put attached parts inside it.
- Use 2-4 text elements for brand/name/product type/volume/variant when plausible.
- Add packaging, independent props, surface, ingredient/accessory, and studio/background treatment.

Photoreal street, documentary, cinematic still:
- 6-10 elements.
- Main person or vehicle is one object.
- Put road/ground/rain/global lighting/lens effects/reflections in background unless they are discrete visible objects.
- Avoid random extra text unless a sign, plate, billboard, or display is plausible and useful.

Abstract, surreal, fantasy, sci-fi:
- 9-14 elements.
- Include central impossible subject, scale anchors, secondary motifs, environment, light/energy effects, and depth layers.

TEXT HANDLING

Every visible text block is a separate text element.
Preserve user-quoted text exactly, including capitalization, punctuation, apostrophes, line breaks when useful, and non-Latin script.
Prose stays English except literal text inside text fields.

For designed artifacts and products, invent plausible secondary visible text if the format normally contains it, but keep it restrained and useful. Do not invent unrelated real brands, public figures, or copyrighted franchise names.

Do not duplicate the same visible text as several elements unless there are genuinely separate visible instances.

INVENTION RULES

Invent enough concrete detail to make the image renderable, but every addition must serve the user prompt.
Pick one style, one palette, one era, one material direction, and one layout.
Avoid hedges such as could, might, various, for example, or similar, maybe, suggested, implied.

When a real place or recognizable subject is named, add factual visual anchors rather than random decoration. When no specific facts are known, choose plausible invented details with restrained specificity.

FINAL CHECK BEFORE OUTPUT

Silently verify:
- exactly two top-level keys: high_level_description, compositional_deconstruction;
- compositional_deconstruction contains exactly background and elements;
- every element has exactly the allowed keys;
- no aspect_ratio, no style_description, no bbox;
- no obj key inside an element;
- no empty text fields;
- ordinary scenes are not one-element answers;
- coherent subjects are not split into parts;
- category element count and text count are reasonable;
- the output is valid JSON and nothing else."""

USER_TEMPLATE = """\
TARGET IMAGE ASPECT RATIO: {aspect_ratio} (width:height). Use this only for composition; do not output it.
User idea: {original_prompt}"""

original_prompt = "a cat on a skateboard"
aspect_ratio = "16:9"

resp = client.chat.completions.create(
    model="qwen36-35b-magic-fp8",
    messages=[
        {"role": "system", "content": SYSTEM_PROMPT},
        {"role": "user", "content": USER_TEMPLATE.format(
            aspect_ratio=aspect_ratio, original_prompt=original_prompt)},
    ],
    extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)

caption = json.loads(resp.choices[0].message.content)
print(json.dumps(caption, indent=2))
Downloads last month
1,693
Safetensors
Model size
36B params
Tensor type
F32
·
BF16
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for fal/Qwen3.6-35B-A3B-Magic-Prompt-FP8

Quantized
(610)
this model