Skip to content

Commit 84e34a1

Browse files
authored
update perf (#313)
1 parent e2c10c0 commit 84e34a1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Updated on Nov 6, 2023.
1212
> | 3090 | 42.38it/s | 42.33it/s | 6.66it/s |
1313
> | 4090 | 74.71it/s | 73.57it/s | 13.57it/s |
1414
> | A100-PCIE-40GB | 54.4it/s | 54.06it/s | 10.22it/s |
15-
> | A100-SXM4-80GB | 58.68it/s | 58.02it/s | 11.80it/s |
15+
> | A100-SXM4-80GB | 59.68it/s | 61.91it/s | 11.80it/s |
1616
1717

1818
## Business inquiry

examples/text_to_image.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import argparse
22
from onediff.infer_compiler import oneflow_compile
3-
from onediff import EulerDiscreteScheduler
3+
from onediff import EulerDiscreteScheduler, rewrite_self_attention
44
from diffusers import StableDiffusionPipeline
55
import oneflow as flow
66
import torch
@@ -35,8 +35,9 @@ def parse_args():
3535
torch_dtype=torch.float16,
3636
safety_checker=None,
3737
)
38-
3938
pipe = pipe.to("cuda")
39+
40+
rewrite_self_attention(pipe.unet)
4041
pipe.unet = oneflow_compile(pipe.unet)
4142

4243
prompt = args.prompt

0 commit comments

Comments
 (0)