qwen-image-2

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Qwen-Image - Alibaba Image Generation

Qwen-Image - 阿里巴巴AI图片生成工具

Generate and edit images with Alibaba Qwen-Image-2.0 models via inference.sh CLI.
Qwen-Image-2.0
通过inference.sh CLI工具,使用阿里巴巴Qwen-Image-2.0模型生成和编辑图片。
Qwen-Image-2.0

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 --input '{"prompt": "A serene mountain landscape at sunset"}'
需要安装inference.sh CLI(
infsh
)。获取安装指引:
npx skills add inference-sh/skills@agent-tools
bash
infsh login

infsh app run alibaba/qwen-image-2 --input '{"prompt": "A serene mountain landscape at sunset"}'

Models

模型列表

ModelApp IDSpeedText RenderingBest For
Qwen-Image-2.0
alibaba/qwen-image-2
FastGoodGeneral use
Qwen-Image-2.0-Pro
alibaba/qwen-image-2-pro
StandardProfessionalPosters, text-heavy designs
模型应用ID速度文字渲染能力适用场景
Qwen-Image-2.0
alibaba/qwen-image-2
快速良好通用场景
Qwen-Image-2.0-Pro
alibaba/qwen-image-2-pro
标准速度专业级海报、文字密集型设计

Search Qwen Image Apps

搜索Qwen Image应用

bash
infsh app list --search "qwen image"
bash
infsh app list --search "qwen image"

Examples

使用示例

Basic Text-to-Image

基础文本转图片

bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "A futuristic cityscape at sunset with flying cars"
}'
bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "A futuristic cityscape at sunset with flying cars"
}'

Multiple Images

生成多张图片

bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "Minimalist logo design for a coffee shop",
  "num_images": 4
}'
bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "Minimalist logo design for a coffee shop",
  "num_images": 4
}'

Custom Resolution

自定义分辨率

bash
infsh app run alibaba/qwen-image-2-pro --input '{
  "prompt": "Panoramic mountain landscape with northern lights",
  "width": 1536,
  "height": 1024
}'
bash
infsh app run alibaba/qwen-image-2-pro --input '{
  "prompt": "Panoramic mountain landscape with northern lights",
  "width": 1536,
  "height": 1024
}'

Text-Heavy Poster (Pro)

文字密集型海报(Pro版)

bash
infsh app run alibaba/qwen-image-2-pro --input '{
  "prompt": "Poster with title \"Summer Sale!\" in bold red text at the top. Subtitle \"50% Off Everything\" in blue below. Beach background with palm trees.",
  "width": 1024,
  "height": 1536,
  "prompt_extend": false
}'
bash
infsh app run alibaba/qwen-image-2-pro --input '{
  "prompt": "Poster with title \"Summer Sale!\" in bold red text at the top. Subtitle \"50% Off Everything\" in blue below. Beach background with palm trees.",
  "width": 1024,
  "height": 1536,
  "prompt_extend": false
}'

Image Editing (Multi-Reference)

多参考图编辑

bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "Make the girl from Image 1 wear the dress from Image 2 in the pose from Image 3",
  "reference_images": [
    {"uri": "https://example.com/person.jpg"},
    {"uri": "https://example.com/dress.jpg"},
    {"uri": "https://example.com/pose.jpg"}
  ]
}'
bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "Make the girl from Image 1 wear the dress from Image 2 in the pose from Image 3",
  "reference_images": [
    {"uri": "https://example.com/person.jpg"},
    {"uri": "https://example.com/dress.jpg"},
    {"uri": "https://example.com/pose.jpg"}
  ]
}'

With Negative Prompt

使用负面提示词

bash
infsh app run alibaba/qwen-image-2-pro --input '{
  "prompt": "Professional headshot portrait, studio lighting",
  "negative_prompt": "low resolution, blurry, deformed, oversaturated"
}'
bash
infsh app run alibaba/qwen-image-2-pro --input '{
  "prompt": "Professional headshot portrait, studio lighting",
  "negative_prompt": "low resolution, blurry, deformed, oversaturated"
}'

Reproducible with Seed

固定随机种子生成可复现图片

bash
infsh app run alibaba/qwen-image-2 --input '{
  "prompt": "Abstract geometric art in blue and gold",
  "seed": 12345
}'
bash
infsh app run alibaba/qwen-image-2 --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
字符串必填。生成或编辑的内容描述(最多800字符)
reference_images
数组用于编辑的输入图片(1-3张)
num_images
整数生成图片的数量(1-6张)
width
整数输出图片宽度(512-2048像素)
height
整数输出图片高度(512-2048像素)
watermark
布尔值是否添加“Qwen-Image”水印
negative_prompt
字符串需要避免生成的内容(最多500字符)
prompt_extend
布尔值是否启用提示词自动优化(默认:true)
seed
整数用于结果复现的随机种子(0-2147483647)
尺寸限制:总像素范围必须在512×512到2048×2048之间。

Output

输出内容

FieldTypeDescription
images
arrayThe generated or edited images (PNG format)
output_meta
objectMetadata with dimensions and count
字段类型说明
images
数组生成或编辑后的图片(PNG格式)
output_meta
对象包含图片尺寸和数量的元数据

Prompt Tips

提示词技巧

For Text Rendering (use Pro model):
  • Put exact text in quotes:
    "Title: \"Hello World!\""
  • Specify font style, color, position
  • Set
    prompt_extend: false
    for precise control
Styles: photorealistic, illustration, watercolor, oil painting, digital art, anime, 3D render
Composition: close-up, wide shot, aerial view, macro, portrait, landscape
Lighting: natural light, studio lighting, golden hour, dramatic shadows, neon
文字渲染技巧(请使用Pro模型):
  • 将需要精确呈现的文字放在引号中:
    "Title: \"Hello World!\""
  • 明确指定字体样式、颜色和位置
  • 设置
    prompt_extend: false
    以实现精确控制
风格选项:写实风格、插画、水彩画、油画、数字艺术、动漫、3D渲染
构图选项:特写、广角、航拍、微距、人像、风景
光线选项:自然光、影棚光、黄金时刻、戏剧性阴影、霓虹灯光

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

Model Comparison

模型对比

Featureqwen-image-2qwen-image-2-pro
SpeedFasterStandard
Text RenderingGoodProfessional
RealismStandardFine-grained
Semantic AdherenceGoodEnhanced
特性qwen-image-2qwen-image-2-pro
速度更快标准速度
文字渲染良好专业级
真实感标准精细化
语义贴合度良好增强版

Related Skills

相关技能

bash
undefined
bash
undefined

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

所有AI图片生成模型

npx skills add inference-sh/skills@ai-image-generation
npx skills add inference-sh/skills@ai-image-generation

Video generation (for image-to-video)

AI视频生成(用于图片转视频)

npx skills add inference-sh/skills@ai-video-generation

Browse all image apps: `infsh app list --category image`
npx skills add inference-sh/skills@ai-video-generation

浏览所有图片类应用:`infsh app list --category image`

Documentation

官方文档