live
MODEL IDalibaba:qwen-image@2.1-pro

Qwen-Image-2.1-Pro

Alibaba
by

Qwen-Image-2.1-Pro is the Pro tier of Alibaba's Qwen-Image-2.1 family, a unified model for text-to-image generation and prompt-guided image editing. It composes and edits from up to 10 reference images and can rewrite prompts with an LLM before generation, in a direct or agent mode with optional thinking. It outputs from 0.26 to 4.19 megapixels at aspect ratios from 1:8 to 8:1, suited to product imagery, marketing visuals, and multi-image compositions.

Qwen-Image-2.1-Pro

Transparent backgrounds

How to generate cut-outs with a real alpha channel on Qwen-Image-2.1-Pro: the prompt wording that turns it on, the output formats that keep it, and subject extraction from a photo.

Introduction

A product thumbnail or a T-shirt graphic has to sit on a layout it has never seen, so it cannot bring a background with it. Qwen-Image-2.1-Pro returns that kind of asset directly: the subject on a real alpha channel, with nothing behind it.

Two things turn it on: a fixed wording in the prompt and an output format that can carry transparency.

This guide covers the wording, the formats, graphics with lettering, cutting a subject out of an existing photo, and where the alpha channel stops being reliable.

Request shape

Two parts of the request do the work: the sentences that open and close the prompt, and outputFormat.

Try in Playground
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'alibaba:qwen-image@2.1-pro',
  positivePrompt: 'This is an RGBA image with transparency. A rattan lounge chair with a rounded back, a thick cream seat cushion, and slim black metal legs, three-quarter front view, the whole chair inside the frame with a wide empty margin on every side, soft even studio lighting, no floor and no shadow. The image has alpha channel and the background is transparent.',
  width: 1536,
  height: 1536,
  outputFormat: 'PNG',
  settings: {
    promptExtend: false
  }
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "alibaba:qwen-image@2.1-pro",
            "positivePrompt": "This is an RGBA image with transparency. A rattan lounge chair with a rounded back, a thick cream seat cushion, and slim black metal legs, three-quarter front view, the whole chair inside the frame with a wide empty margin on every side, soft even studio lighting, no floor and no shadow. The image has alpha channel and the background is transparent.",
            "width": 1536,
            "height": 1536,
            "outputFormat": "PNG",
            "settings": {
                "promptExtend": False
            }
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "11f1a427-3be0-4d81-919b-a4d15b7c6fbd",
      "model": "alibaba:qwen-image@2.1-pro",
      "positivePrompt": "This is an RGBA image with transparency. A rattan lounge chair with a rounded back, a thick cream seat cushion, and slim black metal legs, three-quarter front view, the whole chair inside the frame with a wide empty margin on every side, soft even studio lighting, no floor and no shadow. The image has alpha channel and the background is transparent.",
      "width": 1536,
      "height": 1536,
      "outputFormat": "PNG",
      "settings": {
        "promptExtend": false
      }
    }
  ]'
runware run alibaba:qwen-image@2.1-pro \
  positivePrompt="This is an RGBA image with transparency. A rattan lounge chair with a rounded back, a thick cream seat cushion, and slim black metal legs, three-quarter front view, the whole chair inside the frame with a wide empty margin on every side, soft even studio lighting, no floor and no shadow. The image has alpha channel and the background is transparent." \
  width=1536 \
  height=1536 \
  outputFormat=PNG \
  settings.promptExtend=false
{
  "taskType": "imageInference",
  "taskUUID": "11f1a427-3be0-4d81-919b-a4d15b7c6fbd",
  "model": "alibaba:qwen-image@2.1-pro",
  "positivePrompt": "This is an RGBA image with transparency. A rattan lounge chair with a rounded back, a thick cream seat cushion, and slim black metal legs, three-quarter front view, the whole chair inside the frame with a wide empty margin on every side, soft even studio lighting, no floor and no shadow. The image has alpha channel and the background is transparent.",
  "width": 1536,
  "height": 1536,
  "outputFormat": "PNG",
  "settings": {
    "promptExtend": false
  }
}
Response
[
  {
    "taskType": "imageInference",
    "taskUUID": "11f1a427-3be0-4d81-919b-a4d15b7c6fbd",
    "imageUUID": "85243459-e1d6-4eef-b05c-9fa5feffc7fc",
    "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/85243459-e1d6-4eef-b05c-9fa5feffc7fc.png"
  }
]

Put your description between two fixed sentences and leave them exactly as they are:

This is an RGBA image with transparency. <your description>. The image has alpha channel and the background is transparent.

outputFormat has to be PNG or WEBP. The default is JPG, which has no alpha channel, so the same request comes back with a solid fill where the transparency should be:

What the wording changes

The format alone does nothing. Without the two sentences, a PNG request returns an ordinary opaque image:

Both requests share a description, a seed, and a format, so the two sentences are the only difference. Every example here also sets promptExtend to false, so the prompt rewrite cannot reword them on the way to the model.

Inside the description, say what is absent. "No floor and no shadow" stops the model from standing the subject on a surface that would then be part of the cut-out. Ask for an empty margin as well, because the model fills the frame and a subject that touches the edge of the file is a cropped asset.

Graphics with lettering

Print-on-demand and merch tools need exactly this file: a graphic with its lettering, on nothing. Quote the copy the way you would in any other prompt:

Check artwork on the color it will print on. The cream lettering nearly vanishes on a white page and reads at full strength on navy, while the dark red date does the opposite. A white preview says little about a graphic meant for dark garments.

Cutting a subject out of a photo

The same wording works on an edit. Attach the photo as a reference and ask for the subject:

The instruction lists what goes as well as what stays. Name the shadow among the things to remove, because a shadow left on the bench counts as subject as far as the alpha channel is concerned. width and height match the source, so the cut-out keeps the framing of the original.

Checking the edge

A cut-out is only as good as its edge, and a white page hides a bad one. The kettle from earlier, on two tiles:

The dark tile is the test that matters. A pale fringe around a subject disappears on white and shows on black, so check every asset against the darkest background it might meet before it ships into a themeable interface.

Where the alpha stops

The alpha channel answers one question per pixel: subject or nothing. A glass bottle is cut along its outline, and the glass itself stays opaque:

On the dark tile the glass stays pale, because the background does not show through it. Inside its outline the bottle averages 99% opacity. For see-through products, plan on a clean outline and nothing more.

Tips

  1. Wrap the description in the two fixed sentences. They are what turns transparency on, and a PNG request without them comes back opaque.

  2. Ask for a format with an alpha channel. Set outputFormat to PNG or WEBP, because the default JPG fills the transparent area with a solid color.

  3. Say what is absent. "No floor and no shadow" keeps a surface from being cut out along with the subject, and a requested margin keeps the subject off the edges of the file.

  4. Check every asset on a dark tile. A fringe that is invisible on white is obvious on black.

  5. Treat glass as opaque. The alpha channel follows the outline of a see-through object and does not look through it.