Open-Sora: Democratizing Efficient Video Production for All
Python
:recycle: Directory creation to use os.makedirs with exist_ok (#435)
jackmappotion2229f01b35c2
diff --git a/opensora/datasets/utils.py b/opensora/datasets/utils.pyindex 6ce155e..b7083a3 100644--- a/opensora/datasets/utils.py+++ b/opensora/datasets/utils.py@@ -52,8 +52,7 @@ def read_file(input_path):def download_url(input_path):output_dir = "cache"- if not os.path.exists(output_dir):- os.makedirs(output_dir)+ os.makedirs(output_dir, exist_ok=True)base_name = os.path.basename(input_path)output_path = os.path.join(output_dir, base_name)img_data = requests.get(input_path).content