Short user prompts — especially for infographic generation — often under-constrain the image model. Running the raw prompt through a strong LLM enhancer first consistently lifts structure, typography, information density, and "brief-readability" of the final image. This document describes how to turn it on, which upstream LLMs we recommend, and what the tradeoffs look like.
Use --enhance when:
- The user prompt is short or only names a topic (e.g.
"A chart about AI hardware in 2026"). - You are generating for demo / deck / poster use and can afford one extra LLM round-trip before the T2I call.
Skip --enhance when:
- The user already supplies a long, structured, production-ready prompt.
- Latency or third-party API cost is the primary concern.
user prompt ──► LLM (system prompt = infographic expander) ──► expanded prompt ──► SenseNova-U1
All configuration is environment-variable based so the same script can switch backends without code changes.
| Env var | Default | Purpose |
|---|---|---|
U1_ENHANCE_BACKEND |
chat_completions |
chat_completions (OpenAI-compatible) or anthropic |
U1_ENHANCE_ENDPOINT |
Gemini OpenAI-compat URL | Full /chat/completions or /v1/messages URL |
U1_ENHANCE_MODEL |
gemini-3.1-pro |
Model name string sent in the request body |
U1_ENHANCE_API_KEY |
unset | Bearer token (required) |
First, create a .env file and populate it with the four required parameters. Then just add --enhance to your examples/t2i/inference.py command line.
Add --print_enhance to echo the original + enhanced prompt for
debugging.
To use SenseNova 6.7 Flash-Lite as the enhancer, get an API key from SenseNova Console · token-plan, then set:
U1_ENHANCE_BACKEND=chat_completions
U1_ENHANCE_ENDPOINT=https://token.sensenova.cn/v1/chat/completions
U1_ENHANCE_MODEL=sensenova-6.7-flash-lite
U1_ENHANCE_API_KEY=<your SenseNova API key>| Model | Backend | Endpoint template | Notes |
|---|---|---|---|
| Gemini 3.1 Pro (Default) | chat_completions |
https://generativelanguage.googleapis.com/v1beta/openai/chat/completions |
Best overall infographic quality in our internal bench. Excellent at structured / hierarchical content. |
| SenseNova 6.7 Flash-Lite | chat_completions |
https://token.sensenova.cn/v1/chat/completions |
Near Gemini 3.1 Pro quality on Chinese content at lower per-token cost, preferred for production. |
| Anthropic Claude (Sonnet/Opus) | anthropic |
https://api.anthropic.com/v1/messages |
Strong typography discipline, slightly less "information-dense" out of the box. |
| Kimi 2.5 | chat_completions |
https://api.moonshot.cn/v1/chat/completions |
Good Chinese enhancements, weaker for English-dense infographics in our runs. |
| Gemini 3.1 Flash-Lite (Third-party service) | chat_completions |
https://aigateway.edgecloudapp.com/v1/f194fd69361cd590f1fa136c9c90eca1/senseai |
The overall quality of the information chart is high and its generation speed is fast. |
| Kimi 2.5/Qwen3.6-Plus (Third-party service) | chat_completions |
https://coding.dashscope.aliyuncs.com/v1/chat/completions |
Good Chinese enhancements. Different models can be flexibly selected. |
The table below will be populated with side-by-side samples from the same handful of base prompts, rendered at
2048×2048with identical sampler knobs. PRs with new backends welcome.



















