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

"baddbmm__mkl" not implemented for 'Half' #45

Open
AndresOM1102 opened this issue May 13, 2024 · 4 comments
Open

"baddbmm__mkl" not implemented for 'Half' #45

AndresOM1102 opened this issue May 13, 2024 · 4 comments

Comments

@AndresOM1102
Copy link

Hello!
I was trying to run the first line in the demo, but an error occured.
"python gen_t2m.py --gpu_id 1 --ext exp1 --text_prompt "A person is running on a treadmill.".
It is important to mention, that this is being executed without cuda or GPU, just the CPU. In the attempt of doing so, it loads CLIP correctly however in the step after it fails. The error is the following:

anaconda3/envs/momask/lib/python3.7/site-packages/torch/nn/functional.py", line 4294, in multi_head_attention_forward
attn_output_weights = torch.bmm(q, k.transpose(1, 2))
RuntimeError: "baddbmm__mkl" not implemented for 'Half'

Of what I have seen, it is an error that can't be solved unless I use cuda or I change some parameters, which I don't know where to change.

@Murrol
Copy link
Collaborator

Murrol commented May 14, 2024

Hi,

Pleased refer to this:

# Date 0707: It's necessary, only unecessary when load directly to gpu. Disable if need to run on cpu

@AndresOM1102
Copy link
Author

Hi,

I commented the line, however the same error appears. Do you know what else it might be?

@Murrol
Copy link
Collaborator

Murrol commented May 15, 2024

clip.model.convert_weights(

@AndresOM1102
Copy link
Author

Thanks, it worked!

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