Image and video generation

Qwen-Image 2.1: local image generation and editing

Create an image with Qwen-Image 2.1, then edit what you need

Qwen-Image 2.1 generates images from written scene descriptions and edits existing images using references and edit instructions. Run the generator together with the Qwen3-VL-8B encoder and its dedicated VAE1.

Suppose you want a green ceramic teapot on a wooden shelf with room for a title on the right. Generate one image from text first; if the product shape and composition work, use reference editing to change only a detail such as the background color. Changing one condition at a time makes it easier to see whether the handle, shadow, or product position shifted.

Requirements and key details
  • The model card describes text-to-image, editing, transparent backgrounds, and up to 10 reference images.
  • On September 20, 2026, LightX2V published day-0 support and an RTX 5090-specific path.
  • The official 1K/2K table reports a three-run median after initial loading, using PyTorch 2.11/cu130 and 40 steps.

Create one image from text and edit only what needs changing

The official model card describes text-to-image, image editing, transparent-background output, and up to 10 reference images. Apps and nodes do not necessarily expose the same features, so verify that your installed version supports 2.1 editing and alpha output. If you plan to composite a PNG, check that its alpha channel remains and that edges look clean against both light and dark backgrounds.

Version 2.1 consists of a 7B image-generation model, a Qwen3-VL-8B text encoder, and a dedicated VAE. Do not relabel the earlier 2512 checkpoint2 and VAE; use the app's 2.1 workflow and model configuration. A GGUF3 distribution may contain only the generation model, so check whether the runtime4 requires separate encoder and VAE paths.

A creative desk with a monitor and a printed still-life image
Create a usable first image, then check its text and layout.

On an RTX 5090, start with the dedicated LightX2V container

LightX2V announced day-0 support on September 20, 2026. Pull the CUDA5 13.0 container tag for RTX 5090, download the model, then align repository and script paths inside the container. Update the repository/model paths and the quantized-checkpoint paths in the JSON first.

The official single-5090 example uses FP166 accumulation for FP87 DiT8, FP8 QwenVL weights, text-encoder offload9, and VAE compilation. This is not a generic recipe for FP8 files from another framework or the 2511 Lightning LoRA10. Conversion expects the qwen_image_21_dit format and an SM120 FP16-accumulation kernel, so container, kernel, and conversion settings must match.

Prepare Git, Docker, the Hugging Face CLI11 and NVIDIA Container Toolkit on the host PC first. The first block downloads the repository and model into a workspace and mounts that folder at /workspace in the container. Run the second block inside the container. Set the script's lightx2v_path to /workspace/LightX2V and model_path to /workspace/Qwen-Image-2.1, and save the JSON's quantized checkpoint paths to match the actual files. Results are in LightX2V/save_results.

Prepare on the host PC and open the container
mkdir -p qwen-image21-workspace
cd qwen-image21-workspace
git clone https://github.com/ModelTC/LightX2V.git
hf download Qwen/Qwen-Image-2.1 --local-dir ./Qwen-Image-2.1
docker pull lightx2v/lightx2v:26062001-cu130-5090-fix-260921
docker run --rm --gpus all --ipc=host -it -v "$PWD:/workspace" -w /workspace/LightX2V --entrypoint /bin/bash lightx2v/lightx2v:26062001-cu130-5090-fix-260921
When this opens a container shell, continue the next block in that shell.
Generate inside the container after saving paths
cd /workspace/LightX2V
# Save lightx2v_path, model_path and quantized checkpoint paths in the script/config first.
bash scripts/qwen_image_21/qwen_image_21_t2i_5090_1k.sh
# For reference-image editing, use qwen_image_21_i2i_5090_1k.sh
Follow the linked LightX2V guide for FP8 converted files and SM120 kernels. Generated files also remain in the host workspace.

Inspect the workflow alongside its output

These are Qwen-Image 2.1 examples published by Comfy Org, not outputs or timing measurements produced by this site.

Node map from the official Qwen-Image 2.1 JSON linking resolution selection to the generation subgraph and PNG saving
Connections and defaults from the official JSON, not a UI screenshot. Load the workflow, then select the model files.
Official Qwen-Image 2.1 output of a person with sunglasses and a handbag against lime-green and black-and-white patterns
An official example output. An image alone does not establish generation time or Korean text accuracy.
Input portrait for the official Qwen-Image 2.1 clothing-edit example

Before

Output portrait from the official Qwen-Image 2.1 clothing-edit example

After

Input and output of the official clothing-edit example. Check whether the face and pose are preserved as well as the clothing change.

Source: Comfy Org · MIT license

Check the scope behind the published RTX 5090 timings

LightX2V reports 5.586 seconds for 1024×1024 T2I and 6.804 seconds for I2I on one RTX 5090. At 2048×2048 the figures are 30.333 and 42.787 seconds. Conditions are PyTorch12 2.11.0+cu130, 40 steps, seed 42, and CFG13 disabled; the figures are medians of three runs after the initial request. Image saving is included, while model loading and first initialization are excluded. Your reference image or CFG settings may differ.

Scroll sideways to compare all columns.

Figures from LightX2V's official RTX 5090 documentation, not measurements by this site.
GPUWorkloadOutput sizeMedian after initialization
RTX 5090 ×1T2I1024×10245.586 s
RTX 5090 ×1I2I1024×10246.804 s
RTX 5090 ×1T2I2048×204830.333 s
RTX 5090 ×1I2I2048×204842.787 s
Larger images take longer to generate — Qwen-Image 2.1 · 40 steps · published runs by runtime
Left: Diffusers NF4. Right: ComfyUI MPS with GGUF Q8. Compare resolution changes within each runtime.
A transparent plant illustration composited over different backgrounds
Check the alpha channel so a white box does not remain when changing backgrounds.

Verify saving and editing with a single 1K image

In the T2I script, set the prompt14, seed, and output path, then generate one image. For I2I, set image_path and the prompt. To size output automatically to the input aspect ratio, the documentation says to remove --size. When specifying it manually, use --size HEIGHT WIDTH; each dimension is rounded down to a multiple of 32. After the file saves, run an edit that changes only the background and compare product shape and edges.

If an error occurs, check that the container can access the GPU15 and that the model root and JSON paths for dit_quantized_ckpt and text_encoder_quantized_ckpt exist. Initialization can fail if the SM120-specific FP16-accumulation kernel or converted text encoder is missing. RUN pipeline16 cost in the logs marks elapsed runtime after execution begins. Errors before that point call for checking kernels, checkpoints, and paths first.

Two images showing the same vase against different backgrounds
Changing one instruction at a time makes it easier to check whether the product shape is preserved.

Check Mac support and usage rights separately

LightX2V timings use the RTX 5090 CUDA path. On a Mac, check a separate route such as ComfyUI GGUF or stable-diffusion.cpp, and verify that the installed version supports 2.1, its encoder, and dedicated VAE. Do not apply CUDA-container or RTX 5090 timings to Apple Silicon. Earlier 2512 guidance and LightX2V acceleration claims for Qwen-Image-Edit-2511 are not 2.1 measurements.

Qwen-Image 2.1 was released on September 20, 2026, under the Qwen Research License. Unlike the earlier Qwen-Image Apache-2.0 terms, it is limited to non-commercial research and evaluation. Commercial projects require a separate license; check the weights and tools independently. Identify whether your use needs background replacement, transparent PNGs, or text rendering, and review that output quality directly.

Terminology notes

  1. VAE — Short for Variational Autoencoder. It can encode input into a compact latent representation or decode that representation into an output.

    Back to the text
  2. Checkpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.

    Back to the text
  3. GGUF — A file format for model data, widely used by llama.cpp-based tools.

    Back to the text
  4. Runtime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.

    Back to the text
  5. CUDA — A software platform for general-purpose computing on NVIDIA GPUs.

    Back to the text
  6. FP16 — A 16-bit floating-point format. It uses the same bit width as BF16 but allocates bits differently between exponent and significand.

    Back to the text
  7. FP8 — A floating-point format that represents each value with 8 bits.

    Back to the text
  8. DiT — Short for Diffusion Transformer: a model architecture that uses a transformer to refine noisy representations across diffusion steps.

    Back to the text
  9. Offloading — Moving some model data from GPU memory to system RAM or storage when capacity is limited. This adds data transfer.

    Back to the text
  10. LoRA — A method that learns and applies small additional weights to adapt a base model. The adapter is used with the base model for purposes such as style adaptation or few-step generation.

    Back to the text
  11. CLI — Short for Command-Line Interface: operating a program by entering commands in a terminal.

    Back to the text
  12. PyTorch — A software framework for building and running AI models. Check the compatible PyTorch version and hardware support along with the model.

    Back to the text
  13. CFG — A technique that combines conditioned and unconditioned predictions to adjust how generation follows its input. Distilled models may require it to be disabled; recommended values vary by model.

    Back to the text
  14. Prompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.

    Back to the text
  15. GPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.

    Back to the text
  16. Pipeline — A sequence of processing stages from input to output. Different models or tools may be used at each stage.

    Back to the text

Frequently asked questions

What should you check first in this article?
Qwen-Image 2.1 generates images from written scene descriptions and edits existing images using references and edit instructions. Run the generator together with the Qwen3-VL-8B encoder and its dedicated VAE.
Where can you check the conditions and sources?
The official model card describes text-to-image, image editing, transparent-background output, and up to 10 reference images. Apps and nodes do not necessarily expose the same features, so verify that your installed version supports 2.1 editing and alpha output. If you plan to composite a PNG, check that its alpha channel remains and that edges look clean against both light and dark backgrounds.