> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen-Image-2.1 ComfyUI Native Workflow Example

> Run Qwen-Image-2.1 in ComfyUI: one model for image generation and editing, native 2K output, professional typography, and alpha channel support.

**Qwen-Image-2.1** is the latest open-weight release in the Qwen-Image series from Alibaba's Qwen team. A single model covers both text-to-image generation and instruction-based image editing, with native 2K output, professional typography, and an alpha channel for transparent backgrounds.

**Key Features**:

* **Generation and editing in one model**: the same weights serve text-to-image prompts and editing instructions, so a workflow does not need to swap checkpoints
* **Native 2K output**: generate at up to 2048x2048 directly instead of upscaling a smaller result
* **Professional typography**: dense small text and complex layouts hold up, for infographics, slides, UI mockups, posters, and packaging designs
* **Alpha channel support**: the VAE carries four channels, so transparent-background images can be generated and edited directly instead of being cut out afterwards
* **Multi-image editing**: reference images are spliced into the text encoder in slot order. The node exposes `image_1` through `image_16` slots, and the prompt addresses them by index, for example `image_1` is written as `<image1>`
* **Localized edits**: describe the object or region to change and the rest of the image is preserved

**Related Links**:

* [GitHub Repository](https://github.com/QwenLM/Qwen-Image)
* [Hugging Face (Comfy-Org/Qwen-Image-2.1)](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)
* [Qwen Image 2.1 on Comfy](https://comfy.org/qwen-image-2.1/)

## Qwen-Image-2.1 workflow

<Tip>
  <Tabs>
    <Tab title="Local users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      If you can't find them in the template, your ComfyUI may be outdated.

      If nodes are missing when loading a workflow, possible reasons:

      1. You are not using the latest ComfyUI version (Nightly version)
      2. Some nodes failed to import at startup
    </Tab>

    <Tab title="Cloud users">
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

<h3 id="image_qwen_image_2_1_t2i">
  Qwen Image 2.1 Text to Image
</h3>

Generate an image from a text prompt at the aspect ratio and megapixel target you select.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/image_qwen_image_2_1_t2i-1.webp" alt="Qwen-Image-2.1 text to image workflow preview" />

<CardGroup cols={2}>
  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_qwen_image_2_1_t2i.json">
    Download JSON or search "Qwen-Image-2.1" in Template Library
  </Card>

  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=image_qwen_image_2_1_t2i&utm_source=docs&utm_medium=referral&utm_campaign=qwen-image-2-1">
    Run ComfyUI online with zero setup
  </Card>
</CardGroup>

**Example output**

![Qwen-Image-2.1 text to image example output](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Qwen_image_2.1.png)

<h3 id="image_qwen_image_2_1_image_edit">
  Qwen Image 2.1 Image Edit
</h3>

Edit an image with an instruction. Add reference images when the edit needs content that is not in the source image, such as putting a garment from a second photo onto the person in the first.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/image_qwen_image_2_1_image_edit-1.webp" alt="Qwen-Image-2.1 image edit workflow preview" />

<CardGroup cols={2}>
  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_qwen_image_2_1_image_edit.json">
    Download JSON or search "Qwen-Image-2.1" in Template Library
  </Card>

  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=image_qwen_image_2_1_image_edit&utm_source=docs&utm_medium=referral&utm_campaign=qwen-image-2-1">
    Run ComfyUI online with zero setup
  </Card>
</CardGroup>

**Input materials**

Upload these files to the matching `LoadImage` nodes:

<CardGroup cols={2}>
  <Card title="portrait_model_denim.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/portrait_model_denim.png">
    `LoadImage` node 470 · `portrait_model_denim.png`
  </Card>

  <Card title="clothing_light_blue_denim_shirt.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/clothing_light_blue_denim_shirt.png">
    `LoadImage` node 475 · `clothing_light_blue_denim_shirt.png`
  </Card>
</CardGroup>

**Example output**

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/portrait_model_denim.png" alt="Input image" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />

  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/image_qwen_image_2_1_image_edit.png" alt="Qwen-Image-2.1 image edit example output" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

## Model links

The two workflows load the same files. Both templates use the int8 version of the diffusion model by default.

**text\_encoders**

* [qwen3vl\_8b\_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/blob/main/text_encoders/qwen3vl_8b_bf16.safetensors)

**diffusion\_models**

* [qwen\_image\_2.1\_int8\_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/blob/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (loaded by the templates, lower memory)
* [qwen\_image\_2.1\_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/blob/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (full precision, needs more memory)

**vae**

* [qwen\_image\_2.1\_vae\_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/blob/main/vae/qwen_image_2.1_vae_bf16.safetensors)

**Model Storage Location**

```
📂 ComfyUI/
├── 📂 models/
│   ├── 📂 text_encoders/
│   │      └── qwen3vl_8b_bf16.safetensors
│   ├── 📂 diffusion_models/
│   │      ├── qwen_image_2.1_int8_convrot.safetensors
│   │      └── qwen_image_2.1_bf16.safetensors
│   └── 📂 vae/
│          └── qwen_image_2.1_vae_bf16.safetensors
```

## Workflow settings

### Sampler settings

Both templates sample with `steps` 25, `cfg` 1, the `euler` sampler, and the `simple` scheduler. The text to image workflow keeps the seed fixed, and the image edit workflow randomizes it.

### Resolution

**Text to image**: the **Resolution Selector** node sets the aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 21:9) and a megapixel target, where 1.0 MP is about 1024x1024. The template defaults to 1:1 at 1 MP. Qwen-Image-2.1 generates natively at 2K, so set the target to about 4.0 MP for a 2048x2048 square output.

**Image edit**: with `custom_size` off, which is the template default, the output follows `image_1`'s aspect ratio, scaled to about `resolution` x `resolution` pixels (default 1024, rounded to multiples of 32). That is not the original pixel size of `image_1`. Set `resolution` to 0 to keep each reference image at its own size, rounded to a multiple of 32. Turn `custom_size` on to use the **Resolution Selector** canvas instead, and keep it close to the resized `image_1` size, otherwise the edit can shift.

### Prompting for image edit

Reference images are spliced into the text encoder in slot order, and the prompt addresses each one by index. The template prompt is a good example of the pattern:

```
Keep the character and pose in <image1> unchanged, put this light blue denim shirt from <image2> on the character, preserve the original facial features, hair, body shape and pose
```

### KV cache

The image edit workflow includes the **Qwen Image 2.1 Cache** node, which sets where the cached text and reference prefix lives:

| Setting  | Values                                | Effect                                                                                                                                                                                      |
| -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `device` | `auto` (default), `gpu`, `cpu`, `off` | `auto` uses spare VRAM, then RAM. `cpu` is prefetched behind compute and costs little speed. `off` recomputes the prefix every step, which is slower but rules the cache out when debugging |
| `dtype`  | `default` (default), `int8`, `int4`   | Storage precision. `default` is lossless, `int8` halves the cache at about bf16 accuracy, `int4` quarters it but roughly doubles the per-step error                                         |
