Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot generate normal map #32

Open
Jooj3D opened this issue Oct 4, 2023 · 4 comments
Open

Cannot generate normal map #32

Jooj3D opened this issue Oct 4, 2023 · 4 comments

Comments

@Jooj3D
Copy link

Jooj3D commented Oct 4, 2023

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

@00004707
Copy link

00004707 commented Oct 5, 2023

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.

@BrynnaDaRosa
Copy link

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

@1790374044
Copy link

Maybe it is related to onnxruntime?
See microsoft/onnxruntime#17631 , which was introduced in the 1.16.0 release.

@Maitrihamburg
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants