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

Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat1 in method wrapper_CUDA_addmm) #48

Open
erjiaxiao opened this issue May 10, 2024 · 1 comment

Comments

@erjiaxiao
Copy link

Hello! I followed the instructions and ran the playground.py, and it showed That all tensors were on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat1 in method wrapper_CUDA_addmm)

@erjiaxiao
Copy link
Author

playground_copy.py 80
text_out, image_out = minigpt5.generate(utterance, input_images)

model.py 328 generate
predicted_images_ft = self.image_pipeline(prompt_embeds = mapping_feature, negative_prompt_embeds=empty_feature, guidance_scale=guidance_scale).images[0]

_contextlib.py 115 decorate_context
return func(*args, **kwargs)

pipeline_stable_diffusion.py 680 call
noise_pred = self.unet(

module.py 1501 _call_impl
return forward_call(*args, **kwargs)

unet_2d_condition.py 841 forward
emb = self.time_embedding(t_emb, timestep_cond)

module.py 1501 _call_impl
return forward_call(*args, **kwargs)

embeddings.py 192 forward
sample = self.linear_1(sample)

module.py 1501 _call_impl
return forward_call(*args, **kwargs)

linear.py 114 forward
return F.linear(input, self.weight, self.bias)

RuntimeError:
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat1 in method wrapper_CUDA_addmm)

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