fail to use blend function
Hi @matt-baugh ,
Thank you so much for your excellent work!
I encounter some problems when using the blend function, as shown below: ''' blended_image = blend(cur_masked_img[0].clone().detach().to("cpu"), cur_Up_img[0].clone().detach().to("cpu"), cur_mask[0].clone().detach().to("cpu") , torch.tensor([0, 0]).to("cpu"), True,channels_dim=0).unsqueeze(0) ''' It looks wired, because cur_masked_img [1,3,h,w ], cur_Up_img[1,3,h,w ], and cur_mask[1,1,h,w ] have the same spatial size. But it failed finally.
Could you give me some advice for solving this problem? thanks!
The warning is shown below:
blended_image = blend(cur_masked_img[0].clone().detach().to("cpu"), cur_Up_img[0].clone().detach().to("cpu"),
File "/home/xxx/xxx/envs/pt2.0/lib/python3.9/site-packages/pietorch/functional.py", line 114, in blend
result[res_indices] = torch.real(inner_blended - integration_constant)
RuntimeError: The expanded size of the tensor (2046) must match the existing size (2056) at non-singleton dimension 2. Target sizes: [3, 1534, 2046]. Tensor sizes: [0, 1534, 2056]
ERROR conda.cli.main_run:execute(49): conda run python /home/onelong/Longlongaaago/projects/DemoFusion/main_Anysize_editing.py failed. (See above for error)