scripts/readme/full-2k-ref2va-h3-base.sh
| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | # Create the H3-Base request with the expanded prompt and capture the video ID. |
| 5 | video_id=$( |
| 6 | jq -n \ |
| 7 | --arg prompt "$EXPANDED_PROMPT" \ |
| 8 | '{ |
| 9 | "task": "ref2va", |
| 10 | "prompt": $prompt, |
| 11 | "conditions": [ |
| 12 | { |
| 13 | "type": "video", |
| 14 | "uri": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/297573323635_00_%E8%A7%86%E9%A2%911_YnyRbxEwio_video_20260525_163755_1927e9d3.mp4", |
| 15 | "role": "reference" |
| 16 | }, |
| 17 | { |
| 18 | "type": "audio", |
| 19 | "uri": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/f463d523c5ce_01_%E9%9F%B3%E9%A2%911_RSLcbpzJPo_6%E6%9C%885%E6%97%A5(1).mp3", |
| 20 | "role": "reference" |
| 21 | } |
| 22 | ], |
| 23 | "target": { |
| 24 | "short_edge": 768, |
| 25 | "aspect_ratio": "auto", |
| 26 | "duration_seconds": 5 |
| 27 | }, |
| 28 | "seed": 0 |
| 29 | }' | |
| 30 | curl --silent --show-error \ |
| 31 | --request POST \ |
| 32 | --url "$SGLANG_DEPLOYMENT_URL/v1/videos" \ |
| 33 | --header 'Content-Type: application/json' \ |
| 34 | --data-binary @- | |
| 35 | jq -er '.id' |
| 36 | ) |
| 37 | # Query the generation status. |
| 38 | curl --silent --show-error \ |
| 39 | --request GET \ |
| 40 | --url "$SGLANG_DEPLOYMENT_URL/v1/videos/$video_id" | |
| 41 | jq '{status}' |
| 42 | # Download the local H3-Base MP4 after its status becomes completed. |
| 43 | curl --silent --show-error \ |
| 44 | --request GET \ |
| 45 | --url "$SGLANG_DEPLOYMENT_URL/v1/videos/$video_id/content" \ |
| 46 | --output r2va.mp4 |
| 47 | |