mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
better exception handling for out of memory errors and badly formatted prompts
This commit is contained in:
parent
281e381cfc
commit
e70169257e
@ -90,7 +90,12 @@ def main_loop(t2i,parser,log):
|
|||||||
done = True
|
done = True
|
||||||
break
|
break
|
||||||
|
|
||||||
elements = shlex.split(command)
|
try:
|
||||||
|
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!")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user