When launching the reconstruction script, I received the following error message from the vd_pipe decoder regarding incorrect precision.
Traceback (most recent call last): File "/export/raid1/home/kneel027/fMRI-reconstruction-NSD/src/Reconstructions.py", line 370, in <module> blurry_recons = vd_pipe.vae.decode(ae_preds.to(device).half()/0.18215).sample / 2 + 0.5 File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/diffusers/utils/accelerate_utils.py", line 46, in wrapper return method(self, *args, **kwargs) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/diffusers/models/autoencoder_kl.py", line 154, in decode decoded = self._decode(z).sample File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/diffusers/models/autoencoder_kl.py", line 124, in _decode z = self.post_quant_conv(z) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 463, in forward return self._conv_forward(input, self.weight, self.bias) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (c10::Half) and bias type (float) should be the same
I fixed it in my local version by removing the .half() call on line 370, but a deeper look may be warranted if there was a reason for it's placement.
Hello,
When launching the reconstruction script, I received the following error message from the vd_pipe decoder regarding incorrect precision.
Traceback (most recent call last): File "/export/raid1/home/kneel027/fMRI-reconstruction-NSD/src/Reconstructions.py", line 370, in <module> blurry_recons = vd_pipe.vae.decode(ae_preds.to(device).half()/0.18215).sample / 2 + 0.5 File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/diffusers/utils/accelerate_utils.py", line 46, in wrapper return method(self, *args, **kwargs) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/diffusers/models/autoencoder_kl.py", line 154, in decode decoded = self._decode(z).sample File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/diffusers/models/autoencoder_kl.py", line 124, in _decode z = self.post_quant_conv(z) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 463, in forward return self._conv_forward(input, self.weight, self.bias) File "/export/raid1/home/kneel027/miniconda3/envs/mindeye/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (c10::Half) and bias type (float) should be the same
I fixed it in my local version by removing the .half() call on line 370, but a deeper look may be warranted if there was a reason for it's placement.