KutsuyaYuki / ABG_extension

228 stars 23 forks source link

InvalidArgument: [ONNXRuntimeError] : 2 #14

Closed hypernewb closed 1 year ago

hypernewb commented 1 year ago

Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "D:\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, *kwargs) File "D:\stable-diffusion-webui\modules\img2img.py", line 167, in img2img processed = modules.scripts.scripts_img2img.run(p, args) File "D:\stable-diffusion-webui\modules\scripts.py", line 376, in run processed = script.run(p, *script_args) File "D:\stable-diffusion-webui\extensions\ABG_extension\scripts\app.py", line 111, in run nmask, nimg = rmbg_fn(np.array(proc.images[i])) File "D:\stable-diffusion-webui\extensions\ABG_extension\scripts\app.py", line 62, in rmbg_fn mask = get_mask(img) File "D:\stable-diffusion-webui\extensions\ABG_extension\scripts\app.py", line 49, in get_mask mask = rmbg_model.run(None, {'img': img_input})[0][0] File "D:\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 200, in run return self._sess.run(output_names, input_feed, run_options) onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Got invalid dimensions for input: img for the following indices index: 1 Got: 4 Expected: 3 Please fix either the inputs or the model.

i get this error when trying to run the script (funny enough it worked one time lol) looking at other issues, do i need to download the depth model? do i use it in controlnet or do i use it as a ckpt model? if so would be good to include in your instructions.

KutsuyaYuki commented 1 year ago

This is the same issue as: https://github.com/KutsuyaYuki/ABG_extension/issues/8 I have updated the code, please update and try again.

KutsuyaYuki commented 1 year ago

Closed because no further response