DeepBump icon indicating copy to clipboard operation
DeepBump copied to clipboard

Cannot generate normal map

Open Jooj3D opened this issue 2 years ago • 4 comments

hi all, i got this problem:

Python: Traceback (most recent call last):
  File "C:\Users\giosu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DeepBump-master\__init__.py", line 162, in execute
    output_img = module_color_to_normals.apply(input_img, OVERLAP, self.progress_print)
  File "C:\Users\giosu\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DeepBump-master\module_color_to_normals.py", line 36, in apply
    ort_session = ort.InferenceSession(addon_path + "/deepbump256.onnx")
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\python\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 432, in __init__
    raise e
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\python\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.6\python\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 451, in _create_inference_session
    raise ValueError(
ValueError: This ORT build has ['AzureExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['AzureExecutionProvider', 'CPUExecutionProvider'], ...)

i installed the addon on windows 11 blender version 3.6 i installed the dependencies but the addon give me this error whenever i try to create a normal map

Jooj3D avatar Oct 04 '23 17:10 Jooj3D

I'm not familiar with the ORT library that this addon uses, but changing the 36 line in module_color_to_normals.py file from

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

to

ort_session = ort.InferenceSession(addon_path + "/deepbump256.onnx", providers=['CPUExecutionProvider'])

allows the addon to generate normal maps. Still, the addon requires an update and confirmation from the developer if this is the correct solution.

00004707 avatar Oct 05 '23 19:10 00004707

had same issue. changed line 36 and it generated a normal map as expected. hope developer responds.

BrynnaDaRosa avatar Oct 11 '23 03:10 BrynnaDaRosa

Maybe it is related to onnxruntime? See https://github.com/microsoft/onnxruntime/issues/17631 , which was introduced in the 1.16.0 release.

1790374044 avatar Oct 11 '23 08:10 1790374044

Had the same issue, fixed it with the code provided by "00004707". For anyone wondering where to find the python script:

Usually its under "AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons"

Maitrihamburg avatar Oct 11 '23 10:10 Maitrihamburg

Closing for https://github.com/HugoTini/DeepBump/issues/27

HugoTini avatar Mar 13 '25 20:03 HugoTini