Loading...
Loading...
通过inference.sh CLI使用阿里巴巴Qwen-Image-2.0模型生成和编辑图片。可用模型:Qwen-Image-2.0(快速版)、Qwen-Image-2.0-Pro(专业文字渲染版)。功能支持:文本生成图片、多图编辑、复杂文字渲染。触发关键词:qwen image、qwen-image、alibaba image、dashscope image、qwen image 2、qwen image pro
npx skill4agent add inference-shell/skills qwen-image-2
需要安装inference.sh CLI()。获取安装指引:infshnpx skills add inference-sh/skills@agent-tools
infsh login
infsh app run alibaba/qwen-image-2 --input '{"prompt": "A serene mountain landscape at sunset"}'| 模型 | 应用ID | 速度 | 文字渲染能力 | 适用场景 |
|---|---|---|---|---|
| Qwen-Image-2.0 | | 快速 | 良好 | 通用场景 |
| Qwen-Image-2.0-Pro | | 标准速度 | 专业级 | 海报、文字密集型设计 |
infsh app list --search "qwen image"infsh app run alibaba/qwen-image-2 --input '{
"prompt": "A futuristic cityscape at sunset with flying cars"
}'infsh app run alibaba/qwen-image-2 --input '{
"prompt": "Minimalist logo design for a coffee shop",
"num_images": 4
}'infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Panoramic mountain landscape with northern lights",
"width": 1536,
"height": 1024
}'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
}'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"}
]
}'infsh app run alibaba/qwen-image-2-pro --input '{
"prompt": "Professional headshot portrait, studio lighting",
"negative_prompt": "low resolution, blurry, deformed, oversaturated"
}'infsh app run alibaba/qwen-image-2 --input '{
"prompt": "Abstract geometric art in blue and gold",
"seed": 12345
}'| 参数 | 类型 | 说明 |
|---|---|---|
| 字符串 | 必填。生成或编辑的内容描述(最多800字符) |
| 数组 | 用于编辑的输入图片(1-3张) |
| 整数 | 生成图片的数量(1-6张) |
| 整数 | 输出图片宽度(512-2048像素) |
| 整数 | 输出图片高度(512-2048像素) |
| 布尔值 | 是否添加“Qwen-Image”水印 |
| 字符串 | 需要避免生成的内容(最多500字符) |
| 布尔值 | 是否启用提示词自动优化(默认:true) |
| 整数 | 用于结果复现的随机种子(0-2147483647) |
| 字段 | 类型 | 说明 |
|---|---|---|
| 数组 | 生成或编辑后的图片(PNG格式) |
| 对象 | 包含图片尺寸和数量的元数据 |
"Title: \"Hello World!\""prompt_extend: false# 1. 生成示例输入以查看所有参数选项
infsh app sample alibaba/qwen-image-2-pro --save input.json
# 2. 编辑提示词
# 3. 运行命令
infsh app run alibaba/qwen-image-2-pro --input input.json| 特性 | qwen-image-2 | qwen-image-2-pro |
|---|---|---|
| 速度 | 更快 | 标准速度 |
| 文字渲染 | 良好 | 专业级 |
| 真实感 | 标准 | 精细化 |
| 语义贴合度 | 良好 | 增强版 |
# 全平台技能(包含150+应用)
npx skills add inference-sh/skills@agent-tools
# 所有AI图片生成模型
npx skills add inference-sh/skills@ai-image-generation
# AI视频生成(用于图片转视频)
npx skills add inference-sh/skills@ai-video-generationinfsh app list --category image