autocreate cache and output folder
This commit is contained in:
parent
f343c054e1
commit
b56373762c
|
@ -89,8 +89,15 @@ async def main(opt):
|
||||||
|
|
||||||
config_path = "scripts/BLIP/configs/med_config.json"
|
config_path = "scripts/BLIP/configs/med_config.json"
|
||||||
|
|
||||||
|
cache_folder = ".cache"
|
||||||
model_cache_path = ".cache/model_base_caption_capfilt_large.pth"
|
model_cache_path = ".cache/model_base_caption_capfilt_large.pth"
|
||||||
|
|
||||||
|
if not os.path.exists(cache_folder):
|
||||||
|
os.makedirs(cache_folder)
|
||||||
|
|
||||||
|
if not os.path.exists(opt.out_dir):
|
||||||
|
os.makedirs(opt.out_dir)
|
||||||
|
|
||||||
if not os.path.exists(model_cache_path):
|
if not os.path.exists(model_cache_path):
|
||||||
print(f"Downloading model to {model_cache_path}... please wait")
|
print(f"Downloading model to {model_cache_path}... please wait")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue