Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, etc. Also support StyleGAN2, DFDNet.
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.
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