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 frankstanmonster opened this issue 2 years ago • 6 comments

[2023-09-20 18:29:17,264][rfdiffusion.inference.model_runners][INFO] - Using contig: ['A1-250/0 150-150'] Error executing job with overrides: ['inference.output_prefix=./', 'inference.input_pdb=C:\Users\adminisiterlator\Desktop\wanglesheishishei1.pdb', 'contigmap.contigs=[A1-250/0 150-150]', 'inference.output_prefix=testoutputs/binder_test', 'inference.num_designs=1'] Traceback (most recent call last): File "C:\Users\adminisiterlator\RFdiffusion\scripts\run_inference.py", line 84, in main x_init, seq_init = sampler.sample_init() ^^^^^^^^^^^^^^^^^^^^^ File "c:\users\adminisiterlator\rfdiffusion\rfdiffusion\inference\model_runners.py", line 354, 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.

I didn't understand why this happened

frankstanmonster avatar Sep 20 '23 10:09 frankstanmonster

I think this has been raised previously - I think it's a Windows problem. It looks like a datatype issue where seq_orig is int32 and seq_init is int64, which only manifests in Windows (rather than linux). I sadly don't have a Windows machine, but if it can be fixed (it should be reasonably simple) it would be good to merge it in

joewatchwell avatar Nov 03 '23 07:11 joewatchwell

Any updates on how to fix this on Windows? Getting the same problem!

KoussaiB avatar Nov 13 '23 12:11 KoussaiB

Any updates on how to fix this on Windows? Getting the same problem!

i forgot where i found this solution,it worked for me

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()

frankstanmonster avatar Nov 13 '23 13:11 frankstanmonster

Any updates on how to fix this on Windows? Getting the same problem!

i forgot where i found this solution,it worked for me

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()

This fixed it! Thank you :)

KoussaiB avatar Nov 13 '23 14:11 KoussaiB

Thank you! I ran into this issue also on windows!

tencerjo avatar Dec 02 '23 21:12 tencerjo

confirm it fixes it

nicolasboisseau avatar Aug 29 '24 16:08 nicolasboisseau