Text-to-Image
Pruna AI
English
qwen
qwen-image
image-generation
image-editing
decoder-free
vae-free
dwd
Instructions to use PrunaAI/P-Q-Image-2.1-DWD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pruna AI
How to use PrunaAI/P-Q-Image-2.1-DWD with Pruna AI:
from pruna import PrunaModel model = PrunaModel.from_pretrained("PrunaAI/P-Q-Image-2.1-DWD") - Notebooks
- Google Colab
- Kaggle
Download assets/benchmark.json from PrunaAI/P-Q-Image-2.1-DWD: direct link, hf CLI and curl.
- Browser
- Download file 3.37 kB
-
https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD/resolve/main/assets/benchmark.json
- Command line
-
hf download hf://PrunaAI/P-Q-Image-2.1-DWD/assets/benchmark.json
-
curl -L -o benchmark.json https://huggingface.co/PrunaAI/P-Q-Image-2.1-DWD/resolve/main/assets/benchmark.json
3.37 kB
| { | |
| "description": "Qwen-Image-2.1-Turbo text-to-image, batch 1, 8 steps, bf16, one GPU. 'vae': last step through the stock transformer + Euler update + VAE decode (the stock pipeline's computation); 'dwd': last step through the stock prefix + DWD tail + head. End-to-end = prompt encode to uint8 image on the host; median of interleaved runs. saved_ms: median of paired differences (bootstrap 95% CI). stock_pipeline: the diffusers QwenImage21Pipeline object (output_type pil). peak_activation_gb: peak allocated during one run minus resident weights. compile: torch.compile of every transformer block (stock and tail), VAE eager.", | |
| "script": "scripts/benchmark_latency.py --sizes 1024x1024,2048x2048 --modes eager,compile --reps 10 --stock-pipeline", | |
| "gpu": "NVIDIA B200", | |
| "torch": "2.12.1+cu130", | |
| "batch": 1, | |
| "steps": 8, | |
| "dtype": "bfloat16", | |
| "task": "text-to-image", | |
| "weights_gb": { | |
| "transformer": 14.23, | |
| "text_encoder": 16.29, | |
| "vae_decoder": 0.518, | |
| "vae_encoder": 0.157, | |
| "dwd_tail": 1.955 | |
| }, | |
| "diffusers": "0.41.0", | |
| "transformers": "5.23.0", | |
| "psnr_dwd_vs_vae": [ | |
| 35.26, | |
| 35.36 | |
| ], | |
| "modes": { | |
| "eager": { | |
| "1024x1024": { | |
| "width": 1024, | |
| "height": 1024, | |
| "reps": 10, | |
| "e2e_ms": { | |
| "vae": 767.35, | |
| "dwd": 696.07, | |
| "stock_pipeline": 796.02 | |
| }, | |
| "saved_ms": 66.67, | |
| "saved_ms_ci95": [ | |
| 58.0, | |
| 80.11 | |
| ], | |
| "speedup": 1.102, | |
| "components_ms": { | |
| "encode": 24.17, | |
| "steps_1_7": 580.63, | |
| "last_dwd": 87.38, | |
| "last_vae": 160.29, | |
| "vae_decode": 71.89 | |
| }, | |
| "peak_activation_gb": { | |
| "vae": 7.057, | |
| "dwd": 0.688 | |
| }, | |
| "last_step_saved_ms": 72.91, | |
| "peak_activation_saved_gb": 6.369 | |
| }, | |
| "2048x2048": { | |
| "width": 2048, | |
| "height": 2048, | |
| "reps": 10, | |
| "e2e_ms": { | |
| "vae": 3500.25, | |
| "dwd": 3213.3, | |
| "stock_pipeline": 3604.09 | |
| }, | |
| "saved_ms": 282.04, | |
| "saved_ms_ci95": [ | |
| 273.2, | |
| 297.66 | |
| ], | |
| "speedup": 1.089, | |
| "components_ms": { | |
| "encode": 25.07, | |
| "steps_1_7": 2787.13, | |
| "last_dwd": 406.66, | |
| "last_vae": 690.62, | |
| "vae_decode": 282.61 | |
| }, | |
| "peak_activation_gb": { | |
| "vae": 28.189, | |
| "dwd": 2.71 | |
| }, | |
| "last_step_saved_ms": 283.96, | |
| "peak_activation_saved_gb": 25.479 | |
| } | |
| }, | |
| "compile": { | |
| "1024x1024": { | |
| "width": 1024, | |
| "height": 1024, | |
| "reps": 10, | |
| "e2e_ms": { | |
| "vae": 596.98, | |
| "dwd": 512.85 | |
| }, | |
| "saved_ms": 81.89, | |
| "saved_ms_ci95": [ | |
| 77.97, | |
| 87.82 | |
| ], | |
| "speedup": 1.164, | |
| "components_ms": { | |
| "encode": 25.33, | |
| "steps_1_7": 421.72, | |
| "last_dwd": 64.97, | |
| "last_vae": 149.97, | |
| "vae_decode": 75.33 | |
| }, | |
| "peak_activation_gb": { | |
| "vae": 9.206, | |
| "dwd": 2.533 | |
| }, | |
| "last_step_saved_ms": 85.0, | |
| "peak_activation_saved_gb": 6.673 | |
| }, | |
| "2048x2048": { | |
| "width": 2048, | |
| "height": 2048, | |
| "reps": 10, | |
| "e2e_ms": { | |
| "vae": 2797.32, | |
| "dwd": 2499.54 | |
| }, | |
| "saved_ms": 292.61, | |
| "saved_ms_ci95": [ | |
| 289.5, | |
| 309.97 | |
| ], | |
| "speedup": 1.119, | |
| "components_ms": { | |
| "encode": 25.16, | |
| "steps_1_7": 2156.08, | |
| "last_dwd": 315.91, | |
| "last_vae": 610.96, | |
| "vae_decode": 282.65 | |
| }, | |
| "peak_activation_gb": { | |
| "vae": 36.779, | |
| "dwd": 10.09 | |
| }, | |
| "last_step_saved_ms": 295.05, | |
| "peak_activation_saved_gb": 26.689 | |
| } | |
| } | |
| } | |
| } |