[OpenVINO] Add image-to-video support for LTX2 - #1885
Conversation
There was a problem hiding this comment.
Pull request overview
Adds OpenVINO image-to-video pipeline support for the LTX2 diffusion architecture, enabling video generation conditioned on an input image + prompt, alongside the corresponding exporter plumbing and documentation.
Changes:
- Introduces
OVLTX2ImageToVideoPipeline(and shared LTX2 base) plus runtime handling for LTX2 transformer timestep/audio_timestep shapes. - Extends OpenVINO exporter configuration and input generation to export the additional VAE-encoder component required for image conditioning.
- Updates CLI/exporter tests, diffusion pipeline tests, and inference documentation to cover the new task/model pairing.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/openvino/test_exporters_cli.py | Adds LTX2 image-to-video entry to the exporter CLI coverage matrix. |
| tests/openvino/test_diffusion.py | Extends image-to-video pipeline tests to include LTX2 (diffusers >= 0.38.0). |
| optimum/intel/utils/dummy_openvino_and_diffusers_objects.py | Adds dummy stub for OVLTX2ImageToVideoPipeline when optional deps are missing. |
| optimum/intel/openvino/modeling_diffusion.py | Implements OVLTX2ImageToVideoPipeline, shared LTX2 base wiring (incl. VAE encoder), and transformer timestep/audio_timestep handling. |
| optimum/intel/openvino/init.py | Exposes OVLTX2ImageToVideoPipeline from the OpenVINO module when diffusers is available. |
| optimum/intel/init.py | Adds the new pipeline to lazy import structure and dummy fallbacks. |
| optimum/exporters/openvino/model_configs.py | Registers image-to-video diffusers task mapping and updates LTX2 transformer input signatures (timestep/audio_timestep). |
| optimum/exporters/openvino/input_generators.py | Updates dummy inputs for LTX2 VAE encoder and transformer (timestep/audio_timestep). |
| optimum/exporters/openvino/convert.py | Exports an additional LTX2 VAE encoder submodel needed for image conditioning. |
| docs/source/openvino/inference.mdx | Documents the new OpenVINO pipeline class ↔ task mapping for LTX2 image-to-video. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @anatyrova, |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
rkazants
left a comment
There was a problem hiding this comment.
@goyaladitya05, please put scripts and results into PR description. Avoid links that are not convinient.
| auto_model_class = LTX2Pipeline | ||
|
|
||
|
|
||
| class OVLTX2ImageToVideoPipeline(_OVLTX2Base, LTX2ImageToVideoPipeline): |
There was a problem hiding this comment.
also check that common class OVPipelineForImage2Video is working for your implementation
There was a problem hiding this comment.
I checked both OVPipelineForImage2Video and OVPipelineForText2Video. Both work fine as before.
@rkazants I've updated the PR desciption. |
|
For the CI failures, none of them are releted to my changes. |
|
@goyaladitya05 is it right that vae encoder exports for both t2v and i2v (as it should)? also dw about CI, i will reload it and it should pass eventually. |
@anatyrova yes it does. Similar to how we did for LTX-Video. |
|
|
||
| self.vae_decoder = OVModelVaeDecoder(vae_decoder, self, DIFFUSION_MODEL_VAE_DECODER_SUBFOLDER) | ||
| self.vae_encoder = None | ||
| # vae_encoder is only exported/loaded for image-to-video; text-to-video leaves it as None. |
There was a problem hiding this comment.
is this comment valid, since you said vae encoder gets exported for both tasks?
There was a problem hiding this comment.
I have corrected it. It is exported for both tasks, but only loaded for image-to-video.
0fd44ea to
e65c550
Compare
# Conflicts: # optimum/intel/openvino/modeling_diffusion.py
What does this PR do?
This PR adds image-to-video pipeline support for LTX2, enabling users to create videos conditioned on an input image combined with a text prompt. Adding image conditioning provides a strong visual anchor, improving control over composition and style.
Image-to-Video Code and Sample
ltx2_i2v_f32.mp4
Text-to-Video Code and Sample
ltx2_t2v.mp4
Similarity Scores (CPU,fp32)
Text-to-Video hf vs optimum 0.996 (same as main branch, no regressions)
Image-to-Video hf vs optimum 0.991
Before submitting