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

Issue of too much recompilation after modification of cross attention processor #131

Open
xziayro opened this issue Mar 6, 2024 · 1 comment

Comments

@xziayro
Copy link

xziayro commented Mar 6, 2024

Hello,
i did bring some large change to the cross attention processor in order to support regional prompt. However after this change i do observe a lot of recompilation (1 over 10 renders). I investigated, this is link to a constant change of the number of inputs due to a change of the number of "regional prompt".

If i do not JIT compilation of the unet then i don't have this issue but i don't have good speed ups anymore.

This is very annoying. Do you have any idea on how to prevent this?

I was wondering if it is possible to do apply the lazy_trace only on the self attention layers and do not trace cross attention?

@chengzeyi
Copy link
Owner

@xziayro You can use a tensor to contain your regional prompt. That should not trigger recompilation.

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