From a729de9921aa328ef159c8db6aa7dc63a2158d85 Mon Sep 17 00:00:00 2001 From: Adi Eyal Date: Sat, 12 Nov 2022 18:30:23 +0200 Subject: [PATCH] Minor bug fix - checking type of combinatorial batches --- CHANGELOG | 3 ++- scripts/dynamic_prompting.py | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 429f7c07..8e57839a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -32,4 +32,5 @@ 0.15.1 Fixed an error caused when setting wildcard_dir in config.json, also other minor bug fixes 0.15.2 Handle situation where no prompts are generated. 0.16.0 Added a checkbox to enable writing all generated prompts to a text file. -0.17.0 Dynamic prompts is now an AlwaysVisible script. It now plays nicely with other scripts like X/Y plot. Big thanks to @stysmmaker \ No newline at end of file +0.17.0 Dynamic prompts is now an AlwaysVisible script. It now plays nicely with other scripts like X/Y plot. Big thanks to @stysmmaker +0.17.1 Minor bug fix checking type of combinatorial batches \ No newline at end of file diff --git a/scripts/dynamic_prompting.py b/scripts/dynamic_prompting.py index c27dc410..243e1e2a 100644 --- a/scripts/dynamic_prompting.py +++ b/scripts/dynamic_prompting.py @@ -34,7 +34,7 @@ else: WILDCARD_DIR = Path(wildcard_dir) -VERSION = "0.17.0" +VERSION = "0.17.1" wildcard_manager = WildcardManager(WILDCARD_DIR) @@ -123,7 +123,12 @@ def process( original_prompt = p.prompt[0] if type(p.prompt) == list else p.prompt original_seed = p.seed - if combinatorial_batches < 1: + + try: + combinatorial_batches = int(combinatorial_batches) + if combinatorial_batches < 1: + combinatorial_batches = 1 + except (ValueError, TypeError): combinatorial_batches = 1 if is_combinatorial: