ComfyUI > Nodes > ComfyUI > SaveGLB

ComfyUI Node: SaveGLB

Class Name

SaveGLB

Category
3d
Author
ComfyAnonymous (Account age: 872days)
Extension
ComfyUI
Latest Updated
2025-05-13
Github Stars
76.71K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

SaveGLB Description

Facilitates converting and saving 3D mesh data to GLB format for easy sharing and compatibility.

SaveGLB:

The SaveGLB node is designed to facilitate the conversion and saving of 3D mesh data into the GLB file format, which is a binary version of the GLTF format commonly used for 3D models. This node is particularly useful for AI artists who work with 3D data and need a streamlined way to export their creations into a widely supported format for further use in various applications, such as 3D rendering engines or virtual reality environments. By leveraging this node, you can efficiently save your 3D mesh data, complete with metadata, into a compact and portable file format, ensuring that your work is easily shareable and compatible with a wide range of platforms.

SaveGLB Input Parameters:

mesh

The mesh parameter is a required input that represents the 3D mesh data you wish to save. It consists of vertices and faces that define the structure of the 3D model. This parameter is crucial as it directly influences the content of the GLB file being generated. The mesh data should be in a format that the node can process, typically as PyTorch tensors, which are then converted to numpy arrays for further handling.

filename_prefix

The filename_prefix parameter is a required input that specifies the prefix for the output file's name. By default, it is set to "mesh/ComfyUI", but you can customize it to suit your organizational needs. This prefix helps in categorizing and identifying the output files, especially when dealing with multiple exports. It impacts the naming convention of the saved GLB files, ensuring they are easily recognizable and retrievable.

prompt

The prompt parameter is a hidden input that allows you to include additional descriptive information or context about the 3D model being saved. This information is stored as metadata within the GLB file, providing valuable insights or instructions related to the model. While not mandatory, including a prompt can enhance the documentation and understanding of the model's purpose or origin.

extra_pnginfo

The extra_pnginfo parameter is another hidden input that enables you to attach extra metadata to the GLB file. This can include any additional information you deem necessary, such as versioning details, author information, or specific attributes of the model. Like the prompt, this metadata is stored within the GLB file, enriching the data with context and supplementary details.

SaveGLB Output Parameters:

The SaveGLB node does not produce any direct output parameters. Instead, it performs the action of saving the 3D mesh data to a GLB file, and the results of this operation, such as the file path and metadata, are typically handled internally or returned as part of a user interface update.

SaveGLB Usage Tips:

  • Ensure that your mesh data is correctly formatted and free of errors before using the SaveGLB node to avoid issues during the saving process.
  • Customize the filename_prefix to organize your output files effectively, especially when working on multiple projects or iterations.
  • Utilize the prompt and extra_pnginfo parameters to embed valuable metadata within your GLB files, enhancing their utility and documentation.

SaveGLB Common Errors and Solutions:

FileNotFoundError

  • Explanation: This error occurs when the specified output directory does not exist or is inaccessible.
  • Solution: Verify that the output directory specified in the filename_prefix exists and has the necessary write permissions.

ValueError: Invalid Mesh Data

  • Explanation: This error indicates that the mesh data provided is not in the expected format or contains invalid values.
  • Solution: Ensure that the mesh data is correctly formatted as PyTorch tensors and that all vertices and faces are valid and properly defined.

PermissionError

  • Explanation: This error arises when the node does not have the necessary permissions to write to the specified directory.
  • Solution: Check the directory permissions and ensure that the application has the required access rights to write files.

SaveGLB Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.