ideogram4-scene-graph
kai-denrei/ideogram4-scene-graph
Interactive explainer for Ideogram 4's JSON scene-graph prompting + the ideogram-json Claude skill
Instalação
npx convez-ai kai-denrei/ideogram4-scene-graph1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
README
A tradução para o português deste README ainda está na fila.
Ideogram 4 — A prompt is a scene graph
Two teaching artifacts about how Ideogram 4 prompting works and where it diverges from earlier text-to-image models.
→ Live site: https://kai-denrei.github.io/ideogram4-scene-graph/
Ideogram 4 is trained exclusively on structured JSON captions, encoded by a
vision-language model (Qwen3-VL-8B-Instruct). A prompt is therefore a typed,
declarative scene graph — with explicit bbox layout, literal text
elements, and color_palette conditioning — not a bag of keywords. These two
deliverables make that legible and usable.
1 · Interactive educational website
A self-contained static site (vanilla HTML/CSS/JS — no build step, no dependencies, no tracking). Highlights:
- Live caption inspector — a real JSON caption beside a 0–1000 bounding-box
canvas; hover a JSON element to light up its rectangle, or sweep the canvas to
find it in the JSON. Makes the unusual Y-first
[y_min, x_min, y_max, x_max]convention tangible. - Three eras of the prompt — keyword soup → flat prose → structured scene graph, tracking the text encoder from CLIP to T5 to a VLM.
- The schema, visualized — an expandable tree of the three top-level fields with required/optional badges and the strict key orders.
- Footguns panel — key order, uppercase hex,
ensure_ascii=False, Y-first bbox. - Comparison — SD/CLIP vs FLUX/T5 vs older Ideogram vs Ideogram 4.
- Hover-to-define modals for every load-bearing term (DiT, flow-matching, VLM encoder, CaptionVerifier, nf4/fp8, …).
- The Skill tab — the full text of deliverable 2, rendered and copyable.
Open index.html directly, or serve the folder:
python3 -m http.server 8000 # then visit http://localhost:8000
2 · The ideogram-json Claude skill
A local, self-hosted "magic prompt." Give Claude a plain-English image description and a style; it emits a valid, schema-conformant Ideogram 4 JSON caption, then validates it.
ideogram-json/
├── SKILL.md # the procedure + worked examples
├── references/schema.md # full caption schema reference
└── scripts/validate_caption.py # deterministic verifier (stdlib only)
Install (Claude Code): copy the folder into your skills directory:
cp -r ideogram-json ~/.claude/skills/ideogram-json
Then just ask, e.g. "give me an Ideogram 4 prompt for a corgi astronaut in a pastel nebula." The skill triggers on any Ideogram 4 image request.
Validate any caption directly:
python3 ideogram-json/scripts/validate_caption.py caption.json
echo '<json>' | python3 ideogram-json/scripts/validate_caption.py
The validator mirrors the model's CaptionVerifier: key order, the
photo XOR art_style rule, background before elements, element key order,
type:"text" ⇔ text field, bbox sanity, uppercase hex, palette limits, and a
warning on \uXXXX escapes.
License
MIT — see LICENSE.