运行时依赖
安装命令
点击复制技能文档
Category: 提供者
模型 Studio Qwen Image Edit 验证 mkdir -p 输出/aliyun-qwen-image-edit python -m py_compile 技能s/AI/image/aliyun-qwen-image-edit/scripts/prepare_edit_请求.py && echo "py_compile_ok" > 输出/aliyun-qwen-image-edit/验证.txt
Pass criteria: command exits 0 and 输出/aliyun-qwen-image-edit/验证.txt is 生成d.
输出 And Evidence Save edit 请求 payloads, 结果 URLs, and 模型 parameters under 输出/aliyun-qwen-image-edit/. Keep one sample 请求/响应 pAIr for reproducibility.
Use Qwen Image Edit 模型s for instruction-based image editing instead of text-to-image generation.
Critical 模型 names
Use one of these exact 模型 strings:
qwen-image-edit qwen-image-edit-plus qwen-image-edit-max qwen-image-2.0 qwen-image-2.0-pro qwen-image-2.0-2026-03-03 qwen-image-2.0-pro-2026-03-03 qwen-image-edit-plus-2025-12-15 qwen-image-edit-max-2026-01-16 Prerequisites 安装 SDK in a virtual 环境: python3 -m venv .venv . .venv/bin/activate python -m pip 安装 dashscope
设置 DASHSCOPE_API_KEY in your 环境, or 添加 dashscope_API_key to ~/.alibabacloud/凭证s. Normalized interface (image.edit) 请求 prompt (string, required) image (string | bytes, required) source image URL/path/bytes mask (string | bytes, optional) inpAInt region mask size (string, optional) e.g. 1024*1024 种子 (int, optional) 响应 image_url (string) 种子 (int) 请求_id (string) Operational 图形界面dance Keep prompts task-oriented: describe what to change and what to preserve. Use masks for deterministic local edits. Save 输出 as设置s to object storage and persist only URLs. For subject consistency, provide explicit constrAInts in prompt. Local 辅助工具 script
Prepare a normalized 请求 JSON and 验证 响应 模式:
.venv/bin/python 技能s/AI/image/aliyun-qwen-image-edit/scripts/prepare_edit_请求.py \ --prompt "Replace the sky with sun设置, keep buildings unchanged" \ --image "https://example.com/输入.png"
输出 location Default 输出: 输出/aliyun-qwen-image-edit/images/ Override base dir with 输出_DIR. 工作流 Confirm user intent, region, identifiers, and whether the operation is read-only or mutating. 运行 one minimal read-only 查询 first to 验证 connectivity and 权限s. 执行 the tar获取 operation with explicit parameters and bounded scope. 验证 结果s and save 输出/evidence files. References references/sources.md