glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
748 stars 100 forks source link

FaceSwapLab - ERROR - Conversion failed max() arg is an empty sequence #177

Open zhangfanpc opened 7 months ago

zhangfanpc commented 7 months ago

2024-03-02 15:09:14,667 - FaceSwapLab - INFO - Try to use model : C:\sd\models\faceswaplab\inswapper_128.onnx 2024-03-02 15:09:16,265 - FaceSwapLab - INFO - loading face fan_Face.safetensors 2024-03-02 15:09:16,267 - FaceSwapLab - INFO - will generate 1 images 2024-03-02 15:09:16,267 - FaceSwapLab - INFO - Process face 0 2024-03-02 15:09:16,267 - FaceSwapLab - INFO - Source Gender 1 2024-03-02 15:09:16,267 - FaceSwapLab - INFO - Target faces count : 1 2024-03-02 15:09:16,267 - FaceSwapLab - INFO - swap face 0 2024-03-02 15:09:16,904 - FaceSwapLab - INFO - **** 2024-03-02 15:09:16,904 - FaceSwapLab - INFO - Inswapper 2024-03-02 15:09:16,904 - FaceSwapLab - INFO - Restore face with GFPGAN Traceback (most recent call last): File "C:\sd\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\upscaled_inswapper.py", line 215, in get bgr_fake = self.upscale_and_restore( File "C:\sd\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\upscaled_inswapper.py", line 155, in upscale_and_restore upscaled = upscaling.restore_face(upscaled, pp_options) File "C:\sd\extensions\sd-webui-faceswaplab\scripts\faceswaplab_postprocessing\upscaling.py", line 45, in restore_face numpy_image = pp_options.face_restorer.restore(numpy_image) File "C:\sd\modules\gfpgan_model.py", line 121, in restore return gfpgan_fix_faces(np_image) File "C:\sd\modules\gfpgan_model.py", line 60, in gfpgan_fix_faces model = gfpgann() File "C:\sd\modules\gfpgan_model.py", line 38, in gfpgann latest_file = max(gfp_models, key=os.path.getctime) ValueError: max() arg is an empty sequence 2024-03-02 15:09:16,905 - FaceSwapLab - ERROR - Conversion failed max() arg is an empty sequence 2024-03-02 15:09:16,905 - FaceSwapLab - ERROR - Failed to swap face in postprocess method : max() arg is an empty sequence

How can I fix it?