mirror of
https://github.com/invoke-ai/InvokeAI
synced 2025-07-25 04:51:07 +00:00
better exception handling for out of memory errors and badly formatted prompts
This commit is contained in:
@ -90,7 +90,12 @@ def main_loop(t2i,parser,log):
|
|||||||
done = True
|
done = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
try:
|
||||||
elements = shlex.split(command)
|
elements = shlex.split(command)
|
||||||
|
except ValueError as e:
|
||||||
|
print(str(e))
|
||||||
|
continue
|
||||||
|
|
||||||
if len(elements)==0:
|
if len(elements)==0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -133,6 +138,10 @@ def main_loop(t2i,parser,log):
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('*interrupted*')
|
print('*interrupted*')
|
||||||
continue
|
continue
|
||||||
|
except RuntimeError as e:
|
||||||
|
print(str(e))
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
print("goodbye!")
|
print("goodbye!")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user