Add vLLM-Omni image-to-video sample - #235
Draft
wirjo wants to merge 3 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an end-to-end vLLM-Omni generative media sample that:
black-forest-labs/FLUX.2-klein-4Bto a SageMaker real-time endpoint.Wan-AI/Wan2.1-VACE-1.3B-diffusersto a SageMaker asynchronous endpoint.omni-sagemaker-cuda-v1.6.Why this sample
The repository already contains a FLUX.2-dev example and a Wan text-to-video example. This sample connects an image model to an image-conditioned video model and uses the vLLM-Omni DLC for both endpoints. It also shows why the image endpoint uses real-time inference while the longer-running video endpoint uses SageMaker Asynchronous Inference.
The vLLM-Omni Videos API accepts multipart form data and caps an individual form part at 1 MB. A 1024 x 1024 FLUX PNG can exceed that size after base64 encoding, so the sample resizes the reference to the requested video dimensions and encodes it as JPEG before constructing the multipart request.
Files
deploy.pycreates both endpoints, records their resource names, and can resume an interrupted deployment.generate.pyruns the complete image-to-video workflow.app.pyprovides a Streamlit interface.cleanup.pyremoves the SageMaker resources.vllm_omni_media.pycontains shared request, polling, state, failure, and cleanup helpers.tests/covers payloads, reference-image preprocessing, endpoint configuration, asynchronous request submission, failure handling, resource reuse, and local state.Validation
Validated end to end in
us-east-1on 2026-08-30 with AWS vLLM-Omni DLComni-sagemaker-cuda-v1.6:ml.g6.xlarge,InServiceafter 9 minutes 30 seconds.ml.g6e.xlarge,InServiceafter 8 minutes 40 seconds.cleanup.py, then confirmed that the sample endpoints, endpoint configurations, and models were removed. Temporary request and failure prefixes were empty.Local quality gates:
These are single-run validation measurements for the documented sample settings, not performance benchmarks.
Cost and cleanup
The sample creates two GPU endpoints. Run
python cleanup.pyafter testing. The cleanup command removes the SageMaker endpoints, endpoint configurations, and models while retaining generated Amazon S3 artifacts for review.