Skip to content
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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tianleiwu
Copy link
Contributor

@tianleiwu tianleiwu commented Dec 2, 2024

Description

This work is in progress.

Optimize the ONNX pipeline for Stable Diffusion 3.x and Flux 1.0 models (fp32 or fp16).

  • Update optimize_pipeline script
  • Update benchmkark script
  • Update document about Stable Diffusion 3.x and Flux 1.0 models
  • Add graph optimizations for MMDit model
    • FastGelu fusion
    • RMSNorm fusion
    • MultiHeadAttention fusion

Motivation and Context

@tianleiwu tianleiwu marked this pull request as draft December 3, 2024 19:19
@@ -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

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant