ComfyUI > Nodes > MTB Nodes > Save Tensors (mtb)

ComfyUI Node: Save Tensors (mtb)

Class Name

Save Tensors (mtb)

Category
mtb/debug
Author
melMass (Account age: 3754days)
Extension
MTB Nodes
Latest Updated
2024-07-02
Github Stars
0.35K

How to Install MTB Nodes

Install this extension via the ComfyUI Manager by searching for MTB Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter MTB Nodes 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Save Tensors (mtb) Description

Save torch tensors (images, masks, latent representations) to disk for debugging and analysis outside ComfyUI.

Save Tensors (mtb):

The Save Tensors (mtb) node is designed to save torch tensors, such as images, masks, or latent representations, to disk. This functionality is particularly useful for debugging purposes outside of the ComfyUI environment. By saving these tensors, you can inspect and analyze them using external tools, which can help in understanding the behavior of your AI models and workflows. The node provides a straightforward way to export tensors with a specified filename prefix, ensuring that you can easily organize and retrieve the saved data for further examination.

Save Tensors (mtb) Input Parameters:

filename_prefix

The filename_prefix parameter allows you to specify a prefix for the filenames of the saved tensors. This helps in organizing and identifying the saved files. The default value is "ComfyPickle", but you can change it to any string that suits your naming conventions.

image

The image parameter is an optional input where you can provide an image tensor that you want to save. This tensor represents the image data that will be written to disk.

mask

The mask parameter is an optional input for providing a mask tensor. This tensor represents the mask data that will be saved to disk, allowing you to debug and analyze mask-related operations.

latent

The latent parameter is an optional input for providing a latent tensor. This tensor represents latent data, which can be saved to disk for further analysis and debugging of latent space manipulations.

Save Tensors (mtb) Output Parameters:

This node does not produce any output parameters.

Save Tensors (mtb) Usage Tips:

  • Ensure that you provide a meaningful filename_prefix to easily identify and organize your saved tensors.
  • Use this node to save intermediate tensors during your workflow to debug and understand the transformations applied to your data.
  • Combine this node with other debugging nodes to create a comprehensive debugging pipeline.

Save Tensors (mtb) Common Errors and Solutions:

ValueError: "All input tensors must have the same shape when on_mismatch is 'Error'."

  • Explanation: This error occurs when the input tensors have different shapes, and the on_mismatch parameter is set to "Error".
  • Solution: Ensure that all input tensors have the same shape or adjust the on_mismatch parameter to handle shape mismatches appropriately.

FileNotFoundError: "Output directory not found."

  • Explanation: This error occurs when the specified output directory does not exist.
  • Solution: Verify that the output directory exists and is correctly specified in the node's configuration.

TypeError: "Invalid tensor type provided."

  • Explanation: This error occurs when an invalid tensor type is provided to the node.
  • Solution: Ensure that the input tensors are of valid types (IMAGE, MASK, or LATENT) as specified in the node's input parameters.

Save Tensors (mtb) Related Nodes

Go back to the extension to check out more related nodes.
MTB Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.