Commit 4127f4af authored by AUTOMATIC's avatar AUTOMATIC

fix program breaking on empty prompt

parent 2f2d356e
...@@ -212,4 +212,7 @@ def parse_prompt_attention(text): ...@@ -212,4 +212,7 @@ def parse_prompt_attention(text):
for pos in square_brackets: for pos in square_brackets:
multiply_range(pos, square_bracket_multiplier) multiply_range(pos, square_bracket_multiplier)
if len(res) == 0:
res = [["", 1.0]]
return res return res
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment