qwen-image

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Qwen-Image - Alibaba Image Generation

Qwen-Image - 阿里云图像生成

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

快速开始

bash
curl -fsSL https://cli.inference.sh | sh && infsh login

infsh app run alibaba/qwen-image-2 --input '{"prompt": "A serene mountain landscape at sunset"}'
Install note: The install script only detects your OS/architecture, downloads the matching binary from
dist.inference.sh
, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available.
bash
curl -fsSL https://cli.inference.sh | sh && infsh login

infsh app run alibaba/qwen-image-2 --input '{"prompt": "A serene mountain landscape at sunset"}'
安装说明: 安装脚本仅会检测你的操作系统/架构,从
dist.inference.sh
下载匹配的二进制文件并验证其SHA-256校验和。不需要提升权限,也不会运行后台进程。也可选择手动安装与校验

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
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是否开启提示词重写(默认开启)
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包含尺寸和数量信息的元数据

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
    获得更精准的控制
风格关键词: photorealistic, illustration, watercolor, oil painting, digital art, anime, 3D render
构图关键词: close-up, wide shot, aerial view, macro, portrait, landscape
光线关键词: natural light, studio lighting, golden hour, dramatic shadows, neon

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@inference-sh
npx skills add inference-sh/skills@inference-sh

All image generation models

所有图像生成模型

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

Video generation (for image-to-video)

视频生成能力(用于图生视频)

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

文档