Skip to content

Commit b5b6342

Browse files
committed
Updates QwenImage performance documentation
Removes detailed attention backend benchmarks and simplifies torch.compile performance description Focuses on key performance improvement with torch.compile, highlighting the specific speedup from 4.70s to 1.93s on an A100 GPU Streamlines the documentation to provide more concise and actionable performance insights
1 parent 125a3a4 commit b5b6342

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

docs/source/en/api/pipelines/qwenimage.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -116,31 +116,9 @@ image = pipe(
116116

117117
## Performance
118118

119-
### Attention Backends
120-
121-
QwenImage supports multiple attention backends. Benchmarks on A100 80GB:
122-
123-
**Single Image (30 steps, 512x512):**
124-
125-
| Backend | Time (s) |
126-
|---------|----------|
127-
| flash_hub | 2.34 |
128-
| native | 2.38 |
129-
| xformers | 2.58 |
130-
| flash_varlen | 2.78 |
131-
132-
**Batch (2 images, 25 steps, 512x512):**
133-
134-
| Backend | Time (s) |
135-
|---------|----------|
136-
| flash_hub | 2.85 |
137-
| native | 3.16 |
138-
| flash_varlen | 3.29 |
139-
| xformers | 3.52 |
140-
141119
### torch.compile
142120

143-
Using `torch.compile` provides significant speedups with a one-time compilation overhead:
121+
Using `torch.compile` on the transformer provides ~2.4x speedup (A100 80GB: 4.70s → 1.93s):
144122

145123
```python
146124
import torch
@@ -149,8 +127,8 @@ from diffusers import QwenImagePipeline
149127
pipe = QwenImagePipeline.from_pretrained("Qwen/Qwen-Image", torch_dtype=torch.bfloat16).to("cuda")
150128
pipe.transformer = torch.compile(pipe.transformer)
151129

152-
# First call triggers compilation (~7s overhead on A100)
153-
# Subsequent calls see ~2.4x speedup
130+
# First call triggers compilation (~7s overhead)
131+
# Subsequent calls run at ~2.4x faster
154132
image = pipe("a cat", num_inference_steps=50).images[0]
155133
```
156134

0 commit comments

Comments
 (0)