[refactor]: remove VideoGenerator.generate_video

VideoGenerator.generate(request) is the one inference entry point. The
generate_video keyword call, its mapping from flat keywords to a request
(legacy_generate_call_to_request and its helpers), and the tests of that
mapping are removed. Comments and docs that named generate_video describe
generate and request extensions instead.

scripts/ltx2_sr_alignment.py keeps its generate_video call, because its
reference run imports the separate FastVideo-internal package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012M91wnVFmPEvJ9h39r5BH7
This commit is contained in:
Davids048
2026-10-03 02:17:49 +00:00
co-authored by Claude Opus 5.5
parent d6ba5ced94
commit d728a0dc5f
21 changed files with 37 additions and 295 deletions
@@ -682,20 +682,23 @@ def main():
print(" 1. Test basic generation:")
print(" from fastvideo import VideoGenerator")
print(f" generator = VideoGenerator.from_pretrained('{output_dir}')")
print(" video = generator.generate_video(")
print(" prompt='A cat playing piano',")
print(" num_inference_steps=50")
print(" )")
print(" video = generator.generate({")
print(" 'prompt': 'A cat playing piano',")
print(" 'sampling': {'num_inference_steps': 50},")
print(" })")
print()
if (output_dir / "lora" / "distilled").exists():
print(" 2. Test distilled generation (16 steps with LoRA):")
print(f" generator = VideoGenerator.from_pretrained('{output_dir}',")
print(f" lora_path='{output_dir}/lora/distilled',")
print(" lora_nickname='distilled')")
print(" video = generator.generate_video(")
print(" prompt='A cat playing piano',")
print(" num_inference_steps=16,")
print(" guidance_scale=1.0)")
print(" generator = VideoGenerator.from_config({")
print(f" 'model_path': '{output_dir}',")
print(" 'pipeline': {'components': {")
print(f" 'lora_path': '{output_dir}/lora/distilled',")
print(" 'lora_nickname': 'distilled'}},")
print(" })")
print(" video = generator.generate({")
print(" 'prompt': 'A cat playing piano',")
print(" 'sampling': {'num_inference_steps': 16, 'guidance_scale': 1.0},")
print(" })")
print()
print()