mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix crash when --prompt="prompt" is used in CLI
- The following were supposed to be equivalent, but the latter crashes: ``` invoke> banana sushi invoke> --prompt="banana sushi" ``` This PR fixes the problem. - Fixes #2548
This commit is contained in:
parent
9c2b9af3a8
commit
67f892455f
@ -230,7 +230,8 @@ class Args(object):
|
||||
switches = ''
|
||||
try:
|
||||
self._cmd_switches = self._cmd_parser.parse_args(shlex.split(switches,comments=True))
|
||||
setattr(self._cmd_switches,'prompt',prompt)
|
||||
if not getattr(self._cmd_switches,'prompt'):
|
||||
setattr(self._cmd_switches,'prompt',prompt)
|
||||
return self._cmd_switches
|
||||
except:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user