From 7d1ba849e154a38d4124106a3b051c617d910f4f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 01:02:56 +0000 Subject: [PATCH] fix batch list padding in create_infotext corrupting infotext indices padding loops used insert(0) which shifts existing prompt/seed entries to higher indices, so subsequent index lookups - including the caller's own p.prompts[i]/p.seeds[i] reads on the same aliased lists - return values belonging to a different image; append preserves existing index-to-entry mapping and pads missing slots at the end https://claude.ai/code/session_01UZT4ypkGQH5fzJ89dXPFYp --- modules/processing_info.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/processing_info.py b/modules/processing_info.py index 142db752d..923dd4d2a 100644 --- a/modules/processing_info.py +++ b/modules/processing_info.py @@ -34,19 +34,19 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No if all_subseeds is None: all_subseeds = p.all_subseeds or [p.subseed] while len(all_prompts) <= index: - all_prompts.insert(0, p.prompt) + all_prompts.append(p.prompt) while len(all_seeds) <= index: - all_seeds.insert(0, int(p.seed)) + all_seeds.append(int(p.seed)) while len(all_subseeds) <= index: - all_subseeds.insert(0, int(p.subseed)) + all_subseeds.append(int(p.subseed)) while len(all_negative_prompts) <= index: - all_negative_prompts.insert(0, p.negative_prompt) + all_negative_prompts.append(p.negative_prompt) if p.all_templates is not None: while len(p.all_templates) <= index: - p.all_templates.insert(0, '') + p.all_templates.append('') if p.all_negative_templates is not None: while len(p.all_negative_templates) <= index: - p.all_negative_templates.insert(0, '') + p.all_negative_templates.append('') comment = ', '.join(comments) if comments is not None and type(comments) is list else None ops = list(set(p.ops))