[Misc] Keep model-specific curl recipes

Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Hongsheng Liu committed 2026-08-12 00:14:40 +08:00
1 parent b9572edb81
commit 39e1c70aea
4 files changed
+27 -57

No files matched your search

@@ -1,9 +1,9 @@
# Image-To-Video
This shared example demonstrates online image-to-video generation with
vLLM-Omni. The startup script defaults to Wan2.2, but `MODEL` can select any
supported image-to-video model. The client sends the canonical Videos API
request; the server side owns model-specific prompt processing.
This example demonstrates online image-to-video generation with vLLM-Omni.
The startup script defaults to Wan2.2, but `MODEL` can select any supported
image-to-video model. The existing curl helper remains a concrete Wan2.2
request, while the server side owns model-specific prompt processing.
## Start Server
@@ -1,24 +1,14 @@
#!/bin/bash
# Shared image-to-video curl example using the async video job API.
# Wan2.2 image-to-video curl example using the async video job API.
set -euo pipefail
INPUT_IMAGE="${INPUT_IMAGE:-../../offline_inference/image_to_video/qwen-bear.png}"
BASE_URL="${BASE_URL:-http://localhost:8099}"
OUTPUT_PATH="${OUTPUT_PATH:-image_to_video_output.mp4}"
PROMPT="${PROMPT:-A bear playing with yarn, smooth motion}"
OUTPUT_PATH="${OUTPUT_PATH:-wan22_i2v_output.mp4}"
NEGATIVE_PROMPT="${NEGATIVE_PROMPT:-}"
SAMPLE_SOLVER="${SAMPLE_SOLVER:-}"
POLL_INTERVAL="${POLL_INTERVAL:-2}"
VIDEO_SECONDS="${VIDEO_SECONDS:-}"
SIZE="${SIZE:-}"
FPS="${FPS:-}"
NUM_INFERENCE_STEPS="${NUM_INFERENCE_STEPS:-}"
GUIDANCE_SCALE="${GUIDANCE_SCALE:-}"
GUIDANCE_SCALE_2="${GUIDANCE_SCALE_2:-}"
BOUNDARY_RATIO="${BOUNDARY_RATIO:-}"
FLOW_SHIFT="${FLOW_SHIFT:-}"
SEED="${SEED:-}"
if [ ! -f "$INPUT_IMAGE" ]; then
echo "Input image not found: $INPUT_IMAGE"
@@ -28,28 +18,19 @@ fi
create_cmd=(
curl -sS -X POST "${BASE_URL}/v1/videos"
-H "Accept: application/json"
-F "prompt=${PROMPT}"
-F "prompt=A bear playing with yarn, smooth motion"
-F "input_reference=@${INPUT_IMAGE}"
-F "seconds=2"
-F "size=832x480"
-F "fps=16"
-F "num_inference_steps=40"
-F "guidance_scale=1.0"
-F "guidance_scale_2=1.0"
-F "boundary_ratio=0.875"
-F "flow_shift=12.0"
-F "seed=42"
)
append_optional_field() {
local name="$1"
local value="$2"
if [ -n "${value}" ]; then
create_cmd+=(-F "${name}=${value}")
fi
}
append_optional_field "seconds" "${VIDEO_SECONDS}"
append_optional_field "size" "${SIZE}"
append_optional_field "fps" "${FPS}"
append_optional_field "num_inference_steps" "${NUM_INFERENCE_STEPS}"
append_optional_field "guidance_scale" "${GUIDANCE_SCALE}"
append_optional_field "guidance_scale_2" "${GUIDANCE_SCALE_2}"
append_optional_field "boundary_ratio" "${BOUNDARY_RATIO}"
append_optional_field "flow_shift" "${FLOW_SHIFT}"
append_optional_field "seed" "${SEED}"
if [ -n "${NEGATIVE_PROMPT}" ]; then
create_cmd+=(-F "negative_prompt=${NEGATIVE_PROMPT}")
fi