Generate images in 8 steps with Qwen-Image-2.1-Turbo on weightroom
October 10, 2026
Describe a coffee shop menu, including the heading, drinks, and prices, and turn it into an image. With Jupyter + PyTorch on weightroom, you can run Qwen-Image-2.1-Turbo from a notebook with the Python libraries already installed.

Qwen-Image-2.1-Turbo is an open-weight, accelerated checkpoint of Qwen-Image-2.1. It uses the same 7B visual generation architecture to generate 2K images from text and edit existing images, both in 8 denoising steps.
In this walkthrough, you'll generate an image with lettering, turn a sketch into a photograph, and combine two reference images. weightroom's workspace includes Diffusers 0.41.0 and Transformers 5.19.0, so you can start with the model code.
Turbo is released under the Qwen Research License for non-commercial research and evaluation. Commercial use requires a separate license from Qwen.
Pick a GPU
The checkpoint holds about 32 GB of bf16 weights: a 17.5 GB Qwen3-VL text encoder, a 14.2 GB image transformer, and a 0.7 GB VAE. Leave room beyond the weights for the memory used during generation.
| GPU | VRAM | How to load |
|---|---|---|
| RTX A6000 | 48 GB | Start here for the full pipeline on the GPU |
| A100 80GB or H100 | 80 GB | Full pipeline on the GPU, with more headroom at 2K |
| RTX 4090 | 24 GB | CPU offload, shown below |
The model downloads into the Hugging Face cache on your /workspace volume. A 50 GB volume has room for this checkpoint and your first outputs. Choose a larger volume if you also want the base Qwen-Image-2.1 model or plan to keep many outputs.
Launch a Jupyter workspace
Launch Jupyter + PyTorch on weightroom, choose a GPU, and set your workspace volume size. The launch page lists available GPUs and current prices. When the workspace is ready, open JupyterLab from its access links and create a Python notebook in /workspace.
Run the cells below in order. Use one of the two loading options, depending on your GPU's memory.
Load the pipeline
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1-Turbo",
dtype=torch.bfloat16,
).to("cuda")
The first load downloads about 32 GB; download time depends on the connection. Later loads use the cache on /workspace.
On a 24 GB RTX 4090, use this cell instead to load with CPU offload:
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1-Turbo",
dtype=torch.bfloat16,
)
pipe.enable_model_cpu_offload()
Offload moves the text encoder, transformer, and VAE onto the GPU as each component runs, keeping the others in system RAM. It trades speed for lower GPU memory use. If you run out of memory at 2K, try width=1024 and height=1024, or choose a GPU with more VRAM.
Generate an image
Start with a prompt that specifies the exact lettering as well as the scene. Here, the model needs to draw the chalkboard, arrange the menu, and render the names and prices:
prompt = (
"A coffee shop chalkboard menu photographed straight on. "
'Hand-lettered white chalk heading reads "Today\'s Brews". '
'Below it, three items with prices: "Oat Latte $5", "Cold Brew $4", "Banana Bread $3". '
"Small chalk doodles of coffee cups and steam in the corners, warm morning light."
)
image = pipe(
prompt=prompt,
width=2048,
height=2048,
generator=torch.Generator("cpu").manual_seed(42),
).images[0]
image.save("/workspace/menu.png")
image
The image appears below the cell and is saved as /workspace/menu.png. Change the text, colors, or setting in the prompt to try another design. The seed gives you a consistent starting point when comparing prompts.
The pipeline uses the 8-step schedule saved with the checkpoint. You don't need to pass num_inference_steps, and setting it alone won't change that schedule. The pipeline also caches the prompt context after the first step by default (use_kv_cache=True), so later steps don't recompute it.
For other shapes, use Qwen's resolution presets:
| Aspect ratio | Width x height |
|---|---|
| 1:1 | 2048 x 2048 |
| 4:3 | 2400 x 1792 |
| 3:4 | 1792 x 2400 |
| 3:2 | 2528 x 1696 |
| 2:3 | 1696 x 2528 |
| 16:9 | 2752 x 1536 |
| 9:16 | 1536 x 2752 |
Turn a sketch into a photograph
The same pipeline can edit an existing image. Pass it an image and describe the result you want. This example uses the boat sketch from Qwen's model card:
from diffusers.utils import load_image
sketch = load_image(
"https://huggingface.co/Qwen/Qwen-Image-2.1-Turbo/resolve/main/assets/turbo-boat-input.png"
).convert("RGBA")
edited = pipe(
prompt=(
"Create a photorealistic photograph of the motor yacht from the input sketch, "
"sailing on a calm deep-blue sea in full side profile. Black hull, white "
"superstructure and mast, yellow funnel, clear sky with soft clouds."
),
image=sketch,
width=2048,
height=2048,
generator=torch.Generator("cpu").manual_seed(7),
).images[0]
edited.save("/workspace/yacht.png")
edited
The edited image is saved as /workspace/yacht.png. To edit your own image, upload it to /workspace in JupyterLab and load it with load_image("/workspace/your-image.png").convert("RGBA"). Replace the yacht prompt with instructions for your image.
Combine reference images
Qwen-Image-2.1-Turbo also accepts several reference images as a list. Upload two images named flowers.png and scene.png to /workspace before running this cell. The model reads them in the order you pass them, so the prompt can refer to the first and second image:
flowers = load_image("/workspace/flowers.png").convert("RGBA")
scene = load_image("/workspace/scene.png").convert("RGBA")
edited = pipe(
prompt="Put the flowers from the first image into the second scene",
image=[flowers, scene],
width=2048,
height=2048,
generator=torch.Generator("cpu").manual_seed(21),
).images[0]
edited.save("/workspace/flowers-in-scene.png")
edited
Use the prompt to say what should come from each reference: the subject from one image, the setting from another, or a color palette you'd like to carry over.
When you're done
Download your images from JupyterLab and stop the workspace when you finish using the GPU. Keep the workspace volume to retain your notebook, outputs, and model cache. When you resume with that volume, rerun the notebook to load the pipeline from the cache instead of downloading the checkpoint again.
Launch Jupyter + PyTorch on weightroom to try your first prompt.
Explore GPU Workspaces.
Choose a pre-configured environment for development, training, or inference.