Removed PyTorch wrapper nodes. They were moved to ComfyUI-Py-Wrapper extension.

This commit is contained in:
HowToSD
2025-03-10 15:54:51 -07:00
parent 5fee9ffb60
commit 60692bf9c2
338 changed files with 6 additions and 14298 deletions
-148
View File
@@ -99,8 +99,6 @@
| [Pandas Show Series](pandas_show_series.md) | Displays a Pandas Series as text. |
| [Pandas Show Text](pandas_show_text.md) | Displays a string. |
| [Pandas To String](pandas_to_string.md) | Converts a pandas DataFrame to a string representation. |
| [Pt Show Size](pt_show_size.md) | Displays PyTorch Size object as a string. |
| [Pt Show Text](pt_show_text.md) | Displays PyTorch tensor as a string. Note that the tensor is partially printed out when |
## IO
| Node | Description |
| --- | --- |
@@ -127,7 +125,6 @@
| [Pandas Load JSON](pandas_load_json.md) | Loads JSON files into a pandas DataFrame. |
| [Pandas Save CSV](pandas_save_csv.md) | Saves a PandasDataFrame to a CSV file. |
| [Pandas Save JSON](pandas_save_json.md) | Saves a PandasDataFrame to a JSON file. |
| [Pt Save Model](pt_save_model.md) | A wrapper class for saving a PyTorch model. |
## Logical operations
| Node | Description |
| --- | --- |
@@ -178,151 +175,6 @@
| [SNS Line Plot](sns_line.md) | Generates a line plot from a pandas DataFrame using Seaborn. |
| [SNS Pairplot](sns_pairplot.md) | Generates a pairplot from a Pandas DataFrame using Seaborn. |
| [SNS Scatter Plot](sns_scatter.md) | Generates a scatter plot from a pandas DataFrame using Seaborn. |
## PyTorch wrapper - Arithmetic operations
| Node | Description |
| --- | --- |
| [Pt Add](pt_add.md) | Adds two PyTorch tensors. |
| [Pt Div](pt_div.md) | Divides one PyTorch tensor by another element-wise. |
| [Pt Floor Div](pt_floor_divide.md) | Performs element-wise floor division on two PyTorch tensors. |
| [Pt Mul](pt_mul.md) | Multiplies two PyTorch tensors element-wise. |
| [Pt Pow](pt_pow.md) | Raises one PyTorch tensor to the power of another element-wise. |
| [Pt Remainder](pt_remainder.md) | Computes the element-wise remainder of division between two PyTorch tensors. |
| [Pt Sub](pt_sub.md) | Subtracts one PyTorch tensor from another. |
## PyTorch wrapper - Bitwise operations
| Node | Description |
| --- | --- |
| [Pt Bitwise And](pt_bitwise_and.md) | Performs a bitwise AND operation on two PyTorch tensors element-wise. |
| [Pt Bitwise Left Shift](pt_bitwise_left_shift.md) | Performs a bitwise left shift operation on two PyTorch tensors element-wise. |
| [Pt Bitwise Not](pt_bitwise_not.md) | Performs a bitwise NOT operation on a PyTorch tensor element-wise. |
| [Pt Bitwise Or](pt_bitwise_or.md) | Performs a bitwise OR operation on two PyTorch tensors element-wise. |
| [Pt Bitwise Right Shift](pt_bitwise_right_shift.md) | Performs a bitwise right shift operation on two PyTorch tensors element-wise. |
| [Pt Bitwise Xor](pt_bitwise_xor.md) | Performs a bitwise XOR operation on two PyTorch tensors element-wise. |
## PyTorch wrapper - Comparison operations
| Node | Description |
| --- | --- |
| [Pt Eq](pt_eq.md) | Tests whether two PyTorch tensors are equal element-wise. |
| [Pt Ge](pt_ge.md) | Tests whether elements in the first PyTorch tensor are greater than or equal to the corresponding elements in the second tensor. |
| [Pt Gt](pt_gt.md) | Tests whether elements in the first PyTorch tensor are greater than the corresponding elements in the second tensor. |
| [Pt Le](pt_le.md) | Tests whether elements in the first PyTorch tensor are less than or equal to the corresponding elements in the second tensor. |
| [Pt Lt](pt_lt.md) | Tests whether elements in the first PyTorch tensor are less than the corresponding elements in the second tensor. |
| [Pt Ne](pt_ne.md) | Tests whether two PyTorch tensors are not equal element-wise. |
## PyTorch wrapper - Image processing
| Node | Description |
| --- | --- |
| [Pt Crop](pt_crop.md) | Crops a PyTorch tensor to the specified size. The input tensor must have a shape of (c, h, w) or (b, c, h, w). |
| [Pt From Image](pt_from_image.md) | Casts an Image tensor as a PyTorch tensor. |
| [Pt From Image Transpose](pt_from_image_transpose.md) | Casts an image tensor to a PyTorch tensor and transposes it from (H, W, C) to (C, H, W). For rank-4 inputs, the batch axis remains unchanged. |
| [Pt Interpolate By Scale Factor](pt_interpolate_by_scale_factor.md) | Resizes a PyTorch tensor using interpolation by scale factor. The input tensor must have a shape of (c, h, w) or (b, c, h, w). |
| [Pt Interpolate To Size](pt_interpolate_to_size.md) | Resizes a PyTorch tensor using interpolation. The input tensor must have a shape of (c, h, w) or (b, c, h, w). |
| [Pt Pad](pt_pad.md) | Pads a PyTorch tensor to the specified size. Padded area will be black. The input tensor must have a shape of (c, h, w) or (b, c, h, w). |
| [Pt To Image](pt_to_image.md) | Casts a PyTorch tensor as an Image tensor. |
| [Pt To Image Transpose](pt_to_image_transpose.md) | Casts a PyTorch tensor as an Image tensor and transposes it from (C, H, W) to (H, W, C). For rank-4 inputs, the batch axis remains unchanged. |
## PyTorch wrapper - Indexing and Slicing Operations
| Node | Description |
| --- | --- |
| [Pt Gather](pt_gather.md) | Generates a tensor based on the index tensor using PyTorch's `gather` function. |
| [Pt Index Select](pt_index_select.md) | Extracts elements from the input tensor along a specified dimension using an index tensor. |
| [Pt Masked Select](pt_masked_select.md) | Extracts elements from the input tensor whose corresponding value in `masked_tens` is `True`. |
| [Pt Scatter](pt_scatter.md) | Generates a new tensor by replacing values at specified positions using an index tensor. |
| [Pt Where](pt_where.md) | Generates a new tensor by selecting values based on a condition tensor. |
## PyTorch wrapper - Logical operations
| Node | Description |
| --- | --- |
| [Pt Logical And](pt_logical_and.md) | Performs a logical AND operation on two PyTorch tensors element-wise. |
| [Pt Logical Not](pt_logical_not.md) | Performs a logical NOT operation on a PyTorch tensor element-wise. |
| [Pt Logical Or](pt_logical_or.md) | Performs a logical OR operation on two PyTorch tensors element-wise. |
| [Pt Logical Xor](pt_logical_xor.md) | Performs a logical XOR operation on two PyTorch tensors element-wise. |
## PyTorch wrapper - Math operations
| Node | Description |
| --- | --- |
| [Pt Abs](pt_abs.md) | Computes the absolute value of each element in a PyTorch tensor. |
| [Pt Acos](pt_acos.md) | Computes the arccosine (inverse cosine) of a PyTorch tensor element-wise. |
| [Pt Asin](pt_asin.md) | Computes the arcsine (inverse sine) of a PyTorch tensor element-wise. |
| [Pt Atan](pt_atan.md) | Computes the arc tangent (inverse tangent) of a PyTorch tensor element-wise. |
| [Pt Cos](pt_cos.md) | Computes the cosine of a PyTorch tensor element-wise. |
| [Pt Cosh](pt_cosh.md) | Computes the hyperbolic cosine of a PyTorch tensor element-wise. |
| [Pt Exp](pt_exp.md) | Performs an exponential operation on a PyTorch tensor element-wise. |
| [Pt Log](pt_log.md) | Computes the natural logarithm (log base e) of a PyTorch tensor element-wise. |
| [Pt Neg](pt_neg.md) | Computes the negation of each element in a PyTorch tensor. |
| [Pt Sin](pt_sin.md) | Computes the sine of a PyTorch tensor element-wise. |
| [Pt Sinh](pt_sinh.md) | Computes the hyperbolic sine of a PyTorch tensor element-wise. |
| [Pt Sqrt](pt_sqrt.md) | Computes the square root of each element in a PyTorch tensor. |
| [Pt Tan](pt_tan.md) | Computes the tangent of a PyTorch tensor element-wise. |
| [Pt Tanh](pt_tanh.md) | Computes the hyperbolic tangent of a PyTorch tensor element-wise. |
## PyTorch wrapper - Matrix operations
| Node | Description |
| --- | --- |
| [Pt Bmm](pt_bmm.md) | Performs batched matrix multiplication on two 3D PyTorch tensors. |
| [Pt Einsum](pt_einsum.md) | Performs Tensor operations specified in the Einstein summation equation. |
| [Pt Mat Mul](pt_matmul.md) | Performs matrix multiplication on two PyTorch tensors. |
| [Pt Mm](pt_mm.md) | Performs 2D matrix multiplication on two PyTorch tensors. |
## PyTorch wrapper - Reduction operation & Summary statistics
| Node | Description |
| --- | --- |
| [Pt Argmax](pt_argmax.md) | Computes the indices of the maximum values of a PyTorch tensor along the specified dimension(s). |
| [Pt Argmin](pt_argmin.md) | Computes the indices of the minimum values of a PyTorch tensor along the specified dimension(s). |
| [Pt Max](pt_max.md) | Computes the maximum values of a PyTorch tensor along the specified dimension(s). |
| [Pt Mean](pt_mean.md) | Computes the mean of a PyTorch tensor along the specified dimension(s). |
| [Pt Median](pt_median.md) | Computes the median of a PyTorch tensor along the specified dimension(s). |
| [Pt Min](pt_min.md) | Computes the minimum values of a PyTorch tensor along the specified dimension(s). |
| [Pt Prod](pt_prod.md) | Computes the product of a PyTorch tensor along the specified dimension(s). |
| [Pt Std](pt_std.md) | Computes the standard deviation of a PyTorch tensor along the specified dimension(s). |
| [Pt Sum](pt_sum.md) | Computes the sum of a PyTorch tensor along the specified dimension(s). |
| [Pt Var](pt_var.md) | Computes the variance of a PyTorch tensor along the specified dimension(s). |
## PyTorch wrapper - Size object support
| Node | Description |
| --- | --- |
| [Pt Size](pt_size.md) | Extracts the PyTorch Size object of a PyTorch tensor using the size() method. |
| [Pt Size Create](pt_size_create.md) | Creates a PyTorch Size using values entered in the text field. |
| [Pt Size To Numpy](pt_size_to_numpy.md) | Converts PyTorch Size object to NumPy ndarray. |
| [Pt Size To String](pt_size_to_string.md) | Converts PyTorch Size object to a Python string. |
## PyTorch wrapper - Tensor creation
| Node | Description |
| --- | --- |
| [Pt Arange](pt_arange.md) | Creates a PyTorch tensor using `torch.arange` with the specified start, end, and step values. |
| [Pt Bool Create](pt_bool_create.md) | Creates a PyTorch tensor of dtype bool from True or False values entered as a list in the text field. |
| [Pt Float Create](pt_float_create.md) | Creates a PyTorch tensor with 32-bit floating point precision |
| [Pt From Latent](pt_from_latent.md) | Casts a latent tensor as a PyTorch tensor. |
| [Pt From Numpy](pt_from_numpy.md) | Converts a NumPy ndarray to a PyTorch tensor while preserving its data type. |
| [Pt Full](pt_full.md) | Creates a PyTorch tensor filled with a specified value using the size entered in the text field. |
| [Pt Int Create](pt_int_create.md) | Creates a PyTorch tensor with 32-bit integer |
| [Pt Linspace](pt_linspace.md) | Creates a PyTorch tensor using `torch.linspace` with the specified start, end, and steps values. |
| [Pt Ones](pt_ones.md) | Creates a PyTorch tensor of ones using the size entered in the text field. |
| [Pt Rand](pt_rand.md) | Creates a PyTorch tensor with values sampled from a uniform distribution |
| [Pt Rand Int](pt_rand_int.md) | Creates a PyTorch tensor filled with random integers within a specified range using the size entered in the text field. |
| [Pt Randn](pt_randn.md) | Creates a PyTorch tensor with values sampled from a standard normal distribution (mean=0, std=1) |
| [Pt Zeros](pt_zeros.md) | Creates a PyTorch tensor of zeros using the size entered in the text field. |
## PyTorch wrapper - Tensor data conversion
| Node | Description |
| --- | --- |
| [Pt To Latent](pt_to_latent.md) | Casts a PyTorch tensor as a latent tensor. |
| [Pt To Numpy](pt_to_numpy.md) | Converts PyTorch tensor to NumPy ndarray. |
| [Pt To Rgb Tensors](pt_to_rgb_tensors.md) | Splits a PyTorch tensor into R, G, and B tensors. |
## PyTorch wrapper - Training
| Node | Description |
| --- | --- |
| [Pt Data Loader](pt_data_loader.md) | Loads data from a dataset node and creates a PyTorch DataLoader. |
| [Pt Evaluate Classification Model](pt_evaluate_classification_model.md) | Performs inference on test data and computes evaluation metrics. |
| [Pt Load Model](pt_load_model.md) | A wrapper class for saving a PyTorch model. |
| [Pt Predict Classification Model](pt_predict_classification_model.md) | Performs inference on input data. |
| [Pt Train Classification Model](pt_train_classification_model.md) | Trains a classification model using a given dataset, optimizer, and number of epochs. |
| [Ptn Conv Model](ptn_conv_model.md) | A convolutional model consisting of multiple convolutional layers. |
| [Ptn Linear Model](ptn_linear_model.md) | A linear model consisting of dense layers. |
| [Pto Adam](pto_adam.md) | Instantiates the Adam optimizer. |
| [Ptv Dataset](ptv_dataset.md) | A Torchvision Dataset class wrapper. |
| [Ptv Dataset Loader](ptv_dataset_loader.md) | A node to combine the dataset and data loader into a single node. |
| [Ptv Image Folder Dataset](ptv_image_folder_dataset.md) | A Torchvision ImageFolder Dataset class wrapper. |
| [Ptv Transforms Resize](ptv_transforms_resize.md) | Resizes and transforms elements of dataset to PyTorch tensors. |
| [Ptv Transforms To Tensor](ptv_transforms_to_tensor.md) | Transforms elements of dataset to PyTorch tensors. |
## PyTorch wrapper - Transform
| Node | Description |
| --- | --- |
| [Pt Flatten](pt_flatten.md) | Flattens a PyTorch tensor into a 1D tensor. |
| [Pt Permute](pt_permute.md) | Permutes the dimensions of a PyTorch tensor according to the specified order. |
| [Pt Reshape](pt_reshape.md) | Reshapes a PyTorch tensor into a specified shape using `torch.reshape()`. |
| [Pt Squeeze](pt_squeeze.md) | Removes a dimension at the specified position in the input tensor if it is of size 1. |
| [Pt Unsqueeze](pt_unsqueeze.md) | Adds a singleton dimension at the specified position in the input tensor. |
| [Pt View](pt_view.md) | Reshapes a PyTorch tensor into a specified shape using `torch.view()`. |
## Python wrapper
| Node | Description |
| --- | --- |
-17
View File
@@ -1,17 +0,0 @@
# Pt Abs
Computes the absolute value of each element in a PyTorch tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Acos
Computes the arccosine (inverse cosine) of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Add
Adds two PyTorch tensors.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-23
View File
@@ -1,23 +0,0 @@
# Pt Arange
Creates a PyTorch tensor using `torch.arange` with the specified start, end, and step values.
The values are parsed from string inputs and converted to numeric types. This allows users to specify
tensor range values in text fields. The function also ensures proper dtype selection.
## Input
| Name | Data type |
|---|---|
| start | String |
| end | String |
| step | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Argmax
Computes the indices of the maximum values of a PyTorch tensor along the specified dimension(s).
Specify the dimension in the `dim` field using an integer as shown below:
```
0
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Argmin
Computes the indices of the minimum values of a PyTorch tensor along the specified dimension(s).
Specify the dimension in the `dim` field using an integer as shown below:
```
0
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Asin
Computes the arcsine (inverse sine) of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Atan
Computes the arc tangent (inverse tangent) of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Bitwise And
Performs a bitwise AND operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Bitwise operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Bitwise Left Shift
Performs a bitwise left shift operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Bitwise operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Bitwise Not
Performs a bitwise NOT operation on a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Bitwise operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Bitwise Or
Performs a bitwise OR operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Bitwise operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Bitwise Right Shift
Performs a bitwise right shift operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Bitwise operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Bitwise Xor
Performs a bitwise XOR operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Bitwise operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Bmm
Performs batched matrix multiplication on two 3D PyTorch tensors.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Matrix operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-22
View File
@@ -1,22 +0,0 @@
# Pt Bool Create
Creates a PyTorch tensor of dtype bool from True or False values entered as a list in the text field.
For example, entering:
```
[True, False, False]
```
will create a 1D boolean tensor.
## Input
| Name | Data type |
|---|---|
| data | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Cos
Computes the cosine of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Cosh
Computes the hyperbolic cosine of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-23
View File
@@ -1,23 +0,0 @@
# Pt Crop
Crops a PyTorch tensor to the specified size. The input tensor must have a shape of (c, h, w) or (b, c, h, w).
In ComfyUI Analysis, the tensor data type is "TENSOR," while in ComfyUI, the type "IMAGE" is used. To pass image data from ComfyUI to a ComfyUI Analysis node (e.g., this interpolation node), first use the "Pt From Image" node to convert it to a tensor, then transpose the axes from (b, h, w, c) to (b, c, h, w) before passing it to this node.
This transposition can be performed using the "Pt Permute" node with (0, 2, 3, 1). To convert the output back to an image, apply "Pt Permute" with (0, 3, 1, 2) and then use the "Pt To Image" node.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| height | Int |
| width | Int |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-29
View File
@@ -1,29 +0,0 @@
# Pt Data Loader
Loads data from a dataset node and creates a PyTorch DataLoader.
**dataset**
Connect a PtvDataset node that provides the dataset.
**batch size**
Specifies the number of samples per batch.
**shuffle**
If True, shuffles the dataset before each epoch.
## Input
| Name | Data type |
|---|---|
| dataset | Ptvdataset |
| batch_size | Int |
| shuffle | Boolean |
| parameters | String |
## Output
| Data type |
|---|
| Ptdataloader |
<HR>
Category: PyTorch wrapper - Training
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Div
Divides one PyTorch tensor by another element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-26
View File
@@ -1,26 +0,0 @@
# Pt Einsum
Performs Tensor operations specified in the Einstein summation equation.
Specify Einstein summation notation in the first socket.
Specify two tensors in tens_a, tens_b. If you specify the third tensor, specify in tens_c.
Otherwise, leave the socket unconnected.
Sublist format is not supported.
## Input
| Name | Data type |
|---|---|
| equation | String |
| tens_a | Tensor |
| tens_b | Tensor |
| tens_c | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Matrix operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Eq
Tests whether two PyTorch tensors are equal element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Comparison operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
@@ -1,23 +0,0 @@
# Pt Evaluate Classification Model
Performs inference on test data and computes evaluation metrics.
## Input
| Name | Data type |
|---|---|
| model | Ptmodel |
| data_loader | Ptdataloader |
| use_gpu | Boolean |
## Output
| Data type |
|---|
| Float |
| Float |
| Float |
| Float |
| Int |
<HR>
Category: PyTorch wrapper - Training
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Exp
Performs an exponential operation on a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Flatten
Flattens a PyTorch tensor into a 1D tensor.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Transform
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Float Create
Creates a PyTorch tensor with 32-bit floating point precision
using values entered in the text field.
## Input
| Name | Data type |
|---|---|
| data | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Floor Div
Performs element-wise floor division on two PyTorch tensors.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt From Image
Casts an Image tensor as a PyTorch tensor.
## Input
| Name | Data type |
|---|---|
| image | Image |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt From Image Transpose
Casts an image tensor to a PyTorch tensor and transposes it from (H, W, C) to (C, H, W). For rank-4 inputs, the batch axis remains unchanged.
## Input
| Name | Data type |
|---|---|
| image | Image |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt From Latent
Casts a latent tensor as a PyTorch tensor.
## Input
| Name | Data type |
|---|---|
| latent | Latent |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt From Numpy
Converts a NumPy ndarray to a PyTorch tensor while preserving its data type.
## Input
| Name | Data type |
|---|---|
| array | Ndarray |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-21
View File
@@ -1,21 +0,0 @@
# Pt Full
Creates a PyTorch tensor filled with a specified value using the size entered in the text field.
For example, if you want to create a 4D tensor of batch size=2, channel=3, height=96, width=32 filled with 7, enter:
[2,3,96,32] for size and 7 for value.
## Input
| Name | Data type |
|---|---|
| value | String |
| size | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-59
View File
@@ -1,59 +0,0 @@
# Pt Gather
Generates a tensor based on the index tensor using PyTorch's `gather` function.
Specify the `dim` field using an integer to indicate the axis along which to gather elements.
Each input tensor element is selected based on the index tensor.
For example, consider the following input tensor:
```
[ [10, 20, 30, 40, 50],
[100, 200, 300, 400, 500]]
```
and the corresponding index tensor:
```
[ [0, 4, 3, 2, 0],
[4, 3, 0, 0, 0]]
```
If `dim = 0`, the function scans row-wise, treating each index value as a row index.
If `dim = 1`, it scans column-wise, interpreting each index value as a column index.
Let's analyze the case where `dim = 1`:
* Start at row 0, column 0.
* The index at this position is `index[0, 0] = 0`.
* PyTorch selects the value at position 0 from the array `[10, 20, 30, 40, 50]`, which is `10`.
* The result at this stage is:
```
[[10, ?, ?, ?, ?]
[?, ?, ?, ?, ?]]
```
* Moving to column 1: `index[0, 1] = 4`.
* The value at index 4 in `[10, 20, 30, 40, 50]` is `50`.
* The updated result is:
```
[[10, 50, ?, ?, ?]
[?, ?, ?, ?, ?]]
```
* Repeating this process for all elements constructs the final gathered tensor.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | Int |
| index | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Indexing and Slicing Operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Ge
Tests whether elements in the first PyTorch tensor are greater than or equal to the corresponding elements in the second tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Comparison operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Gt
Tests whether elements in the first PyTorch tensor are greater than the corresponding elements in the second tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Comparison operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-41
View File
@@ -1,41 +0,0 @@
# Pt Index Select
Extracts elements from the input tensor along a specified dimension using an index tensor.
`dim` specifies the dimension along which the selection occurs.
* For example, for 2D tensors:
** If `dim=0`, `index` selects rows.
** If `dim=1`, `index` selects columns (for 2D tensors).
`index` is a list of indices that will be converted into a tensor.
Example:
```
Input Tensor:
[[1, 2, 3],
[40, 50, 60],
[700, 800, 900]]
index = "[0, 2]"
dim = 0
Output Tensor:
[[1, 2, 3],
[700, 800, 900]]
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | Int |
| index | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Indexing and Slicing Operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Int Create
Creates a PyTorch tensor with 32-bit integer
using values entered in the text field.
## Input
| Name | Data type |
|---|---|
| data | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
@@ -1,23 +0,0 @@
# Pt Interpolate By Scale Factor
Resizes a PyTorch tensor using interpolation by scale factor. The input tensor must have a shape of (c, h, w) or (b, c, h, w).
In ComfyUI Analysis, the tensor data type is "TENSOR," while in ComfyUI, the type "IMAGE" is used. To pass image data from ComfyUI to a ComfyUI Analysis node (e.g., this interpolation node), first use the "Pt From Image" node to convert it to a tensor, then transpose the axes from (b, h, w, c) to (b, c, h, w) before passing it to this node.
This transposition can be performed using the "Pt Permute" node with (0, 2, 3, 1). To convert the output back to an image, apply "Pt Permute" with (0, 3, 1, 2) and then use the "Pt To Image" node.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| scale_factor | Float |
| mode | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Interpolate To Size
Resizes a PyTorch tensor using interpolation. The input tensor must have a shape of (c, h, w) or (b, c, h, w).
In ComfyUI Analysis, the tensor data type is "TENSOR," while in ComfyUI, the type "IMAGE" is used. To pass image data from ComfyUI to a ComfyUI Analysis node (e.g., this interpolation node), first use the "Pt From Image" node to convert it to a tensor, then transpose the axes from (b, h, w, c) to (b, c, h, w) before passing it to this node.
This transposition can be performed using the "Pt Permute" node with (0, 2, 3, 1). To convert the output back to an image, apply "Pt Permute" with (0, 3, 1, 2) and then use the "Pt To Image" node.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| height | Int |
| width | Int |
| mode | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Le
Tests whether elements in the first PyTorch tensor are less than or equal to the corresponding elements in the second tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Comparison operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-23
View File
@@ -1,23 +0,0 @@
# Pt Linspace
Creates a PyTorch tensor using `torch.linspace` with the specified start, end, and steps values.
The start and end values are parsed from string inputs and converted to a float.
The steps value is converted to an int.
## Input
| Name | Data type |
|---|---|
| start | String |
| end | String |
| steps | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Load Model
A wrapper class for saving a PyTorch model.
## Input
| Name | Data type |
|---|---|
| model | Ptmodel |
| model_path | String |
## Output
| Data type |
|---|
| Ptmodel |
<HR>
Category: PyTorch wrapper - Training
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Log
Computes the natural logarithm (log base e) of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Logical And
Performs a logical AND operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Logical operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Logical Not
Performs a logical NOT operation on a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Logical operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Logical Or
Performs a logical OR operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Logical operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Logical Xor
Performs a logical XOR operation on two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Logical operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Lt
Tests whether elements in the first PyTorch tensor are less than the corresponding elements in the second tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Comparison operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-34
View File
@@ -1,34 +0,0 @@
# Pt Masked Select
Extracts elements from the input tensor whose corresponding value in `masked_tens` is `True`.
Example:
```
Input Tensor:
[[1, 2, 3],
[40, 50, 60],
[700, 800, 900]]
Masked Tensor:
[[True, False, False],
[False, True, False],
[False, False, True]]
Output Tensor:
[1, 50, 900]
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| masked_tens | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Indexing and Slicing Operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Mat Mul
Performs matrix multiplication on two PyTorch tensors.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Matrix operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Max
Computes the maximum values of a PyTorch tensor along the specified dimension(s).
Specify the dimension(s) in the `dim` field using an integer, a list, or a tuple, as shown below:
```
0, [0], or (1, 2)
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-26
View File
@@ -1,26 +0,0 @@
# Pt Mean
Computes the mean of a PyTorch tensor along the specified dimension(s).
This node supports only floating-point or complex tensors as input.
Specify the dimension(s) in the `dim` field using an integer, a list, or a tuple, as shown below:
```
0, [0], or (1, 2)
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-29
View File
@@ -1,29 +0,0 @@
# Pt Median
Computes the median of a PyTorch tensor along the specified dimension(s).
Specify the dimension(s) in the `dim` field using an integer as shown below:
```
0
```
or
```
1
```
Note that PtMedian calls torch.median(), which returns the lower of the two numbers when the true median falls between them.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Min
Computes the minimum values of a PyTorch tensor along the specified dimension(s).
Specify the dimension(s) in the `dim` field using an integer, a list, or a tuple, as shown below:
```
0, [0], or (1, 2)
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Mm
Performs 2D matrix multiplication on two PyTorch tensors.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Matrix operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Mul
Multiplies two PyTorch tensors element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Ne
Tests whether two PyTorch tensors are not equal element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Comparison operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Neg
Computes the negation of each element in a PyTorch tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-20
View File
@@ -1,20 +0,0 @@
# Pt Ones
Creates a PyTorch tensor of ones using the size entered in the text field.
For example, if you want to create a 4D tensor of batch size=2, channel=3, height=96, width=32, enter:
[2,3,96,32]
## Input
| Name | Data type |
|---|---|
| size | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-23
View File
@@ -1,23 +0,0 @@
# Pt Pad
Pads a PyTorch tensor to the specified size. Padded area will be black. The input tensor must have a shape of (c, h, w) or (b, c, h, w).
In ComfyUI Analysis, the tensor data type is "TENSOR," while in ComfyUI, the type "IMAGE" is used. To pass image data from ComfyUI to a ComfyUI Analysis node (e.g., this interpolation node), first use the "Pt From Image" node to convert it to a tensor, then transpose the axes from (b, h, w, c) to (b, c, h, w) before passing it to this node.
This transposition can be performed using the "Pt Permute" node with (0, 2, 3, 1). To convert the output back to an image, apply "Pt Permute" with (0, 3, 1, 2) and then use the "Pt To Image" node.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| height | Int |
| width | Int |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-25
View File
@@ -1,25 +0,0 @@
# Pt Permute
Permutes the dimensions of a PyTorch tensor according to the specified order.
For example, if a tensor has shape (2, 3, 96, 32) and `new_axes="[0, 3, 1, 2]"`,
the output will have shape (2, 32, 3, 96).
Specify the new axis order in the `new_axes` field using brackets, as shown below:
```
[0, 3, 1, 2]
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| new_axes | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Transform
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Pow
Raises one PyTorch tensor to the power of another element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
@@ -1,22 +0,0 @@
# Pt Predict Classification Model
Performs inference on input data.
## Input
| Name | Data type |
|---|---|
| model | Ptmodel |
| inputs | Tensor |
| class_id_to_name_map | Pydict |
| use_gpu | Boolean |
## Output
| Data type |
|---|
| String |
| Int |
| Float |
<HR>
Category: PyTorch wrapper - Training
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-28
View File
@@ -1,28 +0,0 @@
# Pt Prod
Computes the product of a PyTorch tensor along the specified dimension(s).
Specify the dimension(s) in the `dim` field using an integer as shown below:
```
0
```
or
```
1
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-21
View File
@@ -1,21 +0,0 @@
# Pt Rand
Creates a PyTorch tensor with values sampled from a uniform distribution
using the size entered in the text field.
For example, if you want to create a 4D tensor of batch size=2, channel=3, height=96, width=32, enter:
[2,3,96,32]
## Input
| Name | Data type |
|---|---|
| size | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-22
View File
@@ -1,22 +0,0 @@
# Pt Rand Int
Creates a PyTorch tensor filled with random integers within a specified range using the size entered in the text field.
For example, if you want to create a 4D tensor of batch size=2, channel=3, height=96, width=32 with random integers in the range [0, 10),
enter [2,3,96,32] for size, 0 for min_value, and 10 for max_value.
## Input
| Name | Data type |
|---|---|
| min_value | Int |
| max_value | Int |
| size | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-21
View File
@@ -1,21 +0,0 @@
# Pt Randn
Creates a PyTorch tensor with values sampled from a standard normal distribution (mean=0, std=1)
using the size entered in the text field.
For example, if you want to create a 4D tensor of batch size=2, channel=3, height=96, width=32, enter:
[2,3,96,32]
## Input
| Name | Data type |
|---|---|
| size | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Remainder
Computes the element-wise remainder of division between two PyTorch tensors.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-27
View File
@@ -1,27 +0,0 @@
# Pt Reshape
Reshapes a PyTorch tensor into a specified shape using `torch.reshape()`.
The total number of elements must remain unchanged.
For example, if a tensor has shape (2, 3, 4), and `new_shape="[6, 4]"`,
the output will have shape (6, 4).
Use -1 to automatically infer a dimension, e.g.:
```
[2, -1]
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| new_shape | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Transform
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Save Model
A wrapper class for saving a PyTorch model.
## Input
| Name | Data type |
|---|---|
| model | Ptmodel |
| model_path | String |
## Output
| Data type |
|---|
| String |
<HR>
Category: IO
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Scatter
Generates a new tensor by replacing values at specified positions using an index tensor.
* Target tensor (tens): Some of whose values are replaced.
* Source tensor (src): Values from this tensor replace a part or whole of the target tensor.
* Index tensor (index): Specifies the positions in the target tensor for replacement.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | Int |
| index | String |
| src | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Indexing and Slicing Operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Show Size
Displays PyTorch Size object as a string.
## Input
| Name | Data type |
|---|---|
| size | Ptsize |
## Output
| Data type |
|---|
| String |
<HR>
Category: Display data
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Show Text
Displays PyTorch tensor as a string. Note that the tensor is partially printed out when
the tensor contains more elements than the threshold set internally.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| String |
<HR>
Category: Display data
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Sin
Computes the sine of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Sinh
Computes the hyperbolic sine of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Size
Extracts the PyTorch Size object of a PyTorch tensor using the size() method.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Ptsize |
<HR>
Category: PyTorch wrapper - Size object support
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Size Create
Creates a PyTorch Size using values entered in the text field.
## Input
| Name | Data type |
|---|---|
| data | String |
## Output
| Data type |
|---|
| Ptsize |
<HR>
Category: PyTorch wrapper - Size object support
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Size To Numpy
Converts PyTorch Size object to NumPy ndarray.
## Input
| Name | Data type |
|---|---|
| sz | Ptsize |
## Output
| Data type |
|---|
| Ndarray |
<HR>
Category: PyTorch wrapper - Size object support
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Size To String
Converts PyTorch Size object to a Python string.
## Input
| Name | Data type |
|---|---|
| sz | Ptsize |
## Output
| Data type |
|---|
| String |
<HR>
Category: PyTorch wrapper - Size object support
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Sqrt
Computes the square root of each element in a PyTorch tensor.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-20
View File
@@ -1,20 +0,0 @@
# Pt Squeeze
Removes a dimension at the specified position in the input tensor if it is of size 1.
Specifying a tuple of dimensions is not supported yet.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | Int |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Transform
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-28
View File
@@ -1,28 +0,0 @@
# Pt Std
Computes the standard deviation of a PyTorch tensor along the specified dimension(s).
Specify 1 to use Bessel's correction (N-1) for sample standard deviation.
Specify 0 to compute population standard deviation.
Specify the dimension(s) in the `dim` field using an integer, a list, or a tuple, as shown below:
```
0, [0], or (1, 2)
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| correction | Int |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-18
View File
@@ -1,18 +0,0 @@
# Pt Sub
Subtracts one PyTorch tensor from another.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
| tens_b | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Arithmetic operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-24
View File
@@ -1,24 +0,0 @@
# Pt Sum
Computes the sum of a PyTorch tensor along the specified dimension(s).
Specify the dimension(s) in the `dim` field using an integer, a list, or a tuple, as shown below:
```
0, [0], or (1, 2)
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Tan
Computes the tangent of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt Tanh
Computes the hyperbolic tangent of a PyTorch tensor element-wise.
## Input
| Name | Data type |
|---|---|
| tens_a | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Math operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt To Image
Casts a PyTorch tensor as an Image tensor.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Image |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt To Image Transpose
Casts a PyTorch tensor as an Image tensor and transposes it from (C, H, W) to (H, W, C). For rank-4 inputs, the batch axis remains unchanged.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Image |
<HR>
Category: PyTorch wrapper - Image processing
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt To Latent
Casts a PyTorch tensor as a latent tensor.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Latent |
<HR>
Category: PyTorch wrapper - Tensor data conversion
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-17
View File
@@ -1,17 +0,0 @@
# Pt To Numpy
Converts PyTorch tensor to NumPy ndarray.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Ndarray |
<HR>
Category: PyTorch wrapper - Tensor data conversion
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-19
View File
@@ -1,19 +0,0 @@
# Pt To Rgb Tensors
Splits a PyTorch tensor into R, G, and B tensors.
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
## Output
| Data type |
|---|
| Tensor |
| Tensor |
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor data conversion
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
@@ -1,24 +0,0 @@
# Pt Train Classification Model
Trains a classification model using a given dataset, optimizer, and number of epochs.
## Input
| Name | Data type |
|---|---|
| model | Ptmodel |
| train_loader | Ptdataloader |
| optimizer | Ptoptimizer |
| epochs | Int |
| use_gpu | Boolean |
| val_loader | Ptdataloader |
## Output
| Data type |
|---|
| Ptmodel |
| Tensor |
| Tensor |
<HR>
Category: PyTorch wrapper - Training
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-19
View File
@@ -1,19 +0,0 @@
# Pt Unsqueeze
Adds a singleton dimension at the specified position in the input tensor.
For example, if a tensor has shape (3, 4) and `dim=1`, the output will have shape (3, 1, 4).
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| dim | Int |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Transform
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-28
View File
@@ -1,28 +0,0 @@
# Pt Var
Computes the variance of a PyTorch tensor along the specified dimension(s).
Specify 1 to use Bessel's correction (N-1) for sample variance.
Specify 0 to compute population variance.
Specify the dimension(s) in the `dim` field using an integer, a list, or a tuple, as shown below:
```
0, [0], or (1, 2)
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| correction | Int |
| dim | String |
| keepdim | Boolean |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Reduction operation & Summary statistics
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-27
View File
@@ -1,27 +0,0 @@
# Pt View
Reshapes a PyTorch tensor into a specified shape using `torch.view()`.
The total number of elements must remain unchanged.
For example, if a tensor has shape (2, 3, 4), and `new_shape="[6, 4]"`,
the output will have shape (6, 4).
Use -1 to automatically infer a dimension, e.g.:
```
[2, -1]
```
## Input
| Name | Data type |
|---|---|
| tens | Tensor |
| new_shape | String |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Transform
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-23
View File
@@ -1,23 +0,0 @@
# Pt Where
Generates a new tensor by selecting values based on a condition tensor.
* `condition_tens` (torch.Tensor): Boolean tensor that determines which values are selected.
* `true_tens` (torch.Tensor): Values to use where the condition is `True`.
* `false_tens` (torch.Tensor): Values to use where the condition is `False`.
## Input
| Name | Data type |
|---|---|
| condition_tens | Tensor |
| true_tens | Tensor |
| false_tens | Tensor |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Indexing and Slicing Operations
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-20
View File
@@ -1,20 +0,0 @@
# Pt Zeros
Creates a PyTorch tensor of zeros using the size entered in the text field.
For example, if you want to create a 4D tensor of batch size=2, channel=3, height=96, width=32, enter:
[2,3,96,32]
## Input
| Name | Data type |
|---|---|
| size | String |
| data_type | |
## Output
| Data type |
|---|
| Tensor |
<HR>
Category: PyTorch wrapper - Tensor creation
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
-45
View File
@@ -1,45 +0,0 @@
# Ptn Conv Model
A convolutional model consisting of multiple convolutional layers.
### Fields:
- `input_dim`: A string representing the input dimensions in the format "(C,H,W)".
Example: `"(3,28,28)"` for a 3-channel 28x28 image.
- `penultimate_dim`: An integer specifying the number of features before the output layer. If you specify 0, the number is computed internally.
Default: `0`
- `output_dim`: An integer specifying the number of output features, which should match the number of target classes in classification.
Default: `10`, Min: `1`, Max: `1e6`.
- `channel_list`: A string representing a Python list of integers specifying the number of channels per layer excluding the channel for the input (e.g. 3 for the color image).
Example: `"[32,64,128,256,512]"`.
- `kernel_size_list`: A string representing a Python list of kernel sizes per layer.
Example: `"[3,3,3,3,1]"`.
- `padding_list`: A string representing a Python list of padding values per layer.
Example: `"[1,1,1,1,0]"`.
- `downsample_list`: A string representing a Python list of boolean values indicating whether to downsample at each layer.
Example: `"[True,True,True,True,False]"`.
## Input
| Name | Data type |
|---|---|
| input_dim | String |
| penultimate_dim | Int |
| output_dim | Int |
| channel_list | String |
| kernel_size_list | String |
| padding_list | String |
| downsample_list | String |
## Output
| Data type |
|---|
| Ptmodel |
<HR>
Category: PyTorch wrapper - Training
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.

Some files were not shown because too many files have changed in this diff Show More