From 5622b5512802a9d23066fc5a2aeea573398005b6 Mon Sep 17 00:00:00 2001 From: Victor Hall Date: Sat, 3 Feb 2024 22:01:14 -0500 Subject: [PATCH] fix up cog caption script --- caption_cog.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/caption_cog.py b/caption_cog.py index b5feb9b..2fdc07e 100644 --- a/caption_cog.py +++ b/caption_cog.py @@ -218,11 +218,14 @@ if __name__ == "__main__": args.top_p = args.top_p or 1.0 args.temp = args.temp or 1.0 - print(DESCRIPTION) - print(EXAMPLES) if args.image_dir is None: print(f"** {Fore.RED}Error: image_dir is required.{Style.RESET_ALL}") exit(1) + + if not os.path.exists(args.image_dir): + print(f"** {Fore.RED}Error: image_dir {args.image_dir} does not exist.{Style.RESET_ALL}") + exit(1) + print(f"** Running: {args.image_dir} with prompt '{args.prompt}'") main(args)