From d31aa143f4fb9179b18d2545d8c261c8eace88f6 Mon Sep 17 00:00:00 2001 From: CjangCjengh <101577701+CjangCjengh@users.noreply.github.com> Date: Fri, 8 Dec 2023 00:27:32 +0800 Subject: [PATCH] fix path error --- finetune/make_captions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finetune/make_captions.py b/finetune/make_captions.py index b46652c3..074576bc 100644 --- a/finetune/make_captions.py +++ b/finetune/make_captions.py @@ -76,7 +76,7 @@ def main(args): cwd = os.getcwd() print("Current Working Directory is: ", cwd) os.chdir("finetune") - if not is_url(args.caption_weights) and not os.path.exists(args.caption_weights): + if not is_url(args.caption_weights) and not os.path.isfile(args.caption_weights): args.caption_weights = os.path.join("..", args.caption_weights) print(f"load images from {args.train_data_dir}")