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 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-06-11 08:17:15 +00:00
committed by QualiaRain
parent df568f9d4b
commit 077a82e99e
+1 -1
View File
@@ -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: