BasicSR
BasicSR copied to clipboard
when using grey img with human'face,it doesn't work
the wrong information:File "/home/ubuntu/anaconda3/envs/env1/lib/python3.12/site-packages/facexlib/utils/face_restoration_helper.py", line 354, in paste_faces_to_input_image upsample_img = inv_soft_mask * pasted_face + (1 - inv_soft_mask) * upsample_img ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ ValueError: operands could not be broadcast together with shapes (1404,2000,1) (1404,2000)
Because when using grey img with human's face, it run the coding block of if and that block can't change the grey img to three dimension.
the solution is move the line 346 and line 347 out of the coding block of else.