Skip to content

Int Literal

Documentation

  • Class name: Int Literal
  • Category: ImageSaverTools/utils
  • Output node: False

The Int Literal node is designed to provide a simple interface for generating integer literals within the ImageSaverTools/utils category. It allows users to specify an integer value directly, facilitating operations that require explicit integer inputs.

Input types

Required

  • int
    • Specifies the integer value to be generated by the node. This parameter enables the direct input of integers, making it essential for operations that require specific numeric values.
    • Comfy dtype: INT
    • Python dtype: int

Output types

  • int
    • Comfy dtype: INT
    • Outputs the integer value specified by the input parameter. This output is crucial for operations requiring explicit integer values.
    • Python dtype: int

Usage tips

Source code

class IntLiteral:
    RETURN_TYPES = ("INT",)
    FUNCTION = "get_int"
    CATEGORY = "ImageSaverTools/utils"

    @classmethod
    def INPUT_TYPES(cls):
        return {"required": {"int": ("INT", {"default": 0, "min": 0, "max": 1000000})}}

    def get_int(self, int):
        return (int,)