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
707 stars 92 forks source link

Error during Face-Checkpoint creation #126

Open threeforces opened 9 months ago

threeforces commented 9 months ago

Can't Build a Checkpoint....

C++ and Python Libraries are installed...

Any Idea??

2023-09-27 03:25:06,454 - FaceSwapLab - INFO - Choosen gender : Gender.AUTO 2023-09-27 03:25:06,461 - FaceSwapLab - INFO - Build jessans with 16 images 2023-09-27 03:25:11,664 - FaceSwapLab - INFO - Int Gender : 0 2023-09-27 03:25:12,013 - FaceSwapLab - INFO - Source Gender 0 Loading swap model: 0%| | 0/1 [00:00<?, ?model/s] 2023-09-27 03:25:12,041 - FaceSwapLab - ERROR - Loading of swapping model failed, please check the requirements (On Windows, download and install Visual Studio. During the install, make sure to include the Python and C++ packages.) Traceback (most recent call last): File "L:\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 379, in getFaceSwapModel insightface.model_zoo.get_model(model_path, providers=providers) # type: ignore File "L:\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model model = router.get_model(providers=providers, provider_options=provider_options) File "L:\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model session = PickableInferenceSession(self.onnx_file, kwargs) File "L:\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init super().init(model_path, kwargs) File "L:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "L:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 460, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from L:\stable-diffusion-webui\models\faceswaplab\inswapper_128.onnx failed:Protobuf parsing failed. 2023-09-27 03:25:12,043 - FaceSwapLab - ERROR - Conversion failed Loading of swapping model failed 2023-09-27 03:25:12,043 - FaceSwapLab - ERROR - Failed to build checkpoint Loading of swapping model failed Traceback (most recent call last): File "L:\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 379, in getFaceSwapModel insightface.model_zoo.get_model(model_path, providers=providers) # type: ignore File "L:\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model model = router.get_model(providers=providers, provider_options=provider_options) File "L:\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model session = PickableInferenceSession(self.onnx_file, kwargs) File "L:\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init super().init(model_path, kwargs) File "L:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "L:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 460, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from L:\stable-diffusion-webui\models\faceswaplab\inswapper_128.onnx failed:Protobuf parsing failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "L:\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\face_checkpoints.py", line 95, in build_face_checkpoint_and_save result: swapper.ImageResult = swapper.swap_face( File "L:\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 658, in swap_face raise e File "L:\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 640, in swap_face face_swapper = getFaceSwapModel(model_path, use_gpu=not is_cpu_provider()) File "L:\stable-diffusion-webui\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 390, in getFaceSwapModel raise FaceModelException("Loading of swapping model failed") scripts.faceswaplab_swapping.swapper.FaceModelException: Loading of swapping model failed

glucauze commented 9 months ago

It seems that the model did not load properly. Is the extension working apart from the building part ?