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

please help me #2

Open
xiaoxiaodadada opened this issue May 14, 2024 · 2 comments
Open

please help me #2

xiaoxiaodadada opened this issue May 14, 2024 · 2 comments

Comments

@xiaoxiaodadada
Copy link

clip_transformer.py 115 decode_to_img
quant_z = self.first_stage_model.quantize.get_codebook_entry(

quantize.py 325 get_codebook_entry
z_q = self.embedding(indices)

module.py 1130 _call_impl
return forward_call(*input, **kwargs)

sparse.py 158 forward
return F.embedding(

functional.py 2199 embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)

RuntimeError:
Expected tensor for argument #1 'indices' to have one of the following scalar types: Long, Int; but got torch.cuda.FloatTensor instead (while checking arguments for embedding)

@xiaoxiaodadada
Copy link
Author

应该是decode_to_img这出现了问题

@xiaoxiaodadada
Copy link
Author

new_x = decode_to_img(logits, x.shape)
这里的decode_to_img应该咋写,调用前面的肯定不对,如果能帮助我,我不胜感激

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

1 participant