Diffusers
Safetensors
File size: 1,543 Bytes
5f0e4a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -euo pipefail

export PYTHONPATH=$(cd "$(dirname "$0")" && pwd):${PYTHONPATH:-}
export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0}

PROMPT='A paved pathway leads towards a stone arch bridge spanning a calm body of water. Lush green trees and foliage line the path and the far bank of the water. A traditional-style pavilion with a tiered reddish-brown roof sits on the far shore. The water reflects the surrounding greenery and the sky.'
IMAGE_PATH=./assets/img/test.png
SEED=1
ASPECT_RATIO=16:9
RESOLUTION=480p
OUTPUT_PATH=./outputs/near_720_frames
MODEL_PATH=/data3/chenzhuo/workspace/HY-WorldPlay/models-ms/HunyuanVideo-1.5
AR_DISTILL_ACTION_MODEL_PATH=/data3/chenzhuo/workspace/HY-WorldPlay/models-ms/HY-WorldPlay/ar_distilled_action_model/diffusion_pytorch_model.safetensors
POSE='w-179'
NUM_FRAMES=717
WIDTH=832
HEIGHT=480
N_INFERENCE_GPU=1

torchrun --nproc_per_node=$N_INFERENCE_GPU hyvideo/generate.py \
  --prompt "$PROMPT" \
  --image_path "$IMAGE_PATH" \
  --resolution "$RESOLUTION" \
  --aspect_ratio "$ASPECT_RATIO" \
  --video_length "$NUM_FRAMES" \
  --seed "$SEED" \
  --rewrite false \
  --sr false \
  --save_pre_sr_video false \
  --pose "$POSE" \
  --output_path "$OUTPUT_PATH" \
  --model_path "$MODEL_PATH" \
  --action_ckpt "$AR_DISTILL_ACTION_MODEL_PATH" \
  --few_step true \
  --num_inference_steps 4 \
  --model_type ar \
  --width "$WIDTH" \
  --height "$HEIGHT" \
  --use_vae_parallel false \
  --use_sageattn false \
  --use_fp8_gemm false \
  --transformer_resident_ar_rollout true