The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
add File3DAny output to Load3D node; extend SaveGLB to accept File3DAny as input (#12276)
Alexander Piskune77b34dfead9
diff --git a/comfy_extras/nodes_hunyuan3d.py b/comfy_extras/nodes_hunyuan3d.pyindex eda1639ab..c2df3e859 100644--- a/comfy_extras/nodes_hunyuan3d.py+++ b/comfy_extras/nodes_hunyuan3d.py@@ -618,6 +618,7 @@ class SaveGLB(IO.ComfyNode):def define_schema(cls):return IO.Schema(node_id="SaveGLB",+ display_name="Save 3D Model",search_aliases=["export 3d model", "save mesh"],category="3d",is_output_node=True,@@ -626,8 +627,14 @@ class SaveGLB(IO.ComfyNode):IO.Mesh.Input("mesh"),types=[IO.File3DGLB,+ IO.File3DGLTF,+ IO.File3DOBJ,+ IO.File3DFBX,+ IO.File3DSTL,+ IO.File3DUSDZ,+ IO.File3DAny,],- tooltip="Mesh or GLB file to save",+ tooltip="Mesh or 3D file to save",),IO.String.Input("filename_prefix", default="mesh/ComfyUI"),],@@ -649,7 +656,8 @@ class SaveGLB(IO.ComfyNode):if isinstance(mesh, Types.File3D):# Handle File3D input - save BytesIO data to output folder- f = f"{filename}_{counter:05}_.glb"+ ext = mesh.format or "glb"+ f = f"{filename}_{counter:05}_.{ext}"mesh.save_to(os.path.join(full_output_folder, f))results.append({"filename": f,diff --git a/comfy_extras/nodes_load_3d.py b/comfy_extras/nodes_load_3d.pyindex f29510488..edbb5cd40 100644--- a/comfy_extras/nodes_load_3d.py+++ b/comfy_extras/nodes_load_3d.py@@ -45,6 +45,7 @@ class Load3D(IO.ComfyNode):IO.Image.Output(display_name="normal"),IO.Load3DCamera.Output(display_name="camera_info"),IO.Video.Output(display_name="recording_video"),+ IO.File3DAny.Output(display_name="model_3d"),],)@@ -66,7 +67,8 @@ class Load3D(IO.ComfyNode):video = InputImpl.VideoFromFile(recording_video_path)- return IO.NodeOutput(output_image, output_mask, model_file, normal_image, image['camera_info'], video)+ file_3d = Types.File3D(folder_paths.get_annotated_filepath(model_file))+ return IO.NodeOutput(output_image, output_mask, model_file, normal_image, image['camera_info'], video, file_3d)process = execute # TODO: remove