[feat]: Stable-Video-Infinity inference on Wan 2.1 I2V 14B 480P - #1344
[feat]: Stable-Video-Infinity inference on Wan 2.1 I2V 14B 480P#1344H1yori233 wants to merge 15 commits into
Conversation
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for Stable-Video-Infinity (SVI) multi-clip image-to-video generation for the Wan 2.1 model, including a new example script and inference presets. Key changes include the implementation of the WanSVIImageToVideoPipeline, a specialized SVIImageVAEEncodingStage for motion-frame conditioning, and updates to the LoRA loading logic to support individual file downloads from the Hugging Face Hub. The review feedback recommends implementing file locking for downloads to prevent race conditions, improving visual continuity in multi-clip sequences by using the last frame of a clip as the next reference, and caching embeddings to optimize performance during long video generation.
# Conflicts: # fastvideo/pipelines/stages/__init__.py
|
Hi @H1yori233 — automated review from Gob, one of @SolitaryThinker's AI reviewers. Findings aren't all human-verified; ping @SolitaryThinker if anything looks off. Reviewed against the Three S2 findings, all on shared-path contract widening: S2-1 —
name = name.replace("diffusion_model.", "")
+name = name.replace("pipe.dit.", "")
name = name.replace(".weight", "")
+name = name.replace(".default", "")
Suggested fix — guard the new replacements so non-SVI behavior is provably unchanged: if "pipe.dit." in name:
name = name.replace("pipe.dit.", "")
if ".default" in name:
name = name.replace(".default", "")Or just confirm one existing in-tree Wan 2.1 / Wan 2.2 LoRA adapter still loads after this change. Either is sufficient evidence. S2-2 —
The new branch handling One S2-3 — Multi-clip stitching path is untested + missing a
concatenated = [clip_outputs[0]]
for video in clip_outputs[1:]:
concatenated.append(video[:, :, num_motion:, :, :])
batch.output = torch.cat(concatenated, dim=2)The shipped example uses There's also no guard that Suggested fix:
S3 items (non-blocking): no docstring on — Gob (@SolitaryThinker's AI reviewer). Full review (including S3 items) is archived locally. |
This comment was marked as resolved.
This comment was marked as resolved.
# Conflicts: # fastvideo/pipelines/stages/__init__.py # fastvideo/pipelines/stages/image_encoding.py
|
/merge |
|
/test vsa |
|
/test unit |
SolitaryThinker
left a comment
There was a problem hiding this comment.
Full review at head (six lanes, findings adversarially verified). This is a clean way to ship SVI: override_pipeline_cls_name instead of a registry switch is right, and the stage test that pins the mask/pre-VAE math to the reference is exactly what we want — I checked it line-for-line against encode_images_adaptive in the SVI repo; it matches.
Before merge:
- CI red at head is partly yours: add the four
svi_*fields todocs/design/inference_schema_parity_inventory.yaml. The ltx2 preset failure is just a stale head — rebase onto main (conflict-free, I checked; 106 commits behind). - Every clip reuses the identical seed/noise; the reference varies seed per chunk. Offset per clip or justify the deviation.
- No evidence the headline feature works: the example ships
svi_num_clips=1and all PR videos are single-clip. Attach one multi-clip run (any variant), and either add SSIM coverage or state the deferral explicitly. - Per-clip prompts are unreachable:
generate_videorejects list prompts andgenerate()fans them into separate videos — wire a real per-clip prompt input or drop the dead branch and the film multi-prompt claim.
Minor: the three new test files aren't collected by any CI lane (run_unit_test doesn't include tests/stages/tests/pipelines); the .default strip in set_lora_adapter runs on every adapter in both stacks — anchor it to the PEFT .lora_A.default/.lora_B.default pattern; batch.sigmas is force-overwritten and the scheduler hardcodes shift=5.0, so flow_shift silently does nothing (schedule itself matches the reference — knob honesty only).
Two-stack note: the only shared-surface hunk is lora_pipeline.py key canonicalization, inherited by the legacy training stack — the PEFT-anchoring fix above closes that exposure.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks for the review @SolitaryThinker. I've addressed the requested changes:
Multi-clip run: https://github.com/user-attachments/assets/0ffefc2d-2dff-4bd0-93cb-db86d44dce8d |
|
/test vsa |
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
|
Purpose
override_pipeline_cls_name="WanSVIImageToVideoPipeline"on top of the existingWan-AI/Wan2.1-I2V-14B-480P-Diffusersmodel path. No new model path / no Tier-3 registry switch.MODEL_VARIANTswitch.Changes
fastvideo/pipelines/basic/wan/wan_svi_i2v_pipeline.py, add WanSVIImageToVideoPipeline.fastvideo/pipelines/stages/image_encoding.py, add SVIImageVAEEncodingStage.fastvideo/tests/stages/test_svi_image_vae_encoding.py, test script.examples/inference/basic/basic_svi_i2v.pyfastvideo/utils.py—maybe_download_loraacceptsorg/repo/subdir/file.safetensorsso LoRA HF repos with multiple variant files (likevita-video-gen/svi-model) can pick a specific one without an explicithf_hub_downloadcall in user code.fastvideo/pipelines/pipeline_batch_info.pyfastvideo/api/sampling_param.pyTest Plan
Test Results
Stage unit test:
End-to-end inference, all 3 variants (
Wan-AI/Wan2.1-I2V-14B-480P-Diffusers+ SVI LoRA, 81 frames at 448×832, 20 denoise steps, 1× GB200).A.sleek.white.motor.yacht.speeds.across.the.turquoise.blue.sea.leaving.a.dramatic.wake.of.white.foa.mp4
A.Siamese.kitten.rests.snugly.inside.a.straw.hat.its.head.slightly.tilted.as.it.gazes.curiously.to.mp4
Checklist
pre-commit run --all-filesand fixed all issuesFor model/pipeline changes, also check: