ComfyUI > Nodes > Basic data handling > Tensor Info

ComfyUI Node: Tensor Info

Class Name

TensorInfo

Category
Basic/tensor
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling 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

Tensor Info Description

Provides key attributes of a tensor, including shape, data type, and storage device.

Tensor Info:

The TensorInfo node is designed to provide essential information about a tensor, which is a fundamental data structure used in various computational tasks, particularly in machine learning and AI applications. This node extracts and returns key attributes of a tensor, such as its shape, data type, and the device on which it is stored. Understanding these attributes is crucial for managing and manipulating tensors effectively, as they influence how data is processed and stored in memory. By using the TensorInfo node, you can gain insights into the structure and characteristics of your data, enabling you to make informed decisions about how to handle and optimize it for your specific needs.

Tensor Info Input Parameters:

tensor

The tensor parameter is the primary input for the TensorInfo node. It accepts any data that can be converted into a tensor, including lists, arrays, or existing tensor objects. This parameter is crucial as it determines the tensor whose information will be extracted. There are no specific minimum or maximum values for this parameter, as it is flexible enough to handle various data types and structures. The tensor parameter does not have a default value, meaning you must provide a valid input for the node to function correctly.

Tensor Info Output Parameters:

shape

The shape output parameter provides a list of integers representing the dimensions of the tensor. This information is vital for understanding the structure of the data, as it indicates how many elements are present in each dimension of the tensor. Knowing the shape helps in tasks such as reshaping or slicing the tensor for further processing.

dtype

The dtype output parameter returns a string that describes the data type of the elements within the tensor. This is important because the data type affects how the data is stored and processed. For example, different data types can have varying levels of precision and memory requirements, which can impact the performance and accuracy of computations.

device

The device output parameter provides a string indicating the device on which the tensor is stored, such as a CPU or GPU. This information is crucial for optimizing performance, as operations on tensors can be significantly faster when performed on a GPU. Understanding the device allocation helps in managing resources effectively and ensuring that computations are executed efficiently.

Tensor Info Usage Tips:

  • Ensure that the input data is compatible with tensor operations by converting lists or arrays into tensors before using the TensorInfo node.
  • Use the shape output to verify the dimensions of your tensor, especially when preparing data for machine learning models that require specific input shapes.
  • Check the dtype output to confirm that the data type of your tensor matches the requirements of your computational tasks, as this can affect both performance and accuracy.

Tensor Info Common Errors and Solutions:

Failed to slice tensor with '<slice_str>'

  • Explanation: This error occurs when the slicing string provided is not valid or cannot be parsed correctly.
  • Solution: Ensure that the slicing string follows the correct format, using commas to separate dimensions and colons to specify ranges. Double-check the syntax and ensure that indices are within the valid range for the tensor's dimensions.

Unknown operation: <operation>

  • Explanation: This error is raised when an unsupported operation is specified for a tensor operation node.
  • Solution: Verify that the operation you are trying to perform is supported by the node. Refer to the list of available operations and ensure that the operation name is spelled correctly.

Tensor Info Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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 Models, enabling artists to harness the latest AI tools to create incredible art.

Tensor Info