From 09648762ebacbc2be2dcaffcc5111e487ef07d94 Mon Sep 17 00:00:00 2001 From: hexxacubic Date: Sat, 24 May 2025 01:00:59 +0200 Subject: [PATCH] Update Prompt_Library.py --- Prompt_Library.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Prompt_Library.py b/Prompt_Library.py index 940fea5..763c4f9 100644 --- a/Prompt_Library.py +++ b/Prompt_Library.py @@ -65,9 +65,9 @@ class Prompt_Library: elif current is not None: sections[current].append(line) - # decide which index to use + # choose index: ignore slider value if randomize == 1 if randomize == 1: - max_idx = max(sections.keys()) if sections else 1 + max_idx = max(sections.keys()) if sections else index idx = random.randint(1, max_idx) else: idx = index @@ -85,9 +85,5 @@ class Prompt_Library: return (pos, neg, project, idx) -NODE_CLASS_MAPPINGS = { - "Prompt_Library": Prompt_Library, -} -NODE_DISPLAY_NAME_MAPPINGS = { - "Prompt Library": "Prompt_Library", -} +NODE_CLASS_MAPPINGS = {"Prompt_Library": Prompt_Library} +NODE_DISPLAY_NAME_MAPPINGS = {"Prompt Library": "Prompt_Library"}