mirror of
https://github.com/vladmandic/automatic
synced 2026-09-17 16:24:33 +02:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user