mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
various prompting fixes
This commit is contained in:
committed by
Lincoln Stein
parent
80f2cfe3e3
commit
ced9c83e96
@ -10,6 +10,9 @@ import warnings
|
||||
import time
|
||||
import traceback
|
||||
import yaml
|
||||
|
||||
from ldm.invoke.prompt_parser import PromptParser
|
||||
|
||||
sys.path.append('.') # corrects a weird problem on Macs
|
||||
from ldm.invoke.readline import get_completer
|
||||
from ldm.invoke.args import Args, metadata_dumps, metadata_from_png, dream_cmd_from_png
|
||||
@ -18,7 +21,7 @@ from ldm.invoke.image_util import make_grid
|
||||
from ldm.invoke.log import write_log
|
||||
from omegaconf import OmegaConf
|
||||
from pathlib import Path
|
||||
from pyparsing import ParseException
|
||||
import pyparsing
|
||||
|
||||
# global used in multiple functions (fix)
|
||||
infile = None
|
||||
@ -340,7 +343,7 @@ def main_loop(gen, opt):
|
||||
catch_interrupts=catch_ctrl_c,
|
||||
**vars(opt)
|
||||
)
|
||||
except ParseException as e:
|
||||
except (PromptParser.ParsingException, pyparsing.ParseException) as e:
|
||||
print('** An error occurred while processing your prompt **')
|
||||
print(f'** {str(e)} **')
|
||||
elif operation == 'postprocess':
|
||||
|
Reference in New Issue
Block a user