qwen-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQwen-Image - Alibaba Image Generation
Qwen-Image - 阿里云图像生成
Generate and edit images with Alibaba Qwen-Image-2.0 models via inference.sh CLI.

通过inference.sh CLI使用阿里云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, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available.dist.inference.sh
Models
模型
| Model | App ID | Speed | Text Rendering | Best For |
|---|---|---|---|---|
| Qwen-Image-2.0 | | Fast | Good | General use |
| Qwen-Image-2.0-Pro | | Standard | Professional | Posters, text-heavy designs |
| 模型 | 应用ID | 速度 | 文字渲染能力 | 适用场景 |
|---|---|---|---|---|
| Qwen-Image-2.0 | | 快 | 良好 | 通用场景 |
| Qwen-Image-2.0-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
输入参数
| 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 | 是否开启提示词重写(默认开启) |
| 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 | 包含尺寸和数量信息的元数据 |
Prompt Tips
提示词使用技巧
For Text Rendering (use Pro model):
- Put exact text in quotes:
"Title: \"Hello World!\"" - Specify font style, color, position
- Set for precise control
prompt_extend: false
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
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
undefinedModel Comparison
模型对比
| Feature | qwen-image-2 | qwen-image-2-pro |
|---|---|---|
| Speed | Faster | Standard |
| Text Rendering | Good | Professional |
| Realism | Standard | Fine-grained |
| Semantic Adherence | Good | Enhanced |
| 特性 | qwen-image-2 | qwen-image-2-pro |
|---|---|---|
| 速度 | 更快 | 标准 |
| 文字渲染能力 | 良好 | 专业级 |
| 真实度 | 标准 | 精细 |
| 语义贴合度 | 良好 | 增强 |
Related Skills
相关技能
bash
undefinedbash
undefinedFull 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
文档
- Running Apps - How to run apps via CLI
- Streaming Results - Real-time progress updates
- File Handling - Working with images