diff --git a/examples/dataset/lingbot_world_v2/README.md b/examples/dataset/lingbot_world_v2/README.md new file mode 100644 index 000000000..2f992ef23 --- /dev/null +++ b/examples/dataset/lingbot_world_v2/README.md @@ -0,0 +1,17 @@ +# LingBot World v2 Example Dataset + +These files were copied unchanged from the LingBot World v2 repository for the +FastVideo causal-fast inference example. + +- Repository: `https://github.com/Robbyant/lingbot-world-v2.git` +- Source commit: `94f43115de8d4a4f9f282126528c300a0b232c5f` +- Source directory: `examples/03` + +## Files + +- `image.jpg`: source image for image-to-video generation. SHA-256: + `6ee3dacfef32cfef504dd698adb8a660cf15f686535c52fed4903fef27c0edd0` +- `poses.npy`: camera-to-world trajectory matrices. SHA-256: + `bd0a23a696e184b0b43e7767eb432bfe644690560fe327fa96961affc941c404` +- `intrinsics.npy`: camera intrinsic parameters. SHA-256: + `821fca6cf957ae8fbb1181307f02479efb1705e04c9e05734cd02fb43462e082` diff --git a/examples/dataset/lingbot_world_v2/image.jpg b/examples/dataset/lingbot_world_v2/image.jpg new file mode 100644 index 000000000..98e4431f8 Binary files /dev/null and b/examples/dataset/lingbot_world_v2/image.jpg differ diff --git a/examples/dataset/lingbot_world_v2/intrinsics.npy b/examples/dataset/lingbot_world_v2/intrinsics.npy new file mode 100644 index 000000000..3c65d2ded Binary files /dev/null and b/examples/dataset/lingbot_world_v2/intrinsics.npy differ diff --git a/examples/dataset/lingbot_world_v2/poses.npy b/examples/dataset/lingbot_world_v2/poses.npy new file mode 100644 index 000000000..194fdb5b4 Binary files /dev/null and b/examples/dataset/lingbot_world_v2/poses.npy differ diff --git a/examples/inference/basic/basic_lingbotworld_causal_fast.py b/examples/inference/basic/basic_lingbotworld_causal_fast.py new file mode 100644 index 000000000..8beb65da6 --- /dev/null +++ b/examples/inference/basic/basic_lingbotworld_causal_fast.py @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Run LingBot-World v2 14B causal-fast I2V generation with FastVideo.""" + +from pathlib import Path + +from fastvideo import VideoGenerator + + +REPO_ROOT = Path(__file__).resolve().parents[3] +DATASET_DIR = REPO_ROOT / "examples" / "dataset" / "lingbot_world_v2" +OUTPUT_PATH = REPO_ROOT / "outputs" / "lingbotworld_causal_fast.mp4" + + +def main() -> None: + """Load the native FastVideo LingBot causal-fast pipeline and generate one video.""" + generator = VideoGenerator.from_pretrained( + "/mnt/weka/shrd/wm/junda/fv-hub/lingbot-world-v2/ckpts/lingbot-world-v2-14b-causal-fast-fastvideo", + num_gpus=8, + sp_size=8, + hsdp_shard_dim=8, + use_fsdp_inference=True, + dit_layerwise_offload=False, + dit_cpu_offload=False, + vae_cpu_offload=False, + text_encoder_cpu_offload=False, + pin_cpu_memory=True, + override_pipeline_cls_name="LingBotWorldCausalFastPipeline", + ) + + try: + generator.generate_video( + "A serene lakeside scene with a lone tree standing in calm water, surrounded by distant snow-capped mountains under a bright blue sky with drifting white clouds; gentle ripples reflect the tree and sky, creating a tranquil, meditative atmosphere.", + action_path=str(DATASET_DIR), + output_path=str(OUTPUT_PATH), + save_video=True, + height=480, + width=832, + num_frames=65, + num_inference_steps=4, + guidance_scale=1.0, + negative_prompt="", + fps=16, + seed=42, + ) + finally: + generator.shutdown() + + +if __name__ == "__main__": + main()