From 4cf74a2fc0ef4ffea52ce75a6f395f13b74fb044 Mon Sep 17 00:00:00 2001 From: yeeyou Date: Tue, 28 Oct 2025 15:36:34 +0800 Subject: [PATCH] Limit seed value to 64-bit signed integer max Changed the maximum allowed seed value from 0xffffffffffffffff to 9223372036854775807 to ensure compatibility with 64-bit signed integer limits. Updated seed generation and increment logic accordingly. --- openai_llm_node.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openai_llm_node.py b/openai_llm_node.py index 5172ed2..e7da75f 100644 --- a/openai_llm_node.py +++ b/openai_llm_node.py @@ -50,7 +50,7 @@ class OpenAICompatibleLLM: "seed": ("INT", { "default": 42, "min": 0, - "max": 0xffffffffffffffff, + "max": 9223372036854775807, "step": 1 }), "seed_control": (["random", "fixed", "increment", "decrement"], { @@ -104,11 +104,11 @@ class OpenAICompatibleLLM: # Handle seed control if seed_control == "random": import random - actual_seed = random.randint(0, 0xffffffffffffffff) + actual_seed = random.randint(0, 9223372036854775807) elif seed_control == "fixed": actual_seed = seed elif seed_control == "increment": - actual_seed = self.last_seed + 1 + actual_seed = min(9223372036854775807, self.last_seed + 1) elif seed_control == "decrement": actual_seed = max(0, self.last_seed - 1) else: