├── LICENSE.txt ├── README.md ├── assets └── head.jpg ├── comfyui ├── SRPO-workflow.json └── SRPO-workflow.png ├── env_setup.sh ├── fastvideo ├── SRPO.py ├── data_preprocess │ ├── preprocess_flux_embedding.py │ └── preprocess_validation_text_embeddings.py ├── dataset │ ├── __init__.py │ ├── latent_datasets.py │ ├── latent_flux_rl_datasets.py │ ├── latent_rl_datasets.py │ ├── t2v_datasets.py │ └── transform.py ├── distill │ ├── __init__.py │ ├── discriminator.py │ └── solver.py ├── models │ ├── flash_attn_no_pad.py │ ├── flux_hf │ │ └── pipeline_flux.py │ ├── hunyuan │ │ ├── __init__.py │ │ ├── constants.py │ │ ├── diffusion │ │ │ ├── __init__.py │ │ │ ├── pipelines │ │ │ │ ├── __init__.py │ │ │ │ └── pipeline_hunyuan_video.py │ │ │ └── schedulers │ │ │ │ ├── __init__.py │ │ │ │ └── scheduling_flow_match_discrete.py │ │ ├── idle_config.py │ │ ├── inference.py │ │ ├── modules │ │ │ ├── __init__.py │ │ │ ├── activation_layers.py │ │ │ ├── attenion.py │ │ │ ├── embed_layers.py │ │ │ ├── mlp_layers.py │ │ │ ├── models.py │ │ │ ├── modulate_layers.py │ │ │ ├── norm_layers.py │ │ │ ├── posemb_layers.py │ │ │ └── token_refiner.py │ │ ├── prompt_rewrite.py │ │ ├── text_encoder │ │ │ └── __init__.py │ │ ├── utils │ │ │ ├── __init__.py │ │ │ ├── data_utils.py │ │ │ ├── file_utils.py │ │ │ ├── helpers.py │ │ │ └── preprocess_text_encoder_tokenizer_utils.py │ │ └── vae │ │ │ ├── __init__.py │ │ │ ├── autoencoder_kl_causal_3d.py │ │ │ ├── unet_causal_3d_blocks.py │ │ │ └── vae.py │ ├── hunyuan_hf │ │ ├── modeling_hunyuan.py │ │ └── pipeline_hunyuan.py │ └── mochi_hf │ │ ├── convert_diffusers_to_mochi.py │ │ ├── mochi_latents_utils.py │ │ ├── modeling_mochi.py │ │ ├── norm.py │ │ └── pipeline_mochi.py └── utils │ ├── checkpoint.py │ ├── communications.py │ ├── communications_flux.py │ ├── communications_flux2.py │ ├── dataset_utils.py │ ├── env_utils.py │ ├── fsdp_util.py │ ├── load.py │ ├── logging_.py │ ├── optimizer.py │ ├── parallel_states.py │ └── validation.py ├── prompts.txt ├── pyproject.toml ├── requirements-lint.txt ├── scripts ├── .DS_Store ├── finetune │ ├── .DS_Store │ ├── SRPO_training_hpsv2.sh │ └── SRPO_training_ps.sh ├── huggingface │ ├── download_hf.py │ └── upload_hf.py ├── preprocess │ └── preprocess_flux_rl_embeddings.sh └── visualization │ ├── vis_flux.py │ └── vismn.sh ├── videos2caption2.json └── vis.py /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/README.md -------------------------------------------------------------------------------- /assets/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/assets/head.jpg -------------------------------------------------------------------------------- /comfyui/SRPO-workflow.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/comfyui/SRPO-workflow.json -------------------------------------------------------------------------------- /comfyui/SRPO-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/comfyui/SRPO-workflow.png -------------------------------------------------------------------------------- /env_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/env_setup.sh -------------------------------------------------------------------------------- /fastvideo/SRPO.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/SRPO.py -------------------------------------------------------------------------------- /fastvideo/data_preprocess/preprocess_flux_embedding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/data_preprocess/preprocess_flux_embedding.py -------------------------------------------------------------------------------- /fastvideo/data_preprocess/preprocess_validation_text_embeddings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/data_preprocess/preprocess_validation_text_embeddings.py -------------------------------------------------------------------------------- /fastvideo/dataset/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/dataset/__init__.py -------------------------------------------------------------------------------- /fastvideo/dataset/latent_datasets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/dataset/latent_datasets.py -------------------------------------------------------------------------------- /fastvideo/dataset/latent_flux_rl_datasets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/dataset/latent_flux_rl_datasets.py -------------------------------------------------------------------------------- /fastvideo/dataset/latent_rl_datasets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/dataset/latent_rl_datasets.py -------------------------------------------------------------------------------- /fastvideo/dataset/t2v_datasets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/dataset/t2v_datasets.py -------------------------------------------------------------------------------- /fastvideo/dataset/transform.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/dataset/transform.py -------------------------------------------------------------------------------- /fastvideo/distill/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fastvideo/distill/discriminator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/distill/discriminator.py -------------------------------------------------------------------------------- /fastvideo/distill/solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/distill/solver.py -------------------------------------------------------------------------------- /fastvideo/models/flash_attn_no_pad.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/flash_attn_no_pad.py -------------------------------------------------------------------------------- /fastvideo/models/flux_hf/pipeline_flux.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/flux_hf/pipeline_flux.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/constants.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/constants.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/diffusion/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/diffusion/__init__.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/diffusion/pipelines/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/diffusion/pipelines/__init__.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/diffusion/pipelines/pipeline_hunyuan_video.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/diffusion/pipelines/pipeline_hunyuan_video.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/diffusion/schedulers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/diffusion/schedulers/__init__.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/diffusion/schedulers/scheduling_flow_match_discrete.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/diffusion/schedulers/scheduling_flow_match_discrete.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/idle_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/idle_config.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/inference.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/inference.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/__init__.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/activation_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/activation_layers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/attenion.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/attenion.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/embed_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/embed_layers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/mlp_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/mlp_layers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/models.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/modulate_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/modulate_layers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/norm_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/norm_layers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/posemb_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/posemb_layers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/modules/token_refiner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/modules/token_refiner.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/prompt_rewrite.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/prompt_rewrite.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/text_encoder/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/text_encoder/__init__.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/utils/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/utils/data_utils.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/utils/file_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/utils/file_utils.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/utils/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/utils/helpers.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/utils/preprocess_text_encoder_tokenizer_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/utils/preprocess_text_encoder_tokenizer_utils.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/vae/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/vae/__init__.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/vae/autoencoder_kl_causal_3d.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/vae/autoencoder_kl_causal_3d.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/vae/unet_causal_3d_blocks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/vae/unet_causal_3d_blocks.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan/vae/vae.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan/vae/vae.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan_hf/modeling_hunyuan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan_hf/modeling_hunyuan.py -------------------------------------------------------------------------------- /fastvideo/models/hunyuan_hf/pipeline_hunyuan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/hunyuan_hf/pipeline_hunyuan.py -------------------------------------------------------------------------------- /fastvideo/models/mochi_hf/convert_diffusers_to_mochi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/mochi_hf/convert_diffusers_to_mochi.py -------------------------------------------------------------------------------- /fastvideo/models/mochi_hf/mochi_latents_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/mochi_hf/mochi_latents_utils.py -------------------------------------------------------------------------------- /fastvideo/models/mochi_hf/modeling_mochi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/mochi_hf/modeling_mochi.py -------------------------------------------------------------------------------- /fastvideo/models/mochi_hf/norm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/mochi_hf/norm.py -------------------------------------------------------------------------------- /fastvideo/models/mochi_hf/pipeline_mochi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/models/mochi_hf/pipeline_mochi.py -------------------------------------------------------------------------------- /fastvideo/utils/checkpoint.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/checkpoint.py -------------------------------------------------------------------------------- /fastvideo/utils/communications.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/communications.py -------------------------------------------------------------------------------- /fastvideo/utils/communications_flux.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/communications_flux.py -------------------------------------------------------------------------------- /fastvideo/utils/communications_flux2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/communications_flux2.py -------------------------------------------------------------------------------- /fastvideo/utils/dataset_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/dataset_utils.py -------------------------------------------------------------------------------- /fastvideo/utils/env_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/env_utils.py -------------------------------------------------------------------------------- /fastvideo/utils/fsdp_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/fsdp_util.py -------------------------------------------------------------------------------- /fastvideo/utils/load.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/load.py -------------------------------------------------------------------------------- /fastvideo/utils/logging_.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/logging_.py -------------------------------------------------------------------------------- /fastvideo/utils/optimizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/optimizer.py -------------------------------------------------------------------------------- /fastvideo/utils/parallel_states.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/parallel_states.py -------------------------------------------------------------------------------- /fastvideo/utils/validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/fastvideo/utils/validation.py -------------------------------------------------------------------------------- /prompts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/prompts.txt -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/pyproject.toml -------------------------------------------------------------------------------- /requirements-lint.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/requirements-lint.txt -------------------------------------------------------------------------------- /scripts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/.DS_Store -------------------------------------------------------------------------------- /scripts/finetune/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/finetune/.DS_Store -------------------------------------------------------------------------------- /scripts/finetune/SRPO_training_hpsv2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/finetune/SRPO_training_hpsv2.sh -------------------------------------------------------------------------------- /scripts/finetune/SRPO_training_ps.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/finetune/SRPO_training_ps.sh -------------------------------------------------------------------------------- /scripts/huggingface/download_hf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/huggingface/download_hf.py -------------------------------------------------------------------------------- /scripts/huggingface/upload_hf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/huggingface/upload_hf.py -------------------------------------------------------------------------------- /scripts/preprocess/preprocess_flux_rl_embeddings.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/preprocess/preprocess_flux_rl_embeddings.sh -------------------------------------------------------------------------------- /scripts/visualization/vis_flux.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/visualization/vis_flux.py -------------------------------------------------------------------------------- /scripts/visualization/vismn.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/scripts/visualization/vismn.sh -------------------------------------------------------------------------------- /videos2caption2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/videos2caption2.json -------------------------------------------------------------------------------- /vis.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent-Hunyuan/SRPO/HEAD/vis.py --------------------------------------------------------------------------------