sd-webui-roop icon indicating copy to clipboard operation
sd-webui-roop copied to clipboard

Error loading script: swapper.py. ModelProto does not have a graph.

Open SNCKPCK opened this issue 2 years ago • 20 comments

2023-06-18 22:28:36,560 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\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:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\extensions\sd-webui-roop\scripts\swapper.py", line 31, in ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\app\face_analysis.py", line 31, in init model = model_zoo.get_model(onnx_file, **kwargs) File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\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 "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model session = PickableInferenceSession(self.onnx_file, **kwargs) File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init super().init(model_path, **kwargs) File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 424, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from C:\Users\dani/.insightface\models\buffalo_l\genderage.onnx failed:C:\a_work\1\s\onnxruntime\core\graph\model.cc:134 onnxruntime::Model::Model ModelProto does not have a graph.

SNCKPCK avatar Jun 19 '23 03:06 SNCKPCK

There's nothing for me to fix here, the error occurred in one of the dependencies. I'll keep this issue for the sake of discussion.

s0md3v avatar Jun 19 '23 05:06 s0md3v

this is mine:

Error loading script: faceswap.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AI\sd-webui-aki-v4\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 "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in from scripts.swapper import UpscaleOptions, swap_face, ImageResult File "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface ModuleNotFoundError: No module named 'insightface' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

2023-06-19 21:37:21,021 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AI\sd-webui-aki-v4\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 "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface ModuleNotFoundError: No module named 'insightface' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

vikiiing avatar Jun 19 '23 13:06 vikiiing

2023-06-19 20:38:41,694 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "F:\Deepfake\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\Deepfake\stable-diffusion-webui\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 "F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 31, in ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError

Same error

ZeDoCode avatar Jun 19 '23 23:06 ZeDoCode

this is mine:

Error loading script: faceswap.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AI\sd-webui-aki-v4\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 "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in from scripts.swapper import UpscaleOptions, swap_face, ImageResult File "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface ModuleNotFoundError: No module named 'insightface' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

2023-06-19 21:37:21,021 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AI\sd-webui-aki-v4\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 "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface ModuleNotFoundError: No module named 'insightface' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

I got the same problem. Please help resolve this error. Thank you

pearlay68 avatar Jun 20 '23 03:06 pearlay68

Error loading script: swapper.py Traceback (most recent call last): File "D:\Git\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\Git\stable-diffusion-webui\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 "D:\Git\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\insightface_init.py", line 16, in from . import model_zoo File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo_init_.py", line 1, in from .model_zoo import get_model File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in from .arcface_onnx import * File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in import onnx File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\onnx_init_.py", line 13, in from onnx.external_data_helper import ( File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\onnx\external_data_helper.py", line 11, in from onnx.onnx_pb import AttributeProto, GraphProto, ModelProto, TensorProto File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\onnx\onnx_pb.py", line 4, in from .onnx_ml_pb2 import * # noqa File "D:\Git\stable-diffusion-webui\venv\lib\site-packages\onnx\onnx_ml_pb2.py", line 5, in from google.protobuf.internal import builder as builder ImportError: cannot import name 'builder' from 'google.protobuf.internal' (D:\Git\stable-diffusion-webui\venv\lib\site-packages\google\protobuf\internal_init.py)

Aitolda avatar Jun 21 '23 00:06 Aitolda

same here

DefNotYashar avatar Jun 21 '23 14:06 DefNotYashar

When using pip to install packages, you may often encounter an error message that reads "which is required to install pyproject.toml-based project". Trying to solve the issue by running "pip install pyproject.toml" may not work, and various online solutions such as installing python-dev may also prove ineffective.

xcode-select --install

However, once you have successfully installed the required dependencies, running "pip install" again should resolve the corresponding issue.

Zhouyongting avatar Jun 22 '23 13:06 Zhouyongting

When using pip to install packages, you may often encounter an error message that reads "which is required to install pyproject.toml-based project". Trying to solve the issue by running "pip install pyproject.toml" may not work, and various online solutions such as installing python-dev may also prove ineffective.

xcode-select --install

However, once you have successfully installed the required dependencies, running "pip install" again should resolve the corresponding issue.

xcode-select --install

Zhouyongting avatar Jun 22 '23 13:06 Zhouyongting

Error running postprocess_batch: I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "I:\AI\sd-webui-aki-v4.2\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, script_args) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image result: ImageResult = swap_face( File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 123, in swap_face source_face = get_face_single(source_img, face_index=0) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 76, in get_face_single face_analyser = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "I:\AI\sd-webui-aki-v4.2\python\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError ** This problem is really giving me a headache. I haven't been able to sleep for several days. I really want to solve this problem quickly.*

微信截图_20230624115535

1rentai avatar Jun 24 '23 03:06 1rentai

Error running postprocess_batch: I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "I:\AI\sd-webui-aki-v4.2\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, script_args) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image result: ImageResult = swap_face( File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 123, in swap_face source_face = get_face_single(source_img, face_index=0) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 76, in get_face_single face_analyser = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "I:\AI\sd-webui-aki-v4.2\python\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError ** This problem is really giving me a headache. I haven't been able to sleep for several days. I really want to solve this problem quickly.*

微信截图_20230624115535

same error

Forevercyj avatar Jun 24 '23 04:06 Forevercyj

2023-06-19 20:38:41,694 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "F:\Deepfake\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\Deepfake\stable-diffusion-webui\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 "F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 31, in ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError

Same error

This is an issue with insightface. To solve this problem, I changed the root of the face_analysis.py file, line 24, to the absolute address like:

'F:/YOURFOLDER/stable-diffusion-webui/venv/Lib/site-packages/insightface'

  • I downloaded the buffalo_l model from insightface's github
  • I created a folder called "models" and unzipped it inside. (F:\YOUTFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\models)

NOTE: The face_analysys.py file is located in the folder: F:\YOURFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\app

ZeDoCode avatar Jun 24 '23 04:06 ZeDoCode

2023-06-19 20:38:41,694 - roop - 信息 - roop v0.0.2 加载脚本时出错: swapper.py 回溯(最近一次调用): 文件 “F:\Deepfake\stable-diffusion-webui\modules\scripts.py”,第 263 行,在 load_scripts script_module = script_loading.load_module(scriptfile.path) 文件 “F:\Deepfake\stable-diffusion-webui\modules\script_loading.py”,第 10 行,在 load_module module_spec.loader.exec_module(module) 文件 “”,第 883 行,在 exec_module 文件 “”,第 241 行, 在_call_with_frames_removed文件中 “F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py”,第 31 行,在 ANALYSIS_MODEL = insightface.app.FaceAnalysis(name=“buffalo_l”, providers=providers) 文件 “F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py”,第 43 行,在 init 断言 '检测' in self.models 断言错误 同样的错误

这是洞察力的问题。

为了解决这个问题,我将face_analysis.py文件的根目录第 24 行更改为绝对地址,如下所示: 'F:/YOURFOLDER/stable-diffusion-webui/venv/Lib/site-packages/insightface'

  • 我从insightface的github下载了buffalo_l模型
  • 我创建了一个名为“models”的文件夹并将其解压缩。(F:\YOUTFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\models)

注意:face_analysys.py文件位于以下文件夹中:F:\YOURFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\app

微信截图_20230624133713 find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640) I:\AI\sd-webui-aki-v4.2\python\lib\site-packages\insightface\utils\transform.py:68: FutureWarning: rcond parameter will change to the default of machine precision times max(M, N) where M and N are the input matrix dimensions. To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1. P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640) Error running postprocess_batch: I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "I:\AI\sd-webui-aki-v4.2\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, *script_args) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image result: ImageResult = swap_face( File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 132, in swap_face result = face_swapper.get(result, target_face, source_face) AttributeError: 'NoneType' object has no attribute 'get' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。 Hello author, the previous problem has been resolved, but a new problem has occurred:)~~~~

1rentai avatar Jun 24 '23 05:06 1rentai

2023-06-19 20:38:41,694 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "F:\Deepfake\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\Deepfake\stable-diffusion-webui\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 "F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 31, in ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError Same error

This is an issue with insightface.

To solve this problem, I changed the root of the face_analysis.py file, line 24, to the absolute address like:

'F:/YOURFOLDER/stable-diffusion-webui/venv/Lib/site-packages/insightface'

* I downloaded the buffalo_l model from insightface's github

* I created a folder called "models" and unzipped it inside. (F:\YOUTFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\models)

NOTE: The face_analysys.py file is located in the folder: F:\YOURFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\app

This fixed it for me! I can now see the roop tab. THANK YOU!!!!

SNCKPCK avatar Jun 24 '23 13:06 SNCKPCK

image

liuxianke2021 avatar Jun 25 '23 14:06 liuxianke2021

This problem is really giving me a headache. I haven't been able to sleep for several days. I really want to solve this problem quickly.*

U are so cute

ylmalta avatar Jun 26 '23 13:06 ylmalta

Error running postprocess_batch: xxxx\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py/it] Traceback (most recent call last): File " xxxx\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, *script_args) File " xxxx\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 184, in postprocess_image result: ImageResult = swap_face( File " xxxx\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 123, in swap_face source_face = get_face_single(source_img, face_index=0) File " xxxx\extensions\sd-webui-roop\scripts\swapper.py", line 76, in get_face_single face_analyser = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File " xxxx\stable-diffusion-webui\venv-3060\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError

YMC-GitHub avatar Jun 27 '23 14:06 YMC-GitHub

https://www.reddit.com/r/StableDiffusion/comments/14i2rr1/im_getting_this_big_ass_error_after_install_roop/

Anker-z avatar Jun 28 '23 11:06 Anker-z

Error running postprocess_image: E:\AI\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 514, in postprocess_image script.postprocess_image(p, pp, *script_args) File "E:\AI\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 181, in postprocess_image if self.enable and self.swap_in_generated: AttributeError: 'FaceSwapScript' object has no attribute 'enable'

I have not slightest clue what to do, It was working fine and after week or so I am getting this fat error

Shakebakentake avatar Jul 10 '23 04:07 Shakebakentake

Error running postprocess_batch: /Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py████████████████████████████████████████████████████████| 45/45 [00:54<00:00, 1.84s/it] Traceback (most recent call last): File "/Users/ricosun/BACKUP stable-diffusion-webui/modules/scripts.py", line 463, in postprocess_image script.postprocess_image(p, pp, *script_args) File "/Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 184, in postprocess_image result: ImageResult = swap_face( File "/Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/swapper.py", line 109, in swap_face converted = convert_to_sd(target_img) File "/Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/cimage.py", line 6, in convert_to_sd chunks = detect(img) File "/opt/homebrew/lib/python3.10/site-packages/ifnude/detector.py", line 46, in detect detection_model = onnxruntime.InferenceSession(model_path, providers=["CPUExecutionProvider"]) File "/opt/homebrew/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 383, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "/opt/homebrew/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 424, 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 /Users/ricosun/.ifnude/detector.onnx failed:Protobuf parsing failed.

Please help !

kkkricosun avatar Jul 19 '23 06:07 kkkricosun

image do it like this

uubuge avatar Aug 02 '23 02:08 uubuge