qwen-image-pro
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQwen-Image Pro - Professional Image Generation
Qwen-Image Pro - 专业图像生成
Generate images with Alibaba Qwen-Image-2.0-Pro via inference.sh CLI. Best for professional text rendering and complex designs.

通过inference.sh CLI调用阿里巴巴Qwen-Image-2.0-Pro生成图像,最适用于专业文本渲染和复杂设计场景。

Quick Start
快速开始
bash
curl -fsSL https://cli.inference.sh | sh && infsh login
infsh app run alibaba/qwen-image-2-pro --input '{"prompt": "Poster with title \"Welcome!\" in bold blue text"}'Install note: The install script only detects your OS/architecture, downloads the matching binary from, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available.dist.inference.sh
Pro Model Capabilities
专业版模型能力
- Professional Text Rendering: Multi-line and paragraph-level text with fine-grained detail
- Fine-grained Realism: Better textures and photorealistic scenes
- Stronger Semantic Adherence: More accurately follows complex prompts
- Complex Designs: Ideal for text + image combinations
- 专业文本渲染: 支持多行、段落级文本生成,细节表现精细
- 细粒度真实感: 更优秀的纹理表现与照片级真实场景生成能力
- 更强语义遵循性: 可以更精准地响应复杂prompt指令
- 复杂设计支持: 非常适合图文组合类设计需求
Examples
示例
Basic Text-to-Image
基础文生图
bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "A futuristic cityscape at sunset with flying cars"
}'bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "A futuristic cityscape at sunset with flying cars"
}'Text-Heavy Poster
大文字量海报
bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Healing-style hand-drawn poster featuring three puppies playing with a ball. The main title \"Come Play Ball!\" is prominently displayed at the top in bold, blue cartoon font. Below, the subtitle \"Join the Fun!\" appears in green font.",
"width": 1024,
"height": 1536,
"prompt_extend": false
}'bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Healing-style hand-drawn poster featuring three puppies playing with a ball. The main title \"Come Play Ball!\" is prominently displayed at the top in bold, blue cartoon font. Below, the subtitle \"Join the Fun!\" appears in green font.",
"width": 1024,
"height": 1536,
"prompt_extend": false
}'Marketing Banner
营销横幅
bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Professional marketing banner for summer sale. Large text \"SUMMER SALE\" in white on gradient sunset background. \"50% OFF\" in yellow below. Clean, modern design.",
"width": 1920,
"height": 1080,
"prompt_extend": false,
"negative_prompt": "blurry text, distorted text, low quality"
}'bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Professional marketing banner for summer sale. Large text \"SUMMER SALE\" in white on gradient sunset background. \"50% OFF\" in yellow below. Clean, modern design.",
"width": 1920,
"height": 1080,
"prompt_extend": false,
"negative_prompt": "blurry text, distorted text, low quality"
}'Multiple Variations
多版本生成
bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Minimalist logo design for a coffee shop called \"Bean & Brew\"",
"num_images": 4
}'bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Minimalist logo design for a coffee shop called \"Bean & Brew\"",
"num_images": 4
}'Image Editing (Style Transfer)
图像编辑(风格迁移)
bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Make the person from Image 1 wear the outfit from Image 2",
"reference_images": [
{"uri": "https://example.com/person.jpg"},
{"uri": "https://example.com/outfit.jpg"}
],
"num_images": 2
}'bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Make the person from Image 1 wear the outfit from Image 2",
"reference_images": [
{"uri": "https://example.com/person.jpg"},
{"uri": "https://example.com/outfit.jpg"}
],
"num_images": 2
}'Reproducible Generation
可复现生成
bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Abstract geometric art in blue and gold",
"seed": 12345
}'bash
infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Abstract geometric art in blue and gold",
"seed": 12345
}'Input Options
输入选项
| Parameter | Type | Description |
|---|---|---|
| string | Required. What to generate or edit (max 800 chars) |
| array | Input images for editing (1-3 images) |
| integer | Number of images to generate (1-6) |
| integer | Output width in pixels (512-2048) |
| integer | Output height in pixels (512-2048) |
| boolean | Add "Qwen-Image" watermark |
| string | Content to avoid (max 500 chars) |
| boolean | Enable prompt rewriting (default: true) |
| integer | Random seed for reproducibility (0-2147483647) |
Size constraint: Total pixels must be between 512×512 and 2048×2048.
| 参数 | 类型 | 描述 |
|---|---|---|
| string | 必填。 需要生成或编辑的内容描述(最多800字符) |
| array | 编辑用参考图片(1-3张) |
| integer | 生成图片数量(1-6张) |
| integer | 输出图片宽度,单位为像素(512-2048) |
| integer | 输出图片高度,单位为像素(512-2048) |
| boolean | 是否添加"Qwen-Image"水印 |
| string | 需要规避的内容描述(最多500字符) |
| boolean | 是否开启prompt重写功能(默认开启) |
| integer | 用于实现可复现生成的随机种子(取值范围0-2147483647) |
尺寸限制: 总像素需介于512×512和2048×2048之间。
Output
输出
| Field | Type | Description |
|---|---|---|
| array | The generated or edited images (PNG format) |
| object | Metadata with dimensions and count |
| 字段 | 类型 | 描述 |
|---|---|---|
| array | 生成或编辑后的图片(PNG格式) |
| object | 包含尺寸、数量信息的元数据 |
Text Rendering Tips
文本渲染技巧
For best text results with the Pro model:
- Use quotes around exact text:
"Title: \"Hello World!\"" - Specify font details: color, style, size, position
- Disable prompt_extend: Set for precise control
prompt_extend: false - Use negative prompts:
"blurry text, distorted text, low quality"
Example prompt structure:
Poster with the title "GRAND OPENING" in large red serif font at the top center.
Below, the date "March 15, 2024" in smaller black text.
Background: elegant gold and white gradient.
Style: professional, clean, modern.使用专业版模型获得最佳文本效果的建议:
- 为精确文本加引号:
"Title: \"Hello World!\"" - 明确指定字体细节:颜色、样式、大小、位置
- 关闭prompt_extend:设置获得精准控制
prompt_extend: false - 使用反向提示词:
"blurry text, distorted text, low quality"
示例prompt结构:
Poster with the title "GRAND OPENING" in large red serif font at the top center.
Below, the date "March 15, 2024" in smaller black text.
Background: elegant gold and white gradient.
Style: professional, clean, modern.Recommended Negative Prompt
推荐反向提示词
json
{
"negative_prompt": "low resolution, low quality, deformed limbs, deformed fingers, oversaturated, waxy, no facial details, overly smooth, AI-like, chaotic composition, blurry text, distorted text"
}json
{
"negative_prompt": "low resolution, low quality, deformed limbs, deformed fingers, oversaturated, waxy, no facial details, overly smooth, AI-like, chaotic composition, blurry text, distorted text"
}Sample Workflow
示例工作流
bash
undefinedbash
undefined1. Generate sample input to see all options
1. 生成示例输入文件查看所有可选参数
infsh app sample alibaba/qwen-image-2-pro --save input.json
infsh app sample alibaba/qwen-image-2-pro --save input.json
2. Edit the prompt
2. 编辑prompt内容
3. Run
3. 运行生成
infsh app run alibaba/qwen-image-2-pro --input input.json
undefinedinfsh app run alibaba/qwen-image-2-pro --input input.json
undefinedPython SDK
Python SDK
python
from inferencesh import inference
client = inference()python
from inferencesh import inference
client = inference()Text-heavy poster
大文字量海报
result = client.run({
"app": "alibaba/qwen-image-2-pro",
"input": {
"prompt": "Poster with title "Welcome!" in bold blue text at top",
"width": 1024,
"height": 1536,
"prompt_extend": False
}
})
print(result["output"])
result = client.run({
"app": "alibaba/qwen-image-2-pro",
"input": {
"prompt": "Poster with title "Welcome!" in bold blue text at top",
"width": 1024,
"height": 1536,
"prompt_extend": False
}
})
print(result["output"])
Stream live updates
流式获取实时更新
for update in client.run({
"app": "alibaba/qwen-image-2-pro",
"input": {
"prompt": "Professional product photography of a watch"
}
}, stream=True):
if update.get("progress"):
print(f"progress: {update['progress']}%")
if update.get("output"):
print(f"output: {update['output']}")
undefinedfor update in client.run({
"app": "alibaba/qwen-image-2-pro",
"input": {
"prompt": "Professional product photography of a watch"
}
}, stream=True):
if update.get("progress"):
print(f"progress: {update['progress']}%")
if update.get("output"):
print(f"output: {update['output']}")
undefinedRelated Skills
相关技能
bash
undefinedbash
undefinedStandard Qwen-Image (faster, general use)
标准版Qwen-Image(速度更快,适合通用场景)
npx skills add inference-sh/skills@qwen-image
npx skills add inference-sh/skills@qwen-image
Full platform skill (all 150+ apps)
全平台技能(包含全部150+款应用)
npx skills add inference-sh/skills@inference-sh
npx skills add inference-sh/skills@inference-sh
All image generation models
所有图像生成模型
npx skills add inference-sh/skills@ai-image-generation
Browse all image apps: `infsh app list --category image`npx skills add inference-sh/skills@ai-image-generation
浏览所有图像类应用:`infsh app list --category image`Documentation
文档
- Running Apps - How to run apps via CLI
- Streaming Results - Real-time progress updates
- File Handling - Working with images