Extensive collection of PyTorch wrapper custom nodes for ComfyUI
Extensive collection of PyTorch wrapper custom nodes for ComfyUI
Perfil del paquete
Léeme
Extensive collection of PyTorch wrapper custom nodes for ComfyUI
Nodos de este paquete
100 nodosFuentes
1 fuenteExtractos de fuentes
1 extractoSource context: Repo HowToSD/ComfyUI-Pt-Wrapper
HfTokenizerEncode
Hugging Face tokenizer wrapper for encoding text into token ID tensors. Args: modelname (str): Name of the model. padding (bool): Whether to pad sequences to equal length. paddingmethod (str): 'longest' or 'maxlength'. - 'longest': pad to the longest sequence length after truncation in this batch. - 'maxlength': pad all sequences to the fixed length maxlength. truncation (bool): Whether to truncate sequences to maxlength. maxlength (int): The target length for truncation or padding. If you specify 0, it uses model's maximum input length. Returns: PTCALLABLE: A tuple containing a callable that accepts a sentence or list of sentences and returns token ID tensor(s) and attention mask(s). | Name | Data type | |---|---| | modelname | String | | padding | Boolean | | paddingmethod | | | truncation | Boolean | | maxlength | Int | | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 4 parámetros
PtAbs
Computes the absolute value of each element in a PyTorch tensor. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtAcos
Computes the arccosine (inverse cosine) of a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtAdd
Adds two PyTorch tensors. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Arithmetic operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtApplyFunction
Applies a function to the input tensor. - tens: Tensor to which the function be applied. - closure: Differentiable function to apply to the tensor. | Name | Data type | |---|---| | tens | Tensor | | closure | Ptcallable | | Data type | |---| | Tensor | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtArange
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. | Name | Data type | |---|---| | start | String | | end | String | | step | String | | datatype | | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 3 parámetros
PtArgmax
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 | Name | Data type | |---|---| | tens | Tensor | | dim | String | | keepdim | Boolean | | Data type | |---| | Tensor | Category: PyTorch wrapper - Reduction operation & Summary statistics ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtArgmin
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 | Name | Data type | |---|---| | tens | Tensor | | dim | String | | keepdim | Boolean | | Data type | |---| | Tensor | Category: PyTorch wrapper - Reduction operation & Summary statistics ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtAsin
Computes the arcsine (inverse sine) of a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtAtan
Computes the arc tangent (inverse tangent) of a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtBitwiseAnd
Performs a bitwise AND operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Bitwise operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtBitwiseLeftShift
Performs a bitwise left shift operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Bitwise operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtBitwiseNot
Performs a bitwise NOT operation on a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Bitwise operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtBitwiseOr
Performs a bitwise OR operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Bitwise operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtBitwiseRightShift
Performs a bitwise right shift operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Bitwise operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtBitwiseXor
Performs a bitwise XOR operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Bitwise operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtBmm
Performs batched matrix multiplication on two 3D PyTorch tensors. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Matrix operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtBoolCreate
Creates a PyTorch tensor of dtype bool from True or False values entered as a list in the text field. For example, entering: will create a 1D boolean tensor. | Name | Data type | |---|---| | data | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtComputeLoss
Computes loss for the input with the target using the specified loss function. The user does not normally need to use this node. Instead the user should use training nodes that accept a loss object. | Name | Data type | |---|---| | inputtens | Tensor | | targettens | Tensor | | loss | Ptloss | | Data type | |---| | Tensor | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
3 entradas · 0 parámetros
PtConcat
Concatenates two PyTorch tensors. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | dim | Int | | Data type | |---| | Tensor | Category: PyTorch wrapper - Transform ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 1 parámetro
PtCos
Computes the cosine of a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtCosh
Computes the hyperbolic cosine of a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtCrop
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. | Name | Data type | |---|---| | tens | Tensor | | height | Int | | width | Int | | Data type | |---| | Tensor | Category: PyTorch wrapper - Image processing ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtDataLoader
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. | Name | Data type | |---|---| | dataset | Ptvdataset | | batchsize | Int | | shuffle | Boolean | | parameters | String | | Data type | |---| | Ptdataloader | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 3 parámetros
PtDataLoaderFromTensors
Creates a Torchvision Dataloader from a pair of tensors. Parameters x Specify a tensor name that contains x. y Specify a tensor name that contains y. | Name | Data type | |---|---| | x | Tensor | | y | Tensor | | batchsize | Int | | shuffle | Boolean | | Data type | |---| | Ptdataloader | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 2 parámetros
PtdBernoulli
Instantiates a Bernoulli distribution object. Args: probs (str): Probabilities of the distsribution. You can specify a scalar or a tuple of float. logits (str): Logits of the distribution. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | probs | String | | logits | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 2 parámetros
PtdBeta
Instantiates a Beta distribution object. Args: alpha: The alpha parameter of the distsribution. You can specify a scalar or a tuple of float. beta: The beta parameter of the distribution. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | alpha | String | | beta | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 2 parámetros
PtdBinomial
Instantiates a Binomial distribution object. Args: totalcount (str): Total count, or n. You can specify a scalar or a tuple of int. probs (str): Probabilities of the distsribution. You can specify a scalar or a tuple of float. logits (str): Logits of the distribution. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | totalcount | String | | probs | String | | logits | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 3 parámetros
PtdCategorical
Instantiates a Categorical distribution object from the input probabilities or logits. You have to specify one of them and not both. Args: probs (str): Probabilities of the distsribution. You can specify a scalar or a tuple of float. logits (str): Logits of the distribution. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | probs | String | | logits | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 2 parámetros
PtdChi2
Instantiates a Chi-squared distribution object. Args: df (str): Degree of freedom. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | df | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtdExponential
Instantiates a Exponential distribution object. Args: rate (str): Rate. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | rate | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtdGamma
Instantiates a Gamma distribution object. Args: alpha: Shape. You can specify a scalar or a tuple of float. beta: Rate. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | alpha | String | | beta | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 2 parámetros
PtDiv
Divides one PyTorch tensor by another element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Arithmetic operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtdmCdf
Computes the cumulative distribution function for the input distribution. Note Cdf is not supported for all distributions in PyTorch. Args: distribution (torch.distributions.distribution.Distribution): Distribution. x (float): Value | Name | Data type | |---|---| | distribution | Ptdistribution | | x | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtdmCdfTensor
Computes the cumulative distribution function for the input distribution. This nodes accepts a tensor so it can be used to compute cdf for multiple values contained in a tensor. Note Cdf is not supported for all distributions in PyTorch. Args: distribution (torch.distributions.distribution.Distribution): Distribution. tens (torch.Tensor): Value(s) in Tensor. | Name | Data type | |---|---| | distribution | Ptdistribution | | tens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtdmIcdf
Computes the inverse of the cumulative distribution function for the input distribution. Note Icdf is not supported for all distributions in PyTorch. Args: distribution (torch.distributions.distribution.Distribution): Distribution. q (float): Value | Name | Data type | |---|---| | distribution | Ptdistribution | | q | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtdmIcdfTensor
Computes the inverse of cumulative distribution function for the input distribution. This nodes accepts a tensor so it can be used to compute cdf for multiple values contained in a tensor. Note Icdf is not supported for all distributions in PyTorch. Args: distribution (torch.distributions.distribution.Distribution): Distribution. tens (torch.Tensor): q in Tensor. | Name | Data type | |---|---| | distribution | Ptdistribution | | tens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtdmLogProb
Computes the log of probability for the input distribution. Args: distribution (torch.distributions.distribution.Distribution): Distribution. value (Union[int,float]): Value (Number of successes for PMF). | Name | Data type | |---|---| | distribution | Ptdistribution | | x | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtdmLogProbTensor
Computes the log of probability for the input distribution. This nodes accepts a tensor so it can be used to compute log of probability for multiple values contained in a tensor. Args: distribution (torch.distributions.distribution.Distribution): Distribution. tens (torch.Tensor): Value(s) in Tensor. | Name | Data type | |---|---| | distribution | Ptdistribution | | tens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtdmPdf
Computes the probability density for the input distribution. Args: distribution (torch.distributions.distribution.Distribution): Distribution. x (float): Value | Name | Data type | |---|---| | distribution | Ptdistribution | | x | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtdmPdfTensor
Computes the probability density for the input distribution. This nodes accepts a tensor so it can be used to compute pdf for multiple values contained in a tensor. Args: distribution (torch.distributions.distribution.Distribution): Distribution. tens (torch.Tensor): Value(s) in Tensor. | Name | Data type | |---|---| | distribution | Ptdistribution | | tens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtdmPmf
Computes the probability for the input distribution. Args: distribution (torch.distributions.distribution.Distribution): Distribution. k (int): Number of successes. | Name | Data type | |---|---| | distribution | Ptdistribution | | k | Int | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtdmPmfTensor
Computes the probability for the input distribution. This nodes accepts a tensor so it can be used to compute pmf for multiple values contained in a tensor. Args: distribution (torch.distributions.distribution.Distribution): Distribution. tens (torch.Tensor): k(s) in Tensor. | Name | Data type | |---|---| | distribution | Ptdistribution | | tens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtdmSample
Samples from the input distribution. Args: distribution (torch.distributions.distribution.Distribution): Distribution. sampleshape (torch.Size): Shape of the sample. | Name | Data type | |---|---| | distribution | Ptdistribution | | sampleshape | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtdNormal
Instantiates a Normal distribution object. Args: loc: Mean of the distsribution. You can specify a scalar or a tuple of float. scale: Standard deviation of the distribution. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | loc | String | | scale | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 2 parámetros
PtdPoisson
Instantiates a Poisson distribution object. Args: rate (str): Rate. You can specify a scalar or a tuple of int. | Name | Data type | |---|---| | rate | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtdStudentT
Instantiates a StudentT distribution object. Args: df (str): Degree of freedom. You can specify a scalar or a tuple of float. loc (str): Rate. Mean of the distsribution. You can specify a scalar or a tuple of float. scale (str): Rate. Scale of the distribution. You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | df | String | | loc | String | | scale | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 3 parámetros
PtdUniform
Instantiates a Uniform distribution object. Args: low (str): Minimum (inclusive). You can specify a scalar or a tuple of float. high (str): Maximum (exclusive). You can specify a scalar or a tuple of float. | Name | Data type | |---|---| | low | String | | high | String | | Data type | |---| | Ptdistribution | Category: PyTorch wrapper - Distribution ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 2 parámetros
PtEinsum
Performs Tensor operations specified in the Einstein summation equation. Specify Einstein summation notation in the first socket. Specify two tensors in tensa, tensb. If you specify the third tensor, specify in tensc. Otherwise, leave the socket unconnected. Sublist format is not supported. | Name | Data type | |---|---| | equation | String | | tensa | Tensor | | tensb | Tensor | | tensc | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Matrix operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
3 entradas · 1 parámetro
PtEq
Tests whether two PyTorch tensors are equal element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Comparison operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtEvaluateClassificationModel
Performs inference on test data and computes evaluation metrics. | Name | Data type | |---|---| | model | Ptmodel | | dataloader | Ptdataloader | | usegpu | Boolean | | Data type | |---| | Float | | Float | | Float | | Float | | Int | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 1 parámetro
PtExp
Performs an exponential operation on a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtfGELU
The GELU activation function. This class provides a callable that applies the GELU activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtFlatten
Flattens a PyTorch tensor into a 1D tensor. | Name | Data type | |---|---| | tens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Transform ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtfLeakyReLU
The LeakyReLU activation function. This class provides a callable that applies the LeakyReLU activation function from torch.nn.functional. | Name | Data type | |---|---| | negativeslope | Float | | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtFloatCreate
Creates a PyTorch tensor with 32-bit floating point precision using values entered in the text field. | Name | Data type | |---|---| | data | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtfLogSoftmax
The log softmax activation function. This class provides a callable that applies the logsoftmax activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtFloorDiv
Performs element-wise floor division on two PyTorch tensors. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Arithmetic operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtfReLU
The ReLU activation function. This class provides a callable that applies the ReLU activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtFromImage
Casts an Image tensor as a PyTorch tensor. | Name | Data type | |---|---| | image | Image | | Data type | |---| | Tensor | Category: PyTorch wrapper - Image processing ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtFromImageTranspose
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. | Name | Data type | |---|---| | image | Image | | Data type | |---| | Tensor | Category: PyTorch wrapper - Image processing ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtFromLatent
Casts a latent tensor as a PyTorch tensor. | Name | Data type | |---|---| | latent | Latent | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtFromNumpy
Converts a NumPy ndarray to a PyTorch tensor while preserving its data type. | Name | Data type | |---|---| | array | Ndarray | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtfSigmoid
The sigmoid activation function. This class provides a callable that applies the sigmoid activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtfSiLU
The SiLU activation function. This class provides a callable that applies the SiLU activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtfSoftmax
The softmax activation function. This class provides a callable that applies the softmax activation function from torch.nn.functional. Internally, this node calls torch.nn.functional.softmax(dim=-1). See https://github.com/pytorch/pytorch/issues/1020 to find out more about the meaning of dim. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtfSoftplus
The Softplus activation function. This class provides a callable that applies the Softplus activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtfTanh
The tanh activation function. This class provides a callable that applies the tanh activation function from torch.nn.functional. | Data type | |---| | Ptcallable | Category: PyTorch wrapper - Callable ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
PtFull
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: | Name | Data type | |---|---| | value | String | | size | String | | datatype | | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtGather
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: and the corresponding index tensor: 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: 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: Repeating this process for all elements constructs the final gathered tensor. | Name | Data type | |---|---| | tens | Tensor | | dim | Int | | index | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Indexing and Slicing Operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtGe
Tests whether elements in the first PyTorch tensor are greater than or equal to the corresponding elements in the second tensor. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Comparison operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtGt
Tests whether elements in the first PyTorch tensor are greater than the corresponding elements in the second tensor. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Comparison operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtIndexSelect
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: index = "[0, 2]" dim = 0 Output Tensor: | Name | Data type | |---|---| | tens | Tensor | | dim | Int | | index | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Indexing and Slicing Operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtIntCreate
Creates a PyTorch tensor with 32-bit integer using values entered in the text field. | Name | Data type | |---|---| | data | String | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 1 parámetro
PtInterpolateByScaleFactor
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. | Name | Data type | |---|---| | tens | Tensor | | scalefactor | Float | | mode | | | Data type | |---| | Tensor | Category: PyTorch wrapper - Image processing ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 1 parámetro
PtInterpolateToSize
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. | Name | Data type | |---|---| | tens | Tensor | | height | Int | | width | Int | | mode | | | Data type | |---| | Tensor | Category: PyTorch wrapper - Image processing ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 2 parámetros
PtLe
Tests whether elements in the first PyTorch tensor are less than or equal to the corresponding elements in the second tensor. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Comparison operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtLinspace
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. | Name | Data type | |---|---| | start | String | | end | String | | steps | String | | datatype | | | Data type | |---| | Tensor | Category: PyTorch wrapper - Tensor creation ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 3 parámetros
PtLoadModel
A wrapper class for saving a PyTorch model. | Name | Data type | |---|---| | model | Ptmodel | | modelpath | String | | Data type | |---| | Ptmodel | Category: PyTorch wrapper - Training ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 1 parámetro
PtLog
Computes the natural logarithm (log base e) of a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Math operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtLogicalAnd
Performs a logical AND operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Logical operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtLogicalNot
Performs a logical NOT operation on a PyTorch tensor element-wise. | Name | Data type | |---|---| | tensa | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Logical operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtLogicalOr
Performs a logical OR operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Logical operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtLogicalXor
Performs a logical XOR operation on two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Logical operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtLt
Tests whether elements in the first PyTorch tensor are less than the corresponding elements in the second tensor. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Comparison operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtMaskedSelect
Extracts elements from the input tensor whose corresponding value in maskedtens is True. Example: Input Tensor: Masked Tensor: Output Tensor: | Name | Data type | |---|---| | tens | Tensor | | maskedtens | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Indexing and Slicing Operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtMatMul
Performs matrix multiplication on two PyTorch tensors. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Matrix operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtMax
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) | Name | Data type | |---|---| | tens | Tensor | | dim | String | | keepdim | Boolean | | Data type | |---| | Tensor | Category: PyTorch wrapper - Reduction operation & Summary statistics ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtMean
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) | Name | Data type | |---|---| | tens | Tensor | | dim | String | | keepdim | Boolean | | Data type | |---| | Tensor | Category: PyTorch wrapper - Reduction operation & Summary statistics ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtMedian
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. | Name | Data type | |---|---| | tens | Tensor | | dim | String | | keepdim | Boolean | | Data type | |---| | Tensor | Category: PyTorch wrapper - Reduction operation & Summary statistics ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtMin
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) | Name | Data type | |---|---| | tens | Tensor | | dim | String | | keepdim | Boolean | | Data type | |---| | Tensor | Category: PyTorch wrapper - Reduction operation & Summary statistics ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 2 parámetros
PtMm
Performs 2D matrix multiplication on two PyTorch tensors. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Matrix operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtMul
Multiplies two PyTorch tensors element-wise. | Name | Data type | |---|---| | tensa | Tensor | | tensb | Tensor | | Data type | |---| | Tensor | Category: PyTorch wrapper - Arithmetic operations ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
2 entradas · 0 parámetros
PtnAvgPool2d
An avgpool layer. Args: kernelsize (str): The size of the kernel stride (str): The stride to be used for sliding the kernel padding (str): The amount of padding added to the input | Name | Data type | |---|---| | kernelsize | String | | stride | String | | padding | String | | Data type | |---| | Ptmodel | Category: PyTorch wrapper - Model ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 3 parámetros
PtnBatchNorm2d
A normalization model to normalize over the batch and spatial axes for each channel. Args: numfeatures (int): Specifies the size of channel axis. - For an image input of shape [8, 4, 256, 256], specify 4. affine (bool): If True, applies a learnable scaling factor and bias to the normalized elements. trackrunningstats (bool): If True, use exponential moving average (EMA) to store mean and std to be used in eval for normalization. For training, current batch statistics are always used for mean and std irrespective of this flag. momentum (float): The EMA coefficient used if trackrunningstats is set to True. Higher values give more weight to the current batch statistics, while lower values retain more past statistics. | Name | Data type | |---|---| | numfeatures | Int | | affine | Boolean | | trackrunningstats | Boolean | | momentum | Float | | Data type | |---| | Ptmodel | Category: PyTorch wrapper - Model ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
0 entradas · 4 parámetros
PtnBCELoss
A class to compute the binary cross entropy loss. Unlike the Ptn BCE Loss With Logits node, which takes logits as input, this node expects probabilities. If the input consists of logits, apply a Sigmoid function first or use the Ptn BCE Loss With Logits node instead. Args: reduction (str): Reduction method. none: no reduction will be applied done. mean: computes the mean. sum: computes the sum. | Name | Data type | |---|---| | reduction | | | Data type | |---| | Ptloss | Category: PyTorch wrapper - Loss function ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtnBCEWithLogitsLoss
A class to compute the sigmoid then binary cross entropy loss. Args: reduction (str): Reduction method. none: no reduction will be applied done. mean: computes the mean. sum: computes the sum. | Name | Data type | |---|---| | reduction | | | Data type | |---| | Ptloss | Category: PyTorch wrapper - Loss function ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 0 parámetros
PtnChainedModel
Constructs a chained PyTorch model. - modela: First model in the chain. - modelb: Second model in the chain. - closure: Optional differentiable function to be called at the end of forward. | Name | Data type | |---|---| | modela | Ptmodel | | modelb | Ptmodel | | closure | Ptcallable | | Data type | |---| | Ptmodel | Category: PyTorch wrapper - Model ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
3 entradas · 0 parámetros
PtnChainedModelWithAttentionMask
A chained model that sequentially applies modela and modelb, optionally followed by a closure function. - modela: First model in the chain. - modelb: Second model in the chain. - modelamaskreq: True if modela requires attentionmask for input - modelbmaskreq: True if modelb requires attentionmask for input - closure: Optional differentiable function to be called at the end of forward. | Name | Data type | |---|---| | modela | Ptmodel | | modelb | Ptmodel | | modelamaskreq | Boolean | | modelbmaskreq | Boolean | | closure | Ptcallable | | Data type | |---| | Ptmodel | Category: PyTorch wrapper - Model ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
3 entradas · 2 parámetros
PtnConv2d
A convolutional model consisting of a single conv2d layer. Args: inchannels (int): The number of input channels outchannels (int): The number of output channels kernelsize (str): The size of the kernel stride (str): The stride to be used for sliding the kernel padding (str): The amount of padding added to the input dilation (str): The distance between adjacent elements in the kernel to adjust receptive fields. groups (str): The number of groups used to divide input and output channels for separate processing. bias (bool): If True, adds a learnable bias to the output paddingmode (str): Specifies how padding values are set in the input before convolution. t. bias (bool): Use bias or not. | Name | Data type | |---|---| | inchannels | Int | | outchannels | Int | | kernelsize | String | | stride | String | | padding | String | | dilation | String | | groups | Int | | bias | Boolean | | paddingmode | | | Data type | |---| | Ptmodel | Category: PyTorch wrapper - Model ComfyUI Pt Wrapper Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.
1 entrada · 8 parámetros