-
Notifications
You must be signed in to change notification settings - Fork 423
[Doc] Sync. #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Doc] Sync. #1363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Image-To-Video | ||
|
|
||
| Source <https://github.com/vllm-project/vllm-omni/tree/main/examples/online_serving/image_to_video>. | ||
|
|
||
|
|
||
| This example demonstrates how to deploy the Wan2.2 image-to-video model for online video generation using vLLM-Omni. | ||
|
|
||
| ## Start Server | ||
|
|
||
| ### Basic Start | ||
|
|
||
| ```bash | ||
| vllm serve Wan-AI/Wan2.2-I2V-A14B-Diffusers --omni --port 8091 | ||
| ``` | ||
|
|
||
| ### Start with Parameters | ||
|
|
||
| Or use the startup script: | ||
|
|
||
| ```bash | ||
| bash run_server.sh | ||
| ``` | ||
|
|
||
| The script allows overriding: | ||
| - `MODEL` (default: `Wan-AI/Wan2.2-I2V-A14B-Diffusers`) | ||
| - `PORT` (default: `8091`) | ||
| - `BOUNDARY_RATIO` (default: `0.875`) | ||
| - `FLOW_SHIFT` (default: `12.0`) | ||
|
Comment on lines
+27
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This section claims Useful? React with 👍 / 👎. |
||
| - `CACHE_BACKEND` (default: `none`) | ||
| - `ENABLE_CACHE_DIT_SUMMARY` (default: `0`) | ||
|
|
||
| ## API Calls | ||
|
|
||
| ### Method 1: Using curl | ||
|
|
||
| ```bash | ||
| # Basic image-to-video generation | ||
| bash run_curl_image_to_video.sh | ||
|
|
||
| # Or execute directly (OpenAI-style multipart) | ||
| curl -X POST http://localhost:8091/v1/videos \ | ||
| -H "Accept: application/json" \ | ||
| -F "prompt=A bear playing with yarn, smooth motion" \ | ||
| -F "negative_prompt=low quality, blurry, static" \ | ||
| -F "input_reference=@/path/to/qwen-bear.png" \ | ||
| -F "width=832" \ | ||
| -F "height=480" \ | ||
| -F "num_frames=33" \ | ||
| -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" | jq -r '.data[0].b64_json' | base64 -d > wan22_i2v_output.mp4 | ||
| ``` | ||
|
|
||
| ## Request Format | ||
|
|
||
| ### Required Fields | ||
|
|
||
| ```bash | ||
| curl -X POST http://localhost:8091/v1/videos \ | ||
| -F "prompt=A bear playing with yarn, smooth motion" \ | ||
| -F "negative_prompt=low quality, blurry, static" \ | ||
| -F "input_reference=@/path/to/qwen-bear.png" | ||
| ``` | ||
|
|
||
| ### Generation with Parameters | ||
|
|
||
| ```bash | ||
| curl -X POST http://localhost:8091/v1/videos \ | ||
| -F "prompt=A bear playing with yarn, smooth motion" \ | ||
| -F "negative_prompt=low quality, blurry, static" \ | ||
| -F "input_reference=@/path/to/qwen-bear.png" \ | ||
| -F "width=832" \ | ||
| -F "height=480" \ | ||
| -F "num_frames=33" \ | ||
| -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" | ||
| ``` | ||
|
|
||
| ## Example materials | ||
|
|
||
| ??? abstract "run_curl_image_to_video.sh" | ||
| ``````sh | ||
| --8<-- "examples/online_serving/image_to_video/run_curl_image_to_video.sh" | ||
| `````` | ||
| ??? abstract "run_server.sh" | ||
| ``````sh | ||
| --8<-- "examples/online_serving/image_to_video/run_server.sh" | ||
| `````` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The document states
run_server.shdefaultsPORTto8091, but the real script uses8099(examples/online_serving/image_to_video/run_server.sh) and the example curl script posts to8099, so following this page causes users to send requests to the wrong port after launching with the provided script.Useful? React with 👍 / 👎.