Skip to content

Commit 72e011a

Browse files
committed
stop crash on text mask generation
1 parent 98db0d7 commit 72e011a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/invoke.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ def do_textmask(gen, opt, callback):
613613
image_path = os.path.join(opt.outdir,image_path)
614614
assert os.path.exists(image_path), '** "{opt.prompt}" not found. Please enter the name of an existing image file to mask **'
615615
assert opt.text_mask is not None and len(opt.text_mask) >= 1, '** Please provide a text mask with -tm **'
616+
opt.input_file_path = image_path
616617
tm = opt.text_mask[0]
617618
threshold = float(opt.text_mask[1]) if len(opt.text_mask) > 1 else 0.5
618619
gen.apply_textmask(
@@ -633,6 +634,7 @@ def do_postprocess (gen, opt, callback):
633634
file_path = os.path.join(opt.outdir,file_path)
634635

635636
opt.input_file_path = file_path
637+
636638
tool=None
637639
if opt.facetool_strength > 0:
638640
tool = opt.facetool

0 commit comments

Comments
 (0)