From 80f8975d4e68ac87331d890867f6df8aef535dad Mon Sep 17 00:00:00 2001 From: Bingsu Date: Mon, 15 May 2023 12:29:34 +0900 Subject: [PATCH] fix: prompt repeat -> use last --- scripts/!adetailer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/!adetailer.py b/scripts/!adetailer.py index 1617ffc..80b010a 100644 --- a/scripts/!adetailer.py +++ b/scripts/!adetailer.py @@ -372,8 +372,8 @@ class AfterDetailerScript(scripts.Script): def i2i_prompts_replace( self, i2i, prompts: list[str], negative_prompts: list[str], j: int ): - i1 = j % len(prompts) - i2 = j % len(negative_prompts) + i1 = min(j, len(prompts) - 1) + i2 = min(j, len(negative_prompts) - 1) prompt = prompts[i1] negative_prompt = negative_prompts[i2] i2i.prompt = prompt