s0md3v / sd-webui-roop

roop extension for StableDiffusion web-ui
GNU Affero General Public License v3.0
3.3k stars 835 forks source link

Protobuf parsing failed #29

Open mrpggcrd opened 1 year ago

mrpggcrd commented 1 year ago

Error running postprocess_batch: G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py0, 4.14it/s] Traceback (most recent call last): File "G:\SD\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, *script_args) File "G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 187, in postprocess_image result: ImageResult = swap_face( File "G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 111, in swap_face converted = convert_to_sd(target_img) File "G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\cimage.py", line 6, in convert_to_sd chunks = detect(img) File "G:\SD\stable-diffusion-webui\venv\lib\site-packages\ifnude\detector.py", line 46, in detect detection_model = onnxruntime.InferenceSession(model_path, providers=["CPUExecutionProvider"]) File "G:\SD\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "G:\SD\stable-diffusion-webui\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.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from C:\Users\LTC.ifnude/detector.onnx failed:Protobuf parsing failed.

gokuchiku commented 1 year ago

I also have a similar issue roop final error

xueqing0622 commented 1 year ago

same problem,

Error running postprocess_batch: D:\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "D:\sd-webui-aki-v4.1\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, *script_args) File "D:\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image result: ImageResult = swap_face( File "D:\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\swapper.py", line 109, in swap_face converted = convert_to_sd(target_img) File "D:\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\cimage.py", line 6, in convert_to_sd chunks = detect(img) File "D:\sd-webui-aki-v4.1\python\lib\site-packages\ifnude\detector.py", line 46, in detect detection_model = onnxruntime.InferenceSession(model_path, providers=["CPUExecutionProvider"]) File "D:\sd-webui-aki-v4.1\python\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in __init__ self._create_inference_session(providers, provider_options, disabled_optimizers) File "D:\sd-webui-aki-v4.1\python\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.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from C:\Users\Admin\.ifnude/detector.onnx failed:Protobuf parsing failed.

Forevercyj commented 1 year ago

same error

gokuchiku commented 1 year ago

same error

download the onnx file from the updated readme file and do as it says in there

xueqing0622 commented 1 year ago

same error

download the onnx file from the updated readme file and do as it says in there

hi, gokuchiku, do you fixed it. which onnx file we should download, the "inswapper_128.onnx"I download as readme, but still same error download the inswapper_128.onnx model and put it inside /models/roop/ directory.

klossm commented 1 year ago

I found that it was caused by an error in the process of downloading the model. Make sure there are these models under the three paths below. If you don't have these folders, you can first create related folders according to the path below.

  1. C:\ Users\ directory where the user resides\ .ifnude

There are detector.onnx and classes models under this path, and the model of detector.onnx is about 139mb. If the model under this path is not the right size, please delete the model in the directory, restart sd webui ,It will download automatically.

  1. C:\ Users\ directory where the user resides\ .insightface\ models\ buffalo_l

There are five models in the buffalo_l folder directory. You can download them from the link below and extract them to the buffalo_l directory.

Https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

  1. download the inswapper_128.onnx model and put it inside /models/roop/ directory.
selfuppen commented 1 year ago

I found that it was caused by an error in the process of downloading the model. Make sure there are these models under the three paths below. If you don't have these folders, you can first create related folders according to the path below.

  1. C:\ Users\ directory where the user resides\ .ifnude.

There are detector.onnx and classes models under this path, and the model of detector.onnx is about 139mb. If the model under this path is not the right size, please delete the model in the directory, restart sd webui ,It will download automatically.

  1. C:\ Users\ directory where the user resides\ .insightface\ models\ buffalo_l.

There are five models in the buffalo_l folder directory. You can download them from the link below and extract them to the buffalo_l directory.

Https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

  1. download the inswapper_128.onnx model and put it inside /models/roop/ directory.

Additional information on step 1, Many people has network issue especially in China, here is the direct-donwload-link: https://huggingface.co/s0md3v/nudity-checker/resolve/main/detector.onnx After downloaded, put it into ~/.ifnude/detector.onnx

xueqing0622 commented 1 year ago

I redownload the https://huggingface.co/s0md3v/nudity-checker/resolve/main/detector.onnx to the error path: C:\Users\Admin.ifnude/detector.onnx(find yours path in command.exe) This is where you block the location needed to download the file, the rest can be downloaded according to the command line prompts if the download is slow

wakakmomo commented 1 year ago

Thanks, it works!!! the file "detector.onnx" in folder ".ifnude" is about 138MB, replace it by https://huggingface.co/s0md3v/nudity-checker/resolve/main/detector.onnx (139MB!!).

lindiny commented 1 year ago

我发现是下载模型过程中出现错误导致的。 确保下面三个路径下有这些模型。如果没有这些文件夹,可以先按照下面的路径创建相关文件夹。

  1. C:\Users\用户所在目录.ifnude

该路径下有Detector.onnx和classes模型,Detector.onnx的模型约为139mb。如果该路径下的模型大小不合适,请删除该目录下的模型,重新启动 sd webui ,就会自动下载。

  1. C:\Users\用户所在目录.insightface\models\buffalo_l

buffalo_l文件夹目录下有五个模型。您可以从下面的链接下载它们并将它们解压到 buffalo_l 目录中。

https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

  1. 下载inswapper_128.onnx模型并将其放入 /models/roop/ 目录中。

感谢,很有用,总算解决了这个问题

777Awesomesun commented 11 months ago

This file https://huggingface.co/s0md3v/nudity-checker/resolve/main/detector.onnx was the same size as the one i already got. Still if i put it in the right folder, still most of my nsfw images are blocked by ROOP.

777Awesomesun commented 11 months ago

Apparently there is a NSFW version for ROOP i'm downloading to try now. https://github.com/Gourieff/sd-webui-roop-nsfw

yzufardiansyah commented 11 months ago

I found that it was caused by an error in the process of downloading the model. Make sure there are these models under the three paths below. If you don't have these folders, you can first create related folders according to the path below.

  1. C:\ Users\ directory where the user resides\ .ifnude

There are detector.onnx and classes models under this path, and the model of detector.onnx is about 139mb. If the model under this path is not the right size, please delete the model in the directory, restart sd webui ,It will download automatically.

  1. C:\ Users\ directory where the user resides\ .insightface\ models\ buffalo_l

There are five models in the buffalo_l folder directory. You can download them from the link below and extract them to the buffalo_l directory.

Https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

  1. download the inswapper_128.onnx model and put it inside /models/roop/ directory.

Thank You, ITs WORK,

raiyan22 commented 11 months ago

I found that it was caused by an error in the process of downloading the model. Make sure there are these models under the three paths below. If you don't have these folders, you can first create related folders according to the path below.

  1. C:\ Users\ directory where the user resides\ .ifnude

There are detector.onnx and classes models under this path, and the model of detector.onnx is about 139mb. If the model under this path is not the right size, please delete the model in the directory, restart sd webui ,It will download automatically.

  1. C:\ Users\ directory where the user resides\ .insightface\ models\ buffalo_l

There are five models in the buffalo_l folder directory. You can download them from the link below and extract them to the buffalo_l directory.

Https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

  1. download the inswapper_128.onnx model and put it inside /models/roop/ directory.

Thank you very much! It is working!!

tolinescu commented 10 months ago

Thanks, unfortunately i cannot find the inswapper_128.onnx

niubiwang commented 9 months ago

https://huggingface.co/s0md3v/nudity-checker/resolve/main/ detector.onnx 重新下载到错误路径: C:\Users\Admin.ifnude/ detector.onnx

太感谢了!!!!解决了,这是我第一次从这上面解决了问题

iielse commented 3 months ago

@tolinescu same, i cannot find the inswapper_128.onnx too.