How to run Qwen-Image on a cloud GPU
Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH, or open the ComfyUI template. Install from the Qwen-Image repository, let the diffusers snippet download the weights it names, or place the files the ComfyUI tutorial names, and run. Copy the images off the instance before you destroy it. Destroying the instance deletes its disk.
The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.
The repository’s quick start, read 2026-11-12, is text-to-image with Qwen/Qwen-Image-2512 and editing with Qwen/Qwen-Image-Edit-2511. A folded “Previous Version” section still documents Qwen/Qwen-Image and Qwen/Qwen-Image-Edit. The same README’s 2026-02-10 news announces Qwen-Image-2.0 as a different model. QwenLM/Qwen-Image-2.1 is a separate repository. This page follows QwenLM/Qwen-Image.
What the README and the model cards say about memory
The Qwen-Image README calls Qwen-Image a 20B MMDiT model. The README and the model cards for Qwen/Qwen-Image, Qwen/Qwen-Image-2512, Qwen/Qwen-Image-Edit and Qwen/Qwen-Image-Edit-2511 publish no GB figure for the diffusers quick start (read 2026-11-12). The Hugging Face model API on that day reported gated: false and license apache-2.0 for all four. The README states the Apache 2.0 license.
One GB sentence in that README is about a different project. The community section says DiffSynth-Studio provides “low-GPU-memory layer-by-layer offload (inference within 4GB VRAM)”. That sentence is about DiffSynth-Studio.
GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, read 2026-11-12. GET /v1/public/gpu-catalog on the same day listed the same names and the same vram_gb values. Which listing you can start is on Deploy. This page does not say which listings are available.
Every name in that file is above the 4GB DiffSynth sentence:
| Catalog name | vram_gb |
|---|---|
| RTX 2080 | 8 |
| RTX 3080 | 10 |
| RTX 2080 Ti | 11 |
| RTX 3080 Ti | 12 |
| V100 16G | 16 |
| A30 | 24 |
| RTX 3090 | 24 |
| RTX 4090 | 24 |
| RTX 4090D | 24 |
| RTX 4080 SUPER 32G | 32 |
| RTX 5090 | 32 |
| RTX 5090D | 32 |
| V100 32G | 32 |
| A100 40G | 40 |
| A800 40G | 40 |
| A40 | 48 |
| RTX 4090 48G | 48 |
| RTX 4090D 48G | 48 |
| RTX A6000 | 48 |
| NVIDIA RTX PRO 5000 72G | 72 |
| RTX PRO 5000 72G | 72 |
| A100 80G | 80 |
| A800 80G | 80 |
| H800 | 80 |
| RTX 6000D | 83 |
| H20 96G | 96 |
| RTX PRO 6000 96G | 96 |
| RTX PRO 6000 Max-Q | 96 |
A vram_gb above 4 meets that DiffSynth sentence. It is not a memory figure for the diffusers quick start or for the ComfyUI files below.
The ComfyUI Qwen-Image tutorial (read 2026-11-12) lists file sizes “Qwen-Image_bf16 (40.9 GB)” and “Qwen-Image_fp8 (20.4 GB)”. Those are file sizes. The same page has a VRAM usage table measured on an RTX 4090D 24GB, with percentages and generation times. This page leaves that table on the tutorial. Catalog RTX 4090D is 24 in gpu-prices.json.
Install the diffusers quick start
On Deploy, choose Raw GPU for the Python snippets, or the ComfyUI template for the ComfyUI files further down. How to choose a rental GPU for ComfyUI is the card page for that template. How to run FLUX.1-dev in ComfyUI is the same template with a different checkpoint.
The README’s quick start names transformers>=4.51.3 (it says this supports Qwen2.5-VL) and prints one install command, the diffusers line below. The examples import torch. Diffusers’ setup.py on main (read 2026-11-12) does not put torch or transformers in install_requires. That file’s base install is importlib_metadata, filelock, huggingface-hub, numpy, regex, requests, safetensors and Pillow. Its python_requires is >=3.11.0. The Qwen README does not state a Python version. Check python3 --version before the git install.
The first two commands below are not in the Qwen README. They were not run. The transformers floor is the README’s. The torch line is one CUDA wheel index, cu128. How to install a specific PyTorch CUDA version says to use an index that is not newer than the CUDA Version in the nvidia-smi header. If that header is older than 12.8, use the matching index from that guide instead of cu128. Install torch before transformers so the later pip does not replace the CUDA build.
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install "transformers>=4.51.3"
pip install git+https://github.com/huggingface/diffusers
python -c "import torch, transformers; print(torch.__version__, torch.version.cuda, torch.cuda.is_available()); print(transformers.__version__)"
The diffusers line is the README’s command. The check is not. Pillow comes in with that diffusers install, which covers from PIL import Image in the edit snippet.
model_index.json on Qwen/Qwen-Image-2512 (read 2026-11-12) sets _class_name to QwenImagePipeline and _diffusers_version to 0.36.0.dev0. The text encoder class in that file is Qwen2_5_VLForConditionalGeneration. The Edit-2511 index sets _class_name to QwenImageEditPlusPipeline.
The 2512 snippet below keeps the README’s model id, dtype branch, 16:9 size (1664, 928), num_inference_steps=50, true_cfg_scale=4.0 and seed 42. The README’s positive prompt is longer. The short prompt here is a substitute. The negative prompt is the README’s string.
from diffusers import QwenImagePipeline
import torch
if torch.cuda.is_available():
torch_dtype = torch.bfloat16
device = "cuda"
else:
torch_dtype = torch.float32
device = "cpu"
pipe = QwenImagePipeline.from_pretrained("Qwen/Qwen-Image-2512", torch_dtype=torch_dtype).to(device)
negative_prompt = "低分辨率,低画质,肢体畸形,手指畸形,画面过饱和,蜡像感,人脸无细节,过度光滑,画面具有AI感。构图混乱。文字模糊,扭曲。"
image = pipe(
prompt="A ceramic cup on a wooden table, soft window light.",
negative_prompt=negative_prompt,
width=1664,
height=928,
num_inference_steps=50,
true_cfg_scale=4.0,
generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
image.save("example.png")
from_pretrained is the README’s download. The first run pulls the repository it names. How to download a Hugging Face model is the manual hf download reference. cloudgpu-net is not in the Qwen-Image README. The download speed guide says to leave it off during pip, then turn it on for a weight download.
Qwen-Image-Edit
The current edit block in the README loads Qwen/Qwen-Image-Edit-2511 with QwenImageEditPlusPipeline, torch.bfloat16, true_cfg_scale=4.0, num_inference_steps=40 and guidance_scale=1.0. The README snippet downloads a sample image. The block below uses a local file instead. That path, and the short prompt, are substitutes. The load and the sampling arguments are the README’s.
import os
import torch
from PIL import Image
from diffusers import QwenImageEditPlusPipeline
pipeline = QwenImageEditPlusPipeline.from_pretrained(
"Qwen/Qwen-Image-Edit-2511", torch_dtype=torch.bfloat16
)
pipeline.to("cuda")
pipeline.set_progress_bar_config(disable=None)
image1 = Image.open("./input.png").convert("RGB")
inputs = {
"image": [image1],
"prompt": "Change the cup to a glass of water.",
"generator": torch.manual_seed(0),
"true_cfg_scale": 4.0,
"negative_prompt": " ",
"num_inference_steps": 40,
"guidance_scale": 1.0,
"num_images_per_prompt": 1,
}
with torch.inference_mode():
output_image = pipeline(**inputs).images[0]
output_image.save("output_image_edit_2511.png")
print("image saved at", os.path.abspath("output_image_edit_2511.png"))
The folded previous-version section still has Qwen/Qwen-Image through DiffusionPipeline and Qwen/Qwen-Image-Edit through QwenImageEditPipeline. Its note says Qwen-Image-Edit-2509 has better consistency than Qwen-Image-Edit and recommends Qwen/Qwen-Image-Edit-2509 for single-image and multi-image edits. The Edit-2509 snippet uses the same QwenImageEditPlusPipeline class as Edit-2511. The README also says editing can be unstable without prompt rewriting and points at src/examples/tools/prompt_utils.py. The advanced section on that page calls a hosted API. This page leaves that command in the README.
The previous-version text-to-image example prompt includes a price painted on a sign. This page leaves that prompt in the README.
ComfyUI, as the ComfyUI docs describe it
The Qwen-Image README says Qwen-Image is natively supported in ComfyUI and links a ComfyUI blog post (news dated 2025-08-05). The current ComfyUI tutorial, read 2026-11-12, is Qwen-Image. It says to update ComfyUI, then search “Qwen-Image” in the template library or use the workflow JSON it links. The diffusion file it names for the main workflow is qwen_image_fp8_e4m3fn.safetensors on Comfy-Org/Qwen-Image_ComfyUI. The folder tree on that page is:
ComfyUI/models/diffusion_models/qwen_image_fp8_e4m3fn.safetensors
ComfyUI/models/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors
ComfyUI/models/vae/qwen_image_vae.safetensors
It also lists a distilled file under non_official/ and a LoRA, Qwen-Image-Lightning-8steps-V1.0.safetensors. The tutorial’s own steps are: load those three files in the Load Diffusion Model, Load CLIP and Load VAE nodes, set the prompt, then queue the prompt. Whether the CloudGPU ComfyUI template already includes the template browser or these files was not checked.
That tutorial’s filenames are the Comfy-Org pack. They are not the Qwen/Qwen-Image-2512 id in the diffusers quick start.
Qwen-Image-Edit in ComfyUI, read the same day, names qwen_image_edit_fp8_e4m3fn.safetensors on Comfy-Org/Qwen-Image-Edit_ComfyUI, the same text encoder and VAE as above, and Qwen-Image-Lightning-4steps-V1.0.safetensors. A later section of that page names qwen_image_edit_2509_fp8_e4m3fn.safetensors for Qwen-Image-Edit-2509. The page does not name Qwen-Image-Edit-2511. Its steps load the diffusion, CLIP and VAE files, load the image to edit, set the prompt, and queue the prompt. It says the Scale Image to Total Pixels node scales the input to a total of one million pixels.
The tutorial pages do not print an hf download command. The files live under split_files/ on the Hub and the folder tree above does not. Copying the Hub layout into ComfyUI/models would miss the tree the tutorial shows. Place each file in the folder the tutorial prints. The Hugging Face download guide is the hf download reference.
Gradio, from the repository
The README’s “Deploy Qwen-Image” section says the multi-GPU API server starts a Gradio interface. The command it prints is cd src and python examples/demo.py, after an API-key assignment this page leaves in the README. The environment block it prints is:
export NUM_GPUS_TO_USE=4
export TASK_QUEUE_SIZE=100
export TASK_TIMEOUT=300
Those three values are the README’s example. src/examples/demo.py (read 2026-11-12) ends with demo.launch(server_name="0.0.0.0") and passes no port. How to use SSH port forwarding says Gradio’s default port is 7860. This page did not run demo.py, so it did not confirm the port the process prints.
The clone is not in the README. The cd src line assumes the repository:
git clone https://github.com/QwenLM/Qwen-Image.git
cd Qwen-Image/src
python examples/demo.py
demo.py imports rewrite from tools.prompt_utils. That helper is the README’s prompt-enhance path. This page did not run the demo.
When it fails
CUDA out of memory. The diffusers quick start and the four model cards publish no GB cutoff. The 4GB sentence is the DiffSynth-Studio line. Then use how to fix CUDA out of memory on a cloud GPU.
“CUDA error: no kernel image is available” on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32 GB, which is above the 4GB DiffSynth sentence and is not a diffusers requirement. The Qwen README does not pin a PyTorch wheel. The cu128 index in the install section is a CUDA 12.8 wheel, which is the floor in the RTX 5090 guide. If the check still has no sm_120 in torch.cuda.get_arch_list(), follow that guide. This page did not run the install on an RTX 5090.
Save the images, then destroy
The 2512 snippet writes example.png. The edit snippet above writes output_image_edit_2511.png. Copy those files, and whatever the ComfyUI run writes, before you destroy the instance. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed. The billing rule is on the pricing page. Prices are not copied here.
Frequently asked questions
How much VRAM does the Qwen-Image README publish for the diffusers quick start?
The Qwen-Image README and the model cards for Qwen/Qwen-Image, Qwen/Qwen-Image-2512, Qwen/Qwen-Image-Edit and Qwen/Qwen-Image-Edit-2511 publish no GB figure for the diffusers quick start (read 2026-11-12). The README calls the model a 20B MMDiT. Its community section says DiffSynth-Studio can run “inference within 4GB VRAM”. That sentence is about DiffSynth-Studio. The ComfyUI tutorial lists file sizes of 40.9 GB and 20.4 GB and a usage table measured on an RTX 4090D 24GB. Those file sizes are not a VRAM requirement, and this page leaves the timing table on the tutorial.
Which rented GPUs are above the 4GB DiffSynth sentence?
Every vram_gb in https://cloudgpu.app/gpu-prices.json, read 2026-11-12, is at least 8: RTX 2080 (8), RTX 3080 (10), RTX 2080 Ti (11), RTX 3080 Ti (12), V100 16G (16), A30 (24), RTX 3090 (24), RTX 4090 (24), RTX 4090D (24), RTX 4080 SUPER 32G (32), RTX 5090 (32), RTX 5090D (32), V100 32G (32), A100 40G (40), A800 40G (40), A40 (48), RTX 4090 48G (48), RTX 4090D 48G (48), RTX A6000 (48), NVIDIA RTX PRO 5000 72G (72), RTX PRO 5000 72G (72), A100 80G (80), A800 80G (80), H800 (80), RTX 6000D (83), H20 96G (96), RTX PRO 6000 96G (96) and RTX PRO 6000 Max-Q (96). GET /v1/public/compute-capabilities returned feature flags and no GPU list. GET /v1/public/gpu-catalog listed the same names and the same vram_gb values. Being above 4GB meets the DiffSynth sentence only. Which listing you can start is on https://cloudgpu.app/deploy. This page does not say which listings are available.
Does ComfyUI officially support Qwen-Image and Qwen-Image-Edit?
The Qwen-Image README says Qwen-Image is natively supported in ComfyUI. The ComfyUI tutorial at https://docs.comfy.org/tutorials/image/qwen/qwen-image names qwen_image_fp8_e4m3fn.safetensors, qwen_2.5_vl_7b_fp8_scaled.safetensors and qwen_image_vae.safetensors. https://docs.comfy.org/tutorials/image/qwen/qwen-image-edit names qwen_image_edit_fp8_e4m3fn.safetensors and, in a later section, qwen_image_edit_2509_fp8_e4m3fn.safetensors. That edit page does not name Qwen-Image-Edit-2511. The diffusers quick start’s current ids are Qwen/Qwen-Image-2512 and Qwen/Qwen-Image-Edit-2511. Those Hub ids are not the Comfy-Org filenames.
Where do the images go, and do they stay after the instance is destroyed?
The 2512 snippet writes example.png. The edit snippet on this page writes output_image_edit_2511.png. Copy the files the run writes before you destroy the instance. The terms say data on local instance storage is permanently deleted when the instance is destroyed. The billing rule is on https://cloudgpu.app/pricing.
Sources (read 2026-11-12, Asia/Shanghai)
- Qwen-Image README (20B MMDiT,
transformers>=4.51.3, diffusers install, Qwen/Qwen-Image-2512, Qwen/Qwen-Image-Edit-2511, previous-version ids, DiffSynth-Studio 4GB sentence, Gradio demo command, Apache 2.0): https://github.com/QwenLM/Qwen-Image - Diffusers
setup.pyon main (install_requireswithout torch or transformers,python_requires>=3.11.0, Pillow in the base install): https://github.com/huggingface/diffusers/blob/main/setup.py - src/examples/demo.py (
demo.launch(server_name="0.0.0.0"), no port argument): https://github.com/QwenLM/Qwen-Image/blob/main/src/examples/demo.py - Model cards and model API (
gated: false,apache-2.0, no GB figure in the card text): https://huggingface.co/Qwen/Qwen-Image , https://huggingface.co/Qwen/Qwen-Image-2512 , https://huggingface.co/Qwen/Qwen-Image-Edit , https://huggingface.co/Qwen/Qwen-Image-Edit-2511 - model_index.json (
QwenImagePipeline,QwenImageEditPlusPipeline, diffusers0.36.0.dev0): those Hub repositories - ComfyUI Qwen-Image tutorial (filenames, folders, 40.9 GB and 20.4 GB file sizes, usage table on RTX 4090D 24GB): https://docs.comfy.org/tutorials/image/qwen/qwen-image
- ComfyUI Qwen-Image-Edit tutorial (Edit and Edit-2509 filenames; Edit-2511 absent): https://docs.comfy.org/tutorials/image/qwen/qwen-image-edit
- Public GPU memory: https://cloudgpu.app/gpu-prices.json and https://cloudgpu.app/v1/public/gpu-catalog.
GET /v1/public/compute-capabilitiesreturned feature flags and no GPU list.
Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.
Last updated: 2026-11-12 (Asia/Shanghai).