RFdiffusion icon indicating copy to clipboard operation
RFdiffusion copied to clipboard

RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.

Open N0obert opened this issue 1 year ago • 5 comments

When I am trying to run inference to yield an unconditional monomer as described in the README, I get the following error:

_[2023-04-01 20:22:08,689][main][INFO] - Making design test_outputs/test_0 [2023-04-01 20:22:08,692][inference.model_runners][INFO] - Using contig: ['150-150'] Error executing job with overrides: ['contigmap.contigs=[150-150]', 'inference.output_prefix=test_outputs/test', 'inference.num_designs=10'] Traceback (most recent call last): File "C:\Users\Norb\RFdiffusion\run_inference.py", line 76, in main x_init, seq_init = sampler.sample_init() File "C:\Users\Norb\RFdiffusion\inference\model_runners.py", line 341, in sample_init seq_t[contig_map.hal_idx0] = seq_orig[contig_map.ref_idx0] RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace. (SE3nv)_

Sorry in case I am missing something basic, I am an absolute beginner. Thank you so much in advance.

N0obert avatar Apr 01 '23 18:04 N0obert

Did you ever overcome this?

GlycoMatt avatar Apr 02 '23 22:04 GlycoMatt

Hi Matt, yes - so initially I was trying to run the inference script from a conda env on Windows. Apparently, that was the problem. I then set up an env via WSL2 with Ubuntu and that works without any issues.

N0obert avatar Apr 03 '23 05:04 N0obert

I have the same issue on windows PC. It would be great to fix it, as WSL2 reduces CUDA perfomance.

zmactep avatar Apr 06 '23 09:04 zmactep

I've found a solution. Open rfdiffusion/inference/model_runners.py and find the line 308. Change this:

seq_orig = self.target_feats['seq']

to this:

seq_orig = self.target_feats['seq'].long()

zmactep avatar May 05 '23 09:05 zmactep

I've found a solution. Open rfdiffusion/inference/model_runners.py and find the line 308. Change this:

seq_orig = self.target_feats['seq']

to this:

seq_orig = self.target_feats['seq'].long()

It works!

ShawnGao911101 avatar Jul 13 '23 08:07 ShawnGao911101