From d9fabcc5efc66601be98b0d67aac8dde3feacf4b Mon Sep 17 00:00:00 2001 From: Davids048 Date: Thu, 5 Feb 2026 16:15:55 -0800 Subject: [PATCH] Add some annotations. --- examples/inference/basic/basic_ltx2_base.py | 18 +++++++++--------- run_ltx2_no_guidance_compare.py | 4 ---- .../convert_ltx2_weights.py | 13 +++++++++++++ .../convert_ltx2_weights.sh | 11 ----------- 4 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 scripts/checkpoint_conversion/convert_ltx2_weights.sh diff --git a/examples/inference/basic/basic_ltx2_base.py b/examples/inference/basic/basic_ltx2_base.py index 9632b4b43..10917b61d 100644 --- a/examples/inference/basic/basic_ltx2_base.py +++ b/examples/inference/basic/basic_ltx2_base.py @@ -38,15 +38,15 @@ def main() -> None: output_path = "outputs_video/ltx2_basic/output_ltx2_base_t2v_1088_1920_1.0.mp4" generator.generate_video( prompt=PROMPT, - output_path=output_path, - save_video=True, - num_frames=121, - height=1088, - width=1920, - fps=24, - negative_prompt=official_negative_prompt, - guidance_scale=3.0, - ) + output_path=output_path, + save_video=True, + num_frames=121, + height=1088, + width=1920, + fps=24, + negative_prompt=official_negative_prompt, + guidance_scale=3.0, + ) generator.shutdown() diff --git a/run_ltx2_no_guidance_compare.py b/run_ltx2_no_guidance_compare.py index c5ed12b7d..ae21a25de 100644 --- a/run_ltx2_no_guidance_compare.py +++ b/run_ltx2_no_guidance_compare.py @@ -138,9 +138,6 @@ PROMPT = ( "The woman covers her face, on the verge of tears. The tone is deadpan, " "absurd, and quietly tragic.") -PROMPT = ( - "A curious raccoon peeks through a vibrant field of yellow sunflowers.") - official_negative_prompt = ( "blurry, out of focus, overexposed, underexposed, low contrast, washed out colors, excessive noise, " "grainy texture, poor lighting, flickering, motion blur, distorted proportions, unnatural skin tones, " @@ -155,7 +152,6 @@ official_negative_prompt = ( "inconsistent tone, cinematic oversaturation, stylized filters, or AI artifacts." ) - @dataclass class Setting: height: int diff --git a/scripts/checkpoint_conversion/convert_ltx2_weights.py b/scripts/checkpoint_conversion/convert_ltx2_weights.py index bfcbf58e2..55ed272ed 100644 --- a/scripts/checkpoint_conversion/convert_ltx2_weights.py +++ b/scripts/checkpoint_conversion/convert_ltx2_weights.py @@ -1,6 +1,19 @@ # SPDX-License-Identifier: Apache-2.0 """ Convert LTX-2 weights to FastVideo naming conventions and split by component. + +LTX 2 conversion requires two huggingface models: +- LTX 2 model +- Gemma model + +Example usage: + python scripts/checkpoint_conversion/convert_ltx2_weights.py \\ + --source "/Lightricks/LTX-2/ltx-2-19b-dev.safetensors" \\ + --output "converted_weights/ltx2-base" \\ + --class-name "LTX2Transformer3DModel" \\ + --pipeline-class-name "LTX2Pipeline" \\ + --diffusers-version "0.33.0.dev0" \\ + --gemma-path "/google/gemma-3-12b-it" """ from __future__ import annotations diff --git a/scripts/checkpoint_conversion/convert_ltx2_weights.sh b/scripts/checkpoint_conversion/convert_ltx2_weights.sh deleted file mode 100644 index 18bd2b16d..000000000 --- a/scripts/checkpoint_conversion/convert_ltx2_weights.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Simple wrapper for convert_ltx2_weights.py -# Edit the values below directly - -python /home/d1su/codes/FastVideo/scripts/checkpoint_conversion/convert_ltx2_weights.py \ - --source "/Lightricks/LTX-2/ltx-2-19b-dev.safetensors" \ - --output "converted_weights/ltx2-base" \ - --class-name "LTX2Transformer3DModel" \ - --pipeline-class-name "LTX2Pipeline" \ - --diffusers-version "0.33.0.dev0" \ - --gemma-path "/google/gemma-3-12b-it"