From 077a82e99e1037761bcbec1d4ba280ced76274f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:17:15 +0000 Subject: [PATCH 1/2] Fix duplicated clause in compel prompt guard The guard repeated 'conjunction.prompts is None' twice; the second copy was meant to check for an empty list, so an empty (non-None) prompts list raised IndexError inside the guard instead of returning the empty fallback. https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2 Co-Authored-By: Claude --- modules/prompt_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 72a88dbbb..e12b7ccec 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -322,7 +322,7 @@ def parse_prompt_attention(text): return res elif opts.prompt_attention == 'compel': conjunction = Compel.parse_prompt_string(text) - if conjunction is None or conjunction.prompts is None or conjunction.prompts is None or len(conjunction.prompts[0].children) == 0: + if conjunction is None or conjunction.prompts is None or len(conjunction.prompts) == 0 or len(conjunction.prompts[0].children) == 0: return [["", 1.0]] res = [] for frag in conjunction.prompts[0].children: From e6c13aab3787e3aa2eb45736b3c9ddff3d83b9cf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:18:42 +0000 Subject: [PATCH 2/2] Fix PObject metadata keys that never match parsed infotext Infotext parsing produces 'Negative prompt' and 'Variation seed', but the save-image PObject looked up 'Negative_prompt' and 'Subseed', so images saved from restored metadata always lost their negative prompt and variation seed. Use the keys the parser actually emits, matching the sibling lookups like 'CFG scale'. https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2 Co-Authored-By: Claude --- modules/ui_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_common.py b/modules/ui_common.py index e171e0eb9..b190046fe 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -145,7 +145,7 @@ def save_files(js_data, files, html_info, index): for k, v in d.items(): setattr(self, k, v) self.prompt = getattr(self, 'prompt', None) or getattr(self, 'Prompt', None) or '' - self.negative_prompt = getattr(self, 'negative_prompt', None) or getattr(self, 'Negative_prompt', None) or '' + self.negative_prompt = getattr(self, 'negative_prompt', None) or getattr(self, 'Negative prompt', None) or '' self.sampler = getattr(self, 'sampler', None) or getattr(self, 'Sampler', None) or '' self.sampler_name = self.sampler self.seed = getattr(self, 'seed', None) or getattr(self, 'Seed', None) or 0 @@ -156,7 +156,7 @@ def save_files(js_data, files, html_info, index): self.clip_skip = getattr(self, 'clip_skip', None) or getattr(self, 'CLiP-skip', None) or 1 self.denoising_strength = getattr(self, 'denoising_strength', None) or getattr(self, 'Denoising', None) or 0 self.index_of_first_image = getattr(self, 'index_of_first_image', 0) - self.subseed = getattr(self, 'subseed', None) or getattr(self, 'Subseed', None) + self.subseed = getattr(self, 'subseed', None) or getattr(self, 'Variation seed', None) self.styles = getattr(self, 'styles', None) or getattr(self, 'Styles', None) or [] self.styles = [s.strip() for s in self.styles.split(',')] if isinstance(self.styles, str) else self.styles