Files
CavinHuang-comfyui-nodes-docs/docs/ttN seed.md
2024-07-04 08:39:03 +08:00

1.7 KiB

Documentation

ttN_SEED节点专门用于管理和使用种子值,以确保在不同运行中产生一致且可重现的结果。它是需要确定性输出的过程中的基础元素。

Input types

Required

  • seed
    • seed参数用于设置数字生成的特定起点,使操作能够产生确定性行为。它在确保结果可重现性方面起着至关重要的作用。
    • Comfy dtype: INT
    • Python dtype: int

Output types

  • seed
    • 此输出代表操作中使用的种子值,允许对过程进行追踪和重现。
    • Comfy dtype: INT
    • Python dtype: int

Usage tips

Source code

class ttN_SEED:
    version = '1.0.0'
    def __init__(self):
        pass

    @classmethod
    def INPUT_TYPES(s):
        return {"required": {
                    "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
                },
                "hidden": {"ttNnodeVersion": ttN_SEED.version},
        }

    RETURN_TYPES = ("INT",)
    RETURN_NAMES = ("seed",)
    FUNCTION = "plant"
    OUTPUT_NODE = True

    CATEGORY = "ttN/util"

    @staticmethod
    def plant(seed):
        return seed,