-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Stable Diffusion 3.x and Flux Optimization #22986
base: main
Are you sure you want to change the base?
Conversation
@@ -358,3 +361,122 @@ | |||
self.nodes_to_add.append(fused_node) | |||
self.node_name_to_graph_name[fused_node.name] = self.this_graph_name | |||
return True | |||
|
|||
def fuse_4(self, tanh_node, input_name_to_nodes: Dict, output_name_to_node: Dict) -> Optional[bool]: |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note
onnxruntime/python/tools/transformers/models/stable_diffusion/optimize_pipeline.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can commit the suggested changes from lintrunner.
onnxruntime/python/tools/transformers/models/stable_diffusion/benchmark.py
Outdated
Show resolved
Hide resolved
onnxruntime/python/tools/transformers/models/stable_diffusion/benchmark.py
Outdated
Show resolved
Hide resolved
onnxruntime/python/tools/transformers/models/stable_diffusion/benchmark.py
Outdated
Show resolved
Hide resolved
onnxruntime/python/tools/transformers/models/stable_diffusion/benchmark.py
Outdated
Show resolved
Hide resolved
onnxruntime/python/tools/transformers/models/stable_diffusion/benchmark.py
Outdated
Show resolved
Hide resolved
# if (options is None) or options.enable_skip_layer_norm: | ||
# self.fuse_skip_simplified_layer_norm() | ||
# self.fuse_skip_layer_norm() | ||
# if (options is None) or options.enable_bias_skip_layer_norm: | ||
# # Fuse SkipLayerNormalization and Add Bias before it. | ||
# self.fuse_add_bias_skip_layer_norm() |
Check notice
Code scanning / CodeQL
Commented-out code Note
Description
This work is in progress.
Optimize the ONNX pipeline for Stable Diffusion 3.x and Flux 1.0 models (fp32 or fp16).
Optimize the ONNX pipeline for Stable Diffusion 3.x and Flux 1.0 models
Motivation and Context