File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Updated on Nov 6, 2023.
12
12
> | 3090 | 42.38it/s | 42.33it/s | 6.66it/s |
13
13
> | 4090 | 74.71it/s | 73.57it/s | 13.57it/s |
14
14
> | 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 |
16
16
17
17
18
18
## Business inquiry
Original file line number Diff line number Diff line change 1
1
import argparse
2
2
from onediff .infer_compiler import oneflow_compile
3
- from onediff import EulerDiscreteScheduler
3
+ from onediff import EulerDiscreteScheduler , rewrite_self_attention
4
4
from diffusers import StableDiffusionPipeline
5
5
import oneflow as flow
6
6
import torch
@@ -35,8 +35,9 @@ def parse_args():
35
35
torch_dtype = torch .float16 ,
36
36
safety_checker = None ,
37
37
)
38
-
39
38
pipe = pipe .to ("cuda" )
39
+
40
+ rewrite_self_attention (pipe .unet )
40
41
pipe .unet = oneflow_compile (pipe .unet )
41
42
42
43
prompt = args .prompt
You can’t perform that action at this time.
0 commit comments