mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
prevent crash when providing empty quoted prompt ("")
This commit is contained in:
parent
b1a2f4ab44
commit
ca2f579f43
@ -181,7 +181,9 @@ class Args(object):
|
||||
switches_started = False
|
||||
|
||||
for element in elements:
|
||||
if element[0] == '-' and not switches_started:
|
||||
if len(element) == 0: # empty prompt
|
||||
pass
|
||||
elif element[0] == '-' and not switches_started:
|
||||
switches_started = True
|
||||
if switches_started:
|
||||
switches.append(element)
|
||||
|
Loading…
Reference in New Issue
Block a user