HugoTini / DeepBump

Normal & height maps generation from single pictures
https://hugotini.github.io/deepbump
GNU General Public License v3.0
1.07k stars 41 forks source link

onnx / ORT 1.9 Error #27

Open Adrianwgn opened 1 year ago

Adrianwgn commented 1 year ago

Hi, I would love to use your addon, but unfortunately i always get the same error. I have tried running Blender as admin, installing Blender, tried different versions of blender (3.4 and 3.6.2) and deepbump (v7 and v6) but somehow i always get the error:

I dont know much about python and google wasnt able to help me. Am I doing something wrong? How can i fix this? Thanks for your help! :)

Screenshot (1)

Bonitodelcapo commented 1 year ago

As stated in the error and in the official ONNX runtime python API you need to explicitly define an execution provider. to do this change the code in the module_color_to_normals.py file as follows: `

ort_session = ort.InferenceSession(addon_path + "/deepbump256.onnx")

options = ort.SessionOptions()
options.enable_profiling=True
ort_session = ort.InferenceSession(
        addon_path + "/deepbump256.onnx",
        sess_options=options,
        providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])

` Another way would be to explicitly download an older version of the onnxruntime package using pip. Beware that you explicitly need to use the blender python interpreter. To clear confusion about blender's python interpreter here.