Add LongCat T2V (Base, Distillation and Refinement) Support to FastVideo#883
Merged
SolitaryThinker merged 134 commits intohao-ai-lab:mainfrom Dec 23, 2025
Merged
Add LongCat T2V (Base, Distillation and Refinement) Support to FastVideo#883SolitaryThinker merged 134 commits intohao-ai-lab:mainfrom
SolitaryThinker merged 134 commits intohao-ai-lab:mainfrom
Conversation
…rence/v1_inference_wan.sh
Collaborator
Author
|
Successfully implemented SSIM and verified it on the 4x L40S platform. Currently, the thresholds are set to 0.93 for distill/base and 0.90 for refine. Please let me know if these values align with expectations (or if they need tuning). |
Collaborator
Author
|
The SSIM tests are still timing out (>60 mins) even with reduced steps. I suggest merging the Longcat t2v without ssim for now, and I'll handle the SSIM efficiency optimization in a separate PR. |
SolitaryThinker
approved these changes
Dec 23, 2025
shijiew555
pushed a commit
to Gary-ChenJL/FastVideo
that referenced
this pull request
Apr 8, 2026
…deo (hao-ai-lab#883) Co-authored-by: Shao Duan <shaoxiongduan@gmail.com>
RandNMR73
pushed a commit
that referenced
this pull request
Apr 8, 2026
…deo (#883) Co-authored-by: Shao Duan <shaoxiongduan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR integrates LongCat-Video into FastVideo as a first-class text-to-video (T2V) pipeline, including:
Key Changes
1. Model & Pipeline Configuration
fastvideo/configs/models/dits/longcat.pyLongCatVideoArchConfigandLongCatVideoConfigfor the native LongCat DiT.fastvideo/configs/pipelines/longcat.pyLongCatDiTArchConfigfor Phase 1 wrapper compatibility.LongCatT2V480PConfig(base 480p pipeline) andLongCatT2V704PConfig(704p refinement with BSA enabled).fastvideo/configs/models/dits/__init__.py/fastvideo/models/registry.py/fastvideo/configs/pipelines/registry.py/fastvideo/pipelines/pipeline_registry.pyLongCatPipeline."longcat"key.2. LongCat Pipeline & Stages (Base + Refinement)
fastvideo/pipelines/basic/longcat/longcat_pipeline.pyLongCatPipelineas a composed pipeline with LoRA support.LongCatRefineInitStage,LongCatRefineTimestepStage).fastvideo/pipelines/stages/longcat_refine_init.pyt_thresh.batchfor later cropping.fastvideo/pipelines/stages/longcat_refine_timestep.pyt_threshand updates scheduler timesteps/sigmas accordingly.fastvideo/pipelines/stages/longcat_denoising.pynoise_predto match flow-matching scheduler convention.fastvideo/pipelines/pipeline_batch_info.py/fastvideo/configs/sample/base.pyForwardBatchandSamplingParamwith LongCat refine fields:refine_from,t_thresh,spatial_refine_only,num_cond_frames,stage1_video.--refine-from,--t-thresh, etc.).fastvideo/pipelines/stages/latent_preparation.py/fastvideo/pipelines/stages/decoding.pyinit_noise_sigma).fastvideo/pipelines/stages/utils.pyget_bucket_config()used to select resolutions for 480p/720p LongCat.3. RoPE, LoRA & BSA Triton kernel support
fastvideo/layers/rotary_embedding_3d.pyfastvideo/layers/lora/linear.py/fastvideo/pipelines/lora_pipeline.py/fastvideo/fastvideo_args.pyalpha = lora_alpha / rank).LoRAPipelineto parse/store*.lora_alphaalongsidelora_A,lora_B.--lora-path,--lora-nickname,--lora-target-modules).fastvideo/third_party/longcat_video/block_sparse_attention/*4. Checkpoint Conversion, Inference Scripts
scripts/checkpoint_conversion/longcat_to_fastvideo.pyscripts/inference/v1_inference_longcat*.shTests
assets/and verified successful 480p video outputs for each prompt.Known limitations: