generatebio/chroma

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

ppxwwtaking opened this issue · 4 comments

I run the following redesign code

Redesign a Protein

from chroma import Protein, Chroma
chroma = Chroma()
protein = Protein('1GFP')
protein = chroma.design(protein)
protein.to("1GFP-redesign.cif")

It comes with errors (attached).
errors.txt

I did not have any problems before today I run "apt --fix-broken install" to fix some inconsistency issue.

Here is the apt log file (attached).
history.log

The problem happens when chroma.design() is used. I found cuda was not available before the nvidia driver was updated, therefore all tensors used 'cpu'. Now cuda is available, the RuntimeError persists; there is no problem with other examples except for the redesign.

hey,

have you tried protein = Protein('1GFP', device='cuda') ?

hey,

have you tried protein = Protein('1GFP', device='cuda') ?

Thanks. It works now. I thought somewhere I should specify the device, but I could not find chroma.design.