Open-Sora: Democratizing Efficient Video Production for All
Python
update sample.sh
zhengzangwde2d32476529
diff --git a/scripts/misc/sample.sh b/scripts/misc/sample.shindex 8fd1cb3..c3a91e8 100644--- a/scripts/misc/sample.sh+++ b/scripts/misc/sample.sh@@ -18,7 +18,7 @@ start=$(date +%s)### Functions-function run_image() {+function run_image() { # 10min# 1.1 1024x1024eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2i_samples.txt --save-dir $OUTPUT --num-frames 1 --image-size 1024 1024 --sample-name 1024x1024@@ -27,6 +27,9 @@ function run_image() {# 1.3 512x512eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2i_samples.txt --save-dir $OUTPUT --num-frames 1 --image-size 512 512 --sample-name 512x512 --end-index 3+ eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_samples.txt --save-dir $OUTPUT --num-frames 1 --image-size 512 512 --sample-name 512x512 --end-index 3+ eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 1 --image-size 512 512 --sample-name 512x512 --end-index 3+ eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_sora.txt --save-dir $OUTPUT --num-frames 1 --image-size 512 512 --sample-name 512x512 --end-index 3# 1.4 720p multi-resolution# 1:1@@ -46,7 +49,7 @@ function run_image() {eval $CMD --ckpt-path $CKPT --prompt \"$PROMPT\" --save-dir $OUTPUT --num-frames 1 --image-size 600 1358 --sample-name 720p_2_1}-function run_video_1() {+function run_video_1() { # 20min# 2.1.1 16x240x426eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_samples.txt --save-dir $OUTPUT --num-frames 16 --image-size 240 426 --sample-name sample_16x240x426@@ -68,30 +71,38 @@ function run_video_1() {eval $CMD --ckpt-path $CKPT --prompt \"$PROMPT\" --save-dir $OUTPUT --num-frames 16 --image-size 600 1358 --sample-name 720p_2_1}-function run_video_2() {+function run_video_2() { # 60min# 2.2.1 16x240x426eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 16 --image-size 240 426 --sample-name short_16x240x426- eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_sora.txt --save-dir $OUTPUT --num-frames 16 --image-size 240 426 --sample-name sora_16x240x426- # 2.2.1 64x240x426+ # 2.2.2 64x240x426eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 64 --image-size 240 426 --sample-name short_64x240x426+}- # 2.2.2 128x240x426+function run_video_3() { # 60min+ # 2.3.1 16x240x426+ eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_sora.txt --save-dir $OUTPUT --num-frames 16 --image-size 240 426 --sample-name sora_16x240x426++ # 2.3.2 128x240x426eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 128 --image-size 240 426 --sample-name short_128x240x426}-function run_video_3() {- # 2.2.3 16x480x854+function run_video_4() { # 120min+ # 2.4 16x480x854eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 16 --image-size 480 854 --sample-name short_16x480x854+}- # 2.2.4 64x480x854+function run_video_5() { # 120min+ # 2.5 64x480x854eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 64 --image-size 480 854 --sample-name short_64x480x854+}- # 2.2.5 16x720x1280+function run_video_6() { # 120min+ # 2.6 16x720x1280eval $CMD --ckpt-path $CKPT --prompt-path assets/texts/t2v_short.txt --save-dir $OUTPUT --num-frames 16 --image-size 720 1280 --sample-name short_16x720x1280}-function run_video_edit() {+function run_video_edit() { # 23min# 3.1 image-conditioned long video generationeval $CMD_REF --ckpt-path $CKPT --save-dir $OUTPUT --sample-name ref_L10C4_16x240x426 \--prompt-path assets/texts/t2v_ref.txt --start-index 0 --end-index 3 \@@ -135,6 +146,18 @@ for arg in "$@"; doecho "Running video samples 3..."run_video_3fi+ if [[ "$arg" = -2d ]] || [[ "$arg" = --video ]]; then+ echo "Running video samples 4..."+ run_video_4+ fi+ if [[ "$arg" = -2e ]] || [[ "$arg" = --video ]]; then+ echo "Running video samples 5..."+ run_video_5+ fi+ if [[ "$arg" = -2f ]] || [[ "$arg" = --video ]]; then+ echo "Running video samples 6..."+ run_video_6+ fiif [[ "$arg" = -3 ]] || [[ "$arg" = --video-edit ]]; thenecho "Running video edit samples..."run_video_edit