Add global seed node
This commit is contained in:
+23
@@ -317,6 +317,27 @@ class SxCPSeedControl:
|
||||
)
|
||||
|
||||
|
||||
class SxCPGlobalSeed:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
seed_spec = {"default": 20260614, "min": 0, "max": 0xFFFFFFFF, "step": 1}
|
||||
return {
|
||||
"required": {
|
||||
"global_seed": ("INT", seed_spec),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("INT", "STRING", "STRING")
|
||||
RETURN_NAMES = ("seed", "seed_config", "summary")
|
||||
FUNCTION = "build"
|
||||
CATEGORY = "prompt_builder"
|
||||
|
||||
def build(self, global_seed):
|
||||
seed = max(0, min(0xFFFFFFFF, int(global_seed)))
|
||||
config = build_seed_lock_config_json(base_seed=seed, reroll_axis="none", reroll_seed=-1)
|
||||
return seed, config, f"global seed {seed}; all axes locked"
|
||||
|
||||
|
||||
class SxCPSeedLocker:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
@@ -1457,6 +1478,7 @@ class SxCPInstaOFPromptPair:
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"SxCPPromptBuilder": SxCPPromptBuilder,
|
||||
"SxCPGlobalSeed": SxCPGlobalSeed,
|
||||
"SxCPSeedControl": SxCPSeedControl,
|
||||
"SxCPSeedLocker": SxCPSeedLocker,
|
||||
"SxCPCameraControl": SxCPCameraControl,
|
||||
@@ -1481,6 +1503,7 @@ NODE_CLASS_MAPPINGS.update(LOOP_NODE_CLASS_MAPPINGS)
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"SxCPPromptBuilder": "SxCP Prompt Builder",
|
||||
"SxCPGlobalSeed": "SxCP Global Seed",
|
||||
"SxCPSeedControl": "SxCP Seed Control",
|
||||
"SxCPSeedLocker": "SxCP Seed Locker",
|
||||
"SxCPCameraControl": "SxCP Camera Control",
|
||||
|
||||
Reference in New Issue
Block a user