From 72e011a4e4b83bf0849cc8c2cdc19da5232c4c4a Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sat, 12 Nov 2022 18:23:02 +0000 Subject: [PATCH] stop crash on text mask generation --- scripts/invoke.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/invoke.py b/scripts/invoke.py index b393ea9d20..215811747a 100755 --- a/scripts/invoke.py +++ b/scripts/invoke.py @@ -613,6 +613,7 @@ def do_textmask(gen, opt, callback): image_path = os.path.join(opt.outdir,image_path) assert os.path.exists(image_path), '** "{opt.prompt}" not found. Please enter the name of an existing image file to mask **' assert opt.text_mask is not None and len(opt.text_mask) >= 1, '** Please provide a text mask with -tm **' + opt.input_file_path = image_path tm = opt.text_mask[0] threshold = float(opt.text_mask[1]) if len(opt.text_mask) > 1 else 0.5 gen.apply_textmask( @@ -633,6 +634,7 @@ def do_postprocess (gen, opt, callback): file_path = os.path.join(opt.outdir,file_path) opt.input_file_path = file_path + tool=None if opt.facetool_strength > 0: tool = opt.facetool