Aliyun Bailian | 阿里云百炼 icon

Aliyun Bailian | 阿里云百炼

Access Alibaba Cloud Aliyun Bailian video generation, editing, and task APIs.

Image → Image to Image (Wan) | 图生图(通义万相)

AI-generated

Summary

Edit or transform input images using Aliyun's Wan image-to-image models, applying text instructions or masks to generate new images based on the selected model and function.

Inputs

  • Model | 模型 (required) — Select the Wan image-to-image model to use for editing; options are 'Wan 2.5 I2I Preview' (image redrawing based on prompts) or 'WanX 2.1 ImageEdit' (multifunctional editing).
  • Prompt | 文本提示词 (required) — Textual instructions describing how the input image(s) should be transformed.
  • Input Images | 图像 URL 列表 (required) — One to three reference image URLs (one per line) used for style or structure reference (required for model 'wan2.5-i2i-preview').
  • Function | 功能 (required) — Image editing function to invoke (required for model 'wanx2.1-imageedit'), such as description edit, stylization, super resolution, doodle, etc.
  • Base Image URL | 基础图 URL (required) — Original base image URL to be edited (required for model 'wanx2.1-imageedit').
  • Mask Image URL | 遮罩图 URL — Optional mask image URL for masking specific areas during editing (used with mask-based functions).
  • Negative Prompt | 反向提示词 — Optional negative prompt specifying elements to avoid in the edited image (available for model 'wan2.5-i2i-preview').
  • Resolution | 分辨率 — Output image resolution (width×height) for the generated images (available for model 'wan2.5-i2i-preview').
  • Image Count | 图片数量 — Number of edited images to generate and return; from 1 up to 4.
  • Advanced Options | 高级选项 — Additional settings including enabling prompt extension, fixed or randomized seed for reproducibility, and watermark toggle (available for model 'wan2.5-i2i-preview').
  • Upscale Factor | 超分倍率 — Upscale multiplier used when applying super resolution function (for model 'wanx2.1-imageedit').
  • Left Scale | 左向扩展比例 — Left expansion scale ratio applied when using the expand function (model 'wanx2.1-imageedit').
  • Right Scale | 右向扩展比例 — Right expansion scale ratio applied when using the expand function (model 'wanx2.1-imageedit').
  • Top Scale | 上向扩展比例 — Top expansion scale ratio applied when using the expand function (model 'wanx2.1-imageedit').
  • Bottom Scale | 下向扩展比例 — Bottom expansion scale ratio applied when using the expand function (model 'wanx2.1-imageedit').
  • Best Quality | 优先质量 — Whether to prioritize image quality over speed in generation (for model 'wanx2.1-imageedit').
  • Limit Image Size | 限制输出尺寸 — Whether to limit the output image size when using WanX image editing (model 'wanx2.1-imageedit').
  • Poll Interval (MS) — Delay in milliseconds between polling the task status when waiting for completion.
  • Max Wait (Seconds) — Maximum allowed time in seconds to wait for task completion before timing out.

Output shape

a list of generated image data objects containing URLs to the edited images and metadata

Returns one or more edited images according to the requested 'Image Count'. Supports asynchronous task polling with configurable intervals and timeout. Optional watermark addition is applied if enabled.

Examples

Example 1: Redraw an input image with a warm sunset tone using the 'wan2.5-i2i-preview' model.

Set 'Model' to 'Wan 2.5 I2I Preview', provide one or more input image URLs in 'Input Images', supply a textual prompt describing the desired transformation, choose output resolution and image count, and optionally set advanced options.

Example 2: Perform a local stylization edit on a given base image with an optional mask using 'wanx2.1-imageedit'.

Set 'Model' to 'WanX 2.1 ImageEdit', select the 'Stylization (Local)' function, provide the base image URL, optionally provide a mask image URL, configure expansion scales if needed, and adjust quality or output size limitations as desired.

Links

Discussion