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

Exporting Stable diffusion 's VAE model Failed #25

Open
TSCCompiler opened this issue May 5, 2023 · 2 comments
Open

Exporting Stable diffusion 's VAE model Failed #25

TSCCompiler opened this issue May 5, 2023 · 2 comments

Comments

@TSCCompiler
Copy link

I'm using torch 2.1.0.dev20230425+cpu and diffuser 0.16  to build stable diffusion v1_5, But I got the following error:
assert ( AssertionError: Unsupported function type scaled_dot_product_attention

I print symbolic traced graph , and I found vae module is using torch.c.scaled_dot_procuct_attention op

scaled_dot_product_attention = torch._C._nn.scaled_dot_product_attention(permute, permute_1, permute_2, dropout_p = 0.0, is_causal = False); permute_1 = permute_2 = None
I can attach the code which can make this happend
output.zip

@TSCCompiler
Copy link
Author

I have figure this out, I made diffusers use torch.baddbmm instead of scaled_dot_product_attention

@ford442
Copy link

ford442 commented May 14, 2023

would that work for the webgpu compile as well?
i have the same error on CPU or CUDA..

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

No branches or pull requests

2 participants