qwen-image-2-pro

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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

Quick Start

快速开始

Requires inference.sh CLI (
infsh
). Get installation instructions:
npx 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(
infsh
)。获取安装指引:
npx 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

输入参数选项

ParameterTypeDescription
prompt
stringRequired. What to generate or edit (max 800 chars)
reference_images
arrayInput images for editing (1-3 images)
num_images
integerNumber of images to generate (1-6)
width
integerOutput width in pixels (512-2048)
height
integerOutput height in pixels (512-2048)
watermark
booleanAdd "Qwen-Image" watermark
negative_prompt
stringContent to avoid (max 500 chars)
prompt_extend
booleanEnable prompt rewriting (default: true)
seed
integerRandom seed for reproducibility (0-2147483647)
Size constraint: Total pixels must be between 512×512 and 2048×2048.
参数类型描述
prompt
string必填。要生成或编辑的内容(最多800字符)
reference_images
array用于编辑的输入图片(1-3张)
num_images
integer生成图片数量(1-6张)
width
integer输出图片宽度(像素,范围512-2048)
height
integer输出图片高度(像素,范围512-2048)
watermark
boolean是否添加“Qwen-Image”水印
negative_prompt
string要避免生成的内容(最多500字符)
prompt_extend
boolean是否启用提示词重写(默认值:true)
seed
integer用于结果复现的随机种子(范围0-2147483647)
尺寸限制:总像素数需在512×512到2048×2048之间。

Output

输出内容

FieldTypeDescription
images
arrayThe generated or edited images (PNG format)
output_meta
objectMetadata with dimensions and count
字段类型描述
images
array生成或编辑后的图片(PNG格式)
output_meta
object包含尺寸、数量等信息的元数据

Text Rendering Tips

文本渲染技巧

For best text results with the Pro model:
  1. Use quotes around exact text:
    "Title: \"Hello World!\""
  2. Specify font details: color, style, size, position
  3. Disable prompt_extend: Set
    prompt_extend: false
    for precise control
  4. 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版本模型时请遵循以下建议:
  1. 为精确文本添加引号:例如
    "Title: \"Hello World!\""
  2. 指定字体细节:包括颜色、样式、大小、位置
  3. 关闭prompt_extend:设置
    prompt_extend: false
    以获得精确控制
  4. 使用负面提示词:例如
    "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
undefined
bash
undefined

1. 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
undefined
infsh app run alibaba/qwen-image-2-pro --input input.json
undefined

Python 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']}")
undefined
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']}")
undefined

Related Skills

相关技能

bash
undefined
bash
undefined

Standard 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

文档链接