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

TypeError: scaled_dot_product_attention(): argument 'is_causal' must be bool, not Tensor #1764

Closed
AzeeloveJiaq opened this issue Jan 24, 2025 · 4 comments

Comments

@AzeeloveJiaq
Copy link

No description provided.

@csukuangfj
Copy link
Collaborator

please describe your issue in detail.

@leoliu1221
Copy link

I guess your issue is when converting to onnx, it has that error.
I solved it by changing whisper/model.py qkv_attention to use n_ctx = int(n_ctx) cause sometimes n_ctx has the type <class 'torch.Tensor'>

@csukuangfj
Copy link
Collaborator

If he/she uses a recent version of pytorch, e.g., torch 2.6.0, it should also work.

But without any further information, we cannot say much.

@csukuangfj
Copy link
Collaborator

Closing since no reply is received.

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

3 participants