Cannot load faceswap model in webui-forge #170
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Trying to use this extension in: https://github.com/lllyasviel/stable-diffusion-webui-forge
stable-diffusion-webui-forge is built on A1111 base, and almost all plugins work. I installed faceswaplab from "Available" extensions list and got the following errors. Please note that I'm successfully (and happily) using your extension on vanilla A1111, so VS, C++ and Python are all installed already. Do I need to set some environment path somewhere or something? (Please help, I love webui-forge, but your extension is the only one that allows building of face models which works GREAT)
2024-02-12 00:32:07,560 - FaceSwapLab - INFO - Try to use model : Y:\WebUI Forge\stable-diffusion-webui-forge\models\faceswaplab\inswapper_128.onnx
2024-02-12 00:32:08,279 - FaceSwapLab - INFO - loading face xxxyyyzzz.safetensors
2024-02-12 00:32:08,302 - FaceSwapLab - INFO - will generate 1 images
2024-02-12 00:32:08,302 - FaceSwapLab - INFO - Process face 0
2024-02-12 00:32:08,303 - FaceSwapLab - INFO - Source Gender 0
Loading swap model: 0%| | 0/1 [00:00<?, ?model/s]
2024-02-12 00:32:08,436 - 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 "Y:\WebUI Forge\stable-diffusion-webui-forge\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 "Y:\WebUI Forge\stable-diffusion-webui-forge\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 "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model
session = PickableInferenceSession(self.onnx_file, **kwargs)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init
super().init(model_path, **kwargs)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 472, 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 Y:\WebUI Forge\stable-diffusion-webui-forge\models\faceswaplab\inswapper_128.onnx failed:Protobuf parsing failed.
2024-02-12 00:32:08,438 - FaceSwapLab - ERROR - Conversion failed Loading of swapping model failed
2024-02-12 00:32:08,438 - FaceSwapLab - ERROR - Failed to swap face in postprocess method : Loading of swapping model failed
Traceback (most recent call last):
File "Y:\WebUI Forge\stable-diffusion-webui-forge\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 "Y:\WebUI Forge\stable-diffusion-webui-forge\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 "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model
session = PickableInferenceSession(self.onnx_file, **kwargs)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init
super().init(model_path, **kwargs)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 472, 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 Y:\WebUI Forge\stable-diffusion-webui-forge\models\faceswaplab\inswapper_128.onnx failed:Protobuf parsing failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Y:\WebUI Forge\stable-diffusion-webui-forge\extensions\sd-webui-faceswaplab\scripts\faceswaplab.py", line 187, in postprocess
swapped_images = swapper.process_images_units(
File "Y:\WebUI Forge\stable-diffusion-webui-forge\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 841, in process_images_units
swapped = process_image_unit(model, units[0], image, info, force_blend)
File "Y:\WebUI Forge\stable-diffusion-webui-forge\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 752, in process_image_unit
result: ImageResult = swap_face(
File "Y:\WebUI Forge\stable-diffusion-webui-forge\extensions\sd-webui-faceswaplab\scripts\faceswaplab_swapping\swapper.py", line 658, in swap_face
raise e
File "Y:\WebUI Forge\stable-diffusion-webui-forge\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 "Y:\WebUI Forge\stable-diffusion-webui-forge\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
yeah it aint working on my forge too,
its showing me this and i dunno what to do
Same issue here:
`*** Error loading script: configure.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui-forge\modules\scripts.py", line 544, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion-webui-forge\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\stable-diffusion-webui-forge\extensions\sd-webui-faceswaplab\scripts\configure.py", line 4, in
from scripts.faceswaplab_utils.faceswaplab_logging import logger
ModuleNotFoundError: No module named 'scripts.faceswaplab_utils'
*** Error loading script: faceswaplab.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui-forge\modules\scripts.py", line 544, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion-webui-forge\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\stable-diffusion-webui-forge\extensions\sd-webui-faceswaplab\scripts\faceswaplab.py", line 1, in
from scripts.configure import check_configuration
ModuleNotFoundError: No module named 'scripts.configure'
'`
any update?
Same here.... running latest everything....... anyone got any ideas?! I'm assuming there is some other dependency not working here. I have Visual Studio installed.