qwen-image-2-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调用Alibaba Qwen-Image-2.0-Pro生成图片,非常适合专业文本渲染和复杂设计场景。

Quick Start
快速开始
Requires inference.sh CLI (). Get installation instructions:infshnpx skills add inference-sh/skills@agent-tools
bash
infsh login
infsh app run alibaba/qwen-image-2-pro --input '{"prompt": "Poster with title \"Welcome!\" in bold blue text"}'需要安装inference.sh CLI()。获取安装指引:infshnpx skills add inference-sh/skills@agent-tools
bash
infsh login
infsh app run alibaba/qwen-image-2-pro --input '{"prompt": "Poster with title \"Welcome!\" in bold blue text"}'Pro Model Capabilities
Pro版本模型能力
- 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
- 专业文本渲染:支持多行及段落级文本,细节精细
- 精细粒度写实:纹理表现更出色,场景贴近真实
- 更强语义贴合:更精准地遵循复杂提示词要求
- 复杂设计适配:非常适合图文结合的设计场景
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 | 是否启用提示词重写(默认值:true) |
| 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.为了获得最佳的文本渲染效果,使用Pro版本模型时请遵循以下建议:
- 为精确文本添加引号:例如
"Title: \"Hello World!\"" - 指定字体细节:包括颜色、样式、大小、位置
- 关闭prompt_extend:设置以获得精确控制
prompt_extend: false - 使用负面提示词:例如
"blurry text, distorted text, low quality"
提示词结构示例:
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. 编辑提示词
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@agent-tools
npx skills add inference-sh/skills@agent-tools
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