Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

format

Shen-Chenhuia06c6e78a852
diff --git a/eval/loss/launch.sh b/eval/loss/launch.sh
index 780569e..5e19c7c 100644
--- a/eval/loss/launch.sh
+++ b/eval/loss/launch.sh
@@ -20,9 +20,9 @@ echo "Logging to $LOG_BASE"
GPUS=(3 4 5 6 7)
RESOLUTION=(144p 240p 360p 480p 720p)
-CUDA_VISIBLE_DEVICES=0 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 0 --end-index 3 >${LOG_BASE}/img_0.log 2>&1 &
-CUDA_VISIBLE_DEVICES=1 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 3 --end-index 5 >${LOG_BASE}/img_1.log 2>&1 &
-CUDA_VISIBLE_DEVICES=2 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 5 >${LOG_BASE}/img_2.log 2>&1 &
+CUDA_VISIBLE_DEVICES=0 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 0 --end-index 5 >${LOG_BASE}/img_0.log 2>&1 &
+CUDA_VISIBLE_DEVICES=1 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 5 --end-index 6 >${LOG_BASE}/img_1.log 2>&1 &
+CUDA_VISIBLE_DEVICES=2 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 6 >${LOG_BASE}/img_2.log 2>&1 &
for i in "${!GPUS[@]}"; do
diff --git a/tools/scene_cut/cut.py b/tools/scene_cut/cut.py
index 7bf7b9e..cf724a6 100644
--- a/tools/scene_cut/cut.py
+++ b/tools/scene_cut/cut.py
@@ -3,7 +3,6 @@ import cv2 # isort:skip
import argparse
import os
import subprocess
-import time
from functools import partial
import pandas as pd
@@ -43,6 +42,8 @@ def process_single_row(row, args):
if "relpath" in row:
save_dir = os.path.dirname(os.path.join(args.save_dir, row["relpath"]))
os.makedirs(save_dir, exist_ok=True)
+ else:
+ save_dir = args.save_dir
shorter_size = args.shorter_size
if (shorter_size is not None) and ("height" in row) and ("width" in row):
@@ -171,11 +172,10 @@ def main():
args = parse_args()
meta_path = args.meta_path
if not os.path.exists(meta_path):
- print(f"Meta file \'{meta_path}\' not found. Exit.")
+ print(f"Meta file '{meta_path}' not found. Exit.")
exit()
# create logger
- logger = None
os.makedirs(args.save_dir, exist_ok=True)
# initialize pandarallel