RFdiffusion
RFdiffusion copied to clipboard
RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.
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.
Did you ever overcome this?
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.
I have the same issue on windows PC. It would be great to fix it, as WSL2 reduces CUDA perfomance.
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()
I've found a solution. Open
rfdiffusion/inference/model_runners.py
and find the line308
. Change this:seq_orig = self.target_feats['seq']
to this:
seq_orig = self.target_feats['seq'].long()
It works!