Qwen 2.1: AI 图像编辑器

使用 Qwen 2.1 图生图编辑和重组最多 10 张图像。可选修复蒙版,实现精确局部编辑。免费试用,按生成次数付费。 Qwen 2.1 图生图可根据单条文本提示编辑、改变风格并重组最多 10 张参考图像,同时保留指定的主体身份和构图。可选的图像修复蒙版可将请求切换为局部编辑模式,仅修改一张参考图中白色标记的区域,其余部分保持不变。若要纯文本生成图像,请参阅 Qwen 2.1 文生图;若要使用阿里巴巴更新一代的模型,请参阅 Qwen 3.0 图生图。

交互式模型控制

使用 Qwen 2.1 图生图编辑和重组最多 10 张图像。可选修复蒙版,实现精确局部编辑。免费试用,按生成次数付费。

📝

概览

关于此模型

Qwen 2.1 图生图可根据单条文本提示编辑、改变风格并重组最多 10 张参考图像,同时保留指定的主体身份和构图。可选的图像修复蒙版可将请求切换为局部编辑模式,仅修改一张参考图中白色标记的区域,其余部分保持不变。若要纯文本生成图像,请参阅 Qwen 2.1 文生图;若要使用阿里巴巴更新一代的模型,请参阅 Qwen 3.0 图生图。

1产品风格重塑:更改现有产品照片的配色、材质或背景,同时保留其形状和布局。
2多图合成:将最多 10 张参考图像中的元素组合成一个连贯场景。
3局部修复:使用蒙版仅重新生成特定物体或区域(例如墙上的海报),其他部分逐像素保持不变。
4角色与风格一致性:根据一组参考图,让主体在不同场景和服装中保持外观一致。
5批量创意变体:仅更改提示词和 seed,即可基于同一张底图生成多个编辑版本。
💰

价格与价值

成本分析

muapiapp$0.03 (1K) / $0.05 (2K)

单张图像按固定价格计费,不受参考图数量影响。

Fal.ai暂不可用

目前 Fal.ai 尚未上架 Qwen 2.1。

Replicate暂不可用

目前 Replicate 尚未上架 Qwen 2.1。

** 竞品价格根据相似模型架构和使用层级估算。

⚙️

技术详情

配置参数

提示词string

The prompt describing the result you want. When mask_url is supplied, describe what should be generated inside the white area of the mask.

默认值Replace the backpack in the first image with the colour scheme from the second image, and leave everything else unchanged
输入图像array

Reference images, given as an array of 1 to 10 URLs. Order matters when the prompt refers to 'the first image', 'the second image'.

默认值
蒙版 URLstring

可选的 inpainting mask (white = area to change, black = kept unchanged). Upload a mask with exactly one reference image; transparent backgrounds are not supported in mask mode.

默认值-
画面比例枚举(10 个选项)

Output aspect ratio. Defaults to the first reference image's ratio. Ignored in local-edit mode.

默认值auto
分辨率枚举(2 个选项)

Output resolution tier. 1K is the faster option; 2K produces four times the pixels and takes longer.

默认值1K
Background枚举(2 个选项)

Background type. Transparent outputs a PNG or WebP with a real alpha channel and cannot be used with JPEG.

默认值opaque
输出格式枚举(3 个选项)

Output image format. jpeg has no alpha channel and cannot be combined with a transparent background.

默认值png
Enhance Promptboolean

Rewrites the prompt into a fuller scene description before generating, which noticeably improves quality. Ignored in local-edit mode.

默认值true
种子integer

The random seed. Omit it to generate with a random seed.

默认值-
📖

实施指南

开发者文档

如何使用 Qwen 2.1 图生图 API

  1. 提供参考图像:通过 images_list 传入 1 到 10 个 URL;如果提示词中提到“第一张图”“第二张图”等,图像顺序很重要。
  2. 描述编辑内容:编写 prompt,说明希望进行的转换。
  3. 可选——局部编辑:同时提供 mask_url(白色 = 修改,黑色 = 保留)和恰好一张参考图,即可仅编辑蒙版区域。
  4. Submit the task:
curl -X POST "https://api.muapi.ai/api/v1/qwen2-1-image-to-image" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images_list": ["https://example.com/a.jpg", "https://example.com/b.jpg"],
    "prompt": "Replace the backpack in the first image with the colour scheme from the second image, and leave everything else unchanged",
    "resolution": "1K"
  }'
  1. 轮询结果:使用返回的 request_id 查询标准预测结果端点,直到 status 变为 completed。
❓

常见问题

常见问答

什么是 Qwen 2.1 图生图?

Qwen 2.1 图生图是阿里巴巴的参考图像编辑模型——它根据文本提示编辑、改变现有图像风格并进行重组,而非从零生成。

可以使用多少张参考图?

每次请求可使用 1 到 10 张图像。参考图越多,单张图保留的细节可能越少;注重还原度时建议不超过 4 张。

图像修复蒙版如何工作?

同时提供 `mask_url`(一张用白色标记待修改区域的黑白图像)和恰好一张参考图。系统只会重新生成白色标记区域,其他部分保持不变。局部编辑模式会忽略 `aspect_ratio` 和 `enhance_prompt`。

输出使用什么宽高比?

默认情况下(`auto`),输出会匹配第一张参考图的宽高比,并取最接近的受支持比例。在局部编辑模式之外,你可以明确指定其他比例。

可以生成透明背景的输出吗?

可以——将 `background` 设为 `transparent`,输出格式选择 `png` 或 `webp`;此设置不能与蒙版或 `jpeg` 同时使用。