fix path error

This commit is contained in:
CjangCjengh
2023-12-08 00:27:32 +08:00
parent 710e777a92
commit d31aa143f4

View File

@@ -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}")