ComfyUI-3D-Pack icon indicating copy to clipboard operation
ComfyUI-3D-Pack copied to clipboard

load and save glb meshes

Open imperator-maximus opened this issue 2 months ago • 1 comments

Hi,

I made a very simple test workflow for just testing the load and save nodes: image

I used a simple cube mesh for testing.

But I am getting in load mesh node:

Error occurred when executing [Comfy3D] Load 3D Mesh:

invalid index to scalar variable.

File "E:\SD\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\SD\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\SD\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\SD\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 196, in load_mesh
mesh = Mesh.load(mesh_file_path, resize, renormal, retex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\SD\ComfyUI\custom_nodes\ComfyUI-3D-Pack\mesh_processer\mesh.py", line 93, in load
mesh = cls.load_trimesh(path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\SD\ComfyUI\custom_nodes\ComfyUI-3D-Pack\mesh_processer\mesh.py", line 386, in load_trimesh
mesh.albedo = torch.tensor(texture[..., :3], dtype=torch.float32, device=device).contiguous()
~~~~~~~^^^^^^^^^

Thank you

imperator-maximus avatar May 20 '24 18:05 imperator-maximus