Open Poppi2 opened 1 month ago
There is something weird going on here.. I managed to get multiple files working that weren't doing so before - by randomly trying different conversions and overwriting the files. I then did a test of dozens of conversions, doing the same thing I did before but now with dedicated names so I'd know which would work and none of them did.
If using depth render instead of normals I get this error instead. Not sure how I can further assist debugging.
Exception Message: 'NoneType' object has no attribute 'astype'
File "/home/jovyan/comfyui/ComfyUI/execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/comfyui/ComfyUI/execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/comfyui/ComfyUI/execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "/home/jovyan/comfyui/ComfyUI/execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/comfyui/ComfyUI/custom_nodes/ComfyUI-HQ-Image-Save/nodes.py", line 85, in load
rgb, mask = load_EXR(p, linear_to_sRGB)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/comfyui/ComfyUI/custom_nodes/ComfyUI-HQ-Image-Save/nodes.py", line 28, in load_EXR
image = cv.imread(filepath, cv.IMREAD_UNCHANGED).astype(np.float32)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I've just added a check to handle 2-dim (aka 1 channel) EXRs, which should prevent the initial error, although it's not really a solution to load the ObjectNormals.exr you provided. The issue there is that blender is not exporting the channels with the names that opencv expects, it's exporting XYZ instead of RGB. Opencv I think just picks the first channel if it doesn't see RGB or RGBA in the channel names.
You can see the difference in metadata by loading the renders in nuke:
I would like to find a better solution for multichannel and non-RGBA channel names, but opencv just doesn't support that, and the proper solution, using the official OpenEXR python bindings, would require building the binaries from scratch as they don't distribute prebuilt ones for windows AFAIK.
Hi! The attached error message appears whenever I try to generate with ObjectNormals.exr HOWEVER CameraNormals.exr loads perfectly fine. The export settings are identical. Same problem with exported depth passes and so on, only that one file works. I tried switching between rgb and rgba but to not avail. Would appreciate your help!
Issue file upload doesnt support exrs so here is a drive link containg all relevant files. https://drive.google.com/drive/folders/1i5hOtphTVBKczZMOw1IPUt1CiDyrErQq?usp=sharing This is the workflow.json
BTW you mentioned somewhere that people probably won't want to use a multipass workflow with this..Just to let you know, I want to! I think it's an interesting workflow. Using perfect cg renders as input and guiding ai generation.
ComfyUI Error Report
Error Details
Node Type: LoadEXR
Exception Type: IndexError
Exception Message: too many indices for array: array is 2-dimensional, but 3 were indexed
Stack Trace