edit_image
Edit one image or compose a new image from 2-4 references by giving instructions. Specify the base and supporting images to replace backgrounds, insert subjects, or modify details with a self-hosted model.
Instructions
Edit one image, or compose a new image from 2-4 reference images.
model: which image model to use; omit for the configured default. Currently available: "qwen21".
images: 1-4 local file paths (or data:/base64 strings). ORDER MATTERS: the first image is
the base/subject and sets the output canvas (unless width/height are given); it is fitted and
padded, never stretched. Later images are supporting references at ~1 MP.
instruction: start with the operation ("Replace the background with…", "Put the person from
<image1> into the scene from <image2>…"). Say what comes from each reference, what must stay
recognizable and what must change. For placing a subject into a scene: subject FIRST, scene
SECOND, with explicit <image1>/<image2> roles.
Other parameters and the return value match generate_image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cfg | No | ||
| save | No | ||
| seed | No | ||
| count | No | ||
| model | No | ||
| steps | No | ||
| width | No | ||
| height | No | ||
| images | Yes | ||
| negative | No | ||
| instruction | Yes |