patriciogonzalezvivo / comfyui_glslnodes

GLSL node for ComfyUI
GNU General Public License v3.0
183 stars 13 forks source link

Error when piping VAE Decode image output into glslViewer #11

Closed couleurs closed 3 months ago

couleurs commented 3 months ago

Hello and thanks for the great repo!!

I ran into the following error when trying to use the output from a VAE Decode node as a texture uniform into the glslViewer node:

Error occurred when executing glslViewer:

ndarray is not C-contiguous

File "/content/ComfyUI/execution.py", line 316, 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 "/content/ComfyUI/execution.py", line 191, 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 "/content/ComfyUI/execution.py", line 168, in _map_node_over_list
process_inputs(input_dict, i)
File "/content/ComfyUI/execution.py", line 157, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/content/ComfyUI/custom_nodes/comfyui_glslnodes/glsl_viewer.py", line 65, in main
context.loadTextures(images_in)
File "/content/ComfyUI/custom_nodes/comfyui_glslnodes/glsl_context.py", line 49, in loadTextures
self.loadTexture(key, value)
File "/content/ComfyUI/custom_nodes/comfyui_glslnodes/glsl_context.py", line 32, in loadTexture
tex = ImageTexture(image.cpu().numpy()[0], name)
File "/content/ComfyUI/custom_nodes/comfyui_glslnodes/glsl_textures.py", line 52, in __init__
self.texture = self.ctx.texture(image.shape[1::-1], self.channels, image)
File "/usr/local/lib/python3.10/dist-packages/moderngl/__init__.py", line 1582, in texture
res.mglo, res._glo = self.mglo.texture(

I'm attaching an example workflow, which is basically the default workflow with the addition of the glsl nodes at the end. Any idea to work around this issue?

Thanks! Johan

vae_decode_glsl.json

patriciogonzalezvivo commented 3 months ago

solved here https://github.com/patriciogonzalezvivo/comfyui_glslnodes/commit/903b87eb60b29e39d80a3458ca9ca7ba5300414c please give it a go