Skip to content

Conversation

@BrianChen1129
Copy link
Collaborator

No description provided.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @BrianChen1129, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces new Slurm training examples for Image-to-Video (I2V) and Text-to-Video (T2V) models that leverage Video Sparse Attention (VSA), enhancing the training capabilities within the project. It also includes a reorganization of existing distillation scripts and a utility for dataset acquisition, streamlining the setup process for users.

Highlights

  • New VSA Training Examples: Added dedicated Slurm scripts (I2V-14B-VSA.slurm, T2V-14B-VSA.slurm) for training Image-to-Video (I2V) and Text-to-Video (T2V) models using Video Sparse Attention (VSA). These scripts are configured with specific VSA-related arguments and environment setups for Slurm clusters.
  • Slurm Script Reorganization: Renamed and relocated existing distillation Slurm scripts (distill_dmd_VSA_t2v.slurm, distill_dmd_VSA_t2v_14B_480P.slurm, distill_dmd_t2v.slurm) to a new Wan2.1-T2V-480P directory, along with minor argument formatting adjustments within these files.
  • Dataset Download Utility: Included a new download_dataset.sh script to simplify the acquisition of 480P and 720P Wan-Syn datasets from Hugging Face, providing necessary data for the new training examples.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds several new example scripts for VSA (Video Sparse Attention) training using Slurm. It also refactors some existing scripts. The new scripts are well-structured but have some minor issues like redundant environment variable exports, non-portable home directory paths, and missing newlines at the end of files. There is also a critical typo in one of the renamed scripts that would break its execution. My review provides suggestions to fix these issues.

training_args=(
--tracker_project_name wan_t2v_distill_dmd_VSA
--output_dir="checkpoints/wan_t2v_finetune"
--output_dir"checkpoints/wan_t2v_finetune"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

There seems to be a typo here. The = was removed but not replaced with a space. This will likely cause the argument to be parsed incorrectly as --output_dircheckpoints/wan_t2v_finetune, which would break the script. Based on other changes in this PR, the intention was likely to separate the argument and its value with a space.

  --output_dir "checkpoints/wan_t2v_finetune"

set -e -x

# Environment Setup
source ~/conda/miniconda/bin/activate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using ~ for the home directory might not be portable in all shell environments, especially non-interactive ones. It's generally safer and more explicit to use $HOME.

source $HOME/conda/miniconda/bin/activate

export CUDA_VISIBLE_DEVICES=$SLURM_LOCALID
export TOKENIZERS_PARALLELISM=false
export WANDB_BASE_URL="https://api.wandb.ai"
export WANDB_MODE=online
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The WANDB_MODE environment variable is exported twice. This line is redundant as it's already set on line 20.

"${optimizer_args[@]}" \
"${validation_args[@]}" \
"${miscellaneous_args[@]}" \
"${vsa_args[@]}" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a good practice to end files with a newline character for POSIX compatibility.

    "${vsa_args[@]}"

set -e -x

# Environment Setup
source ~/conda/miniconda/bin/activate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using ~ for the home directory might not be portable in all shell environments, especially non-interactive ones. It's generally safer and more explicit to use $HOME.

source $HOME/conda/miniconda/bin/activate

export CUDA_VISIBLE_DEVICES=$SLURM_LOCALID
export TOKENIZERS_PARALLELISM=false
export WANDB_BASE_URL="https://api.wandb.ai"
export WANDB_MODE=online
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The WANDB_MODE environment variable is exported twice. This line is redundant as it's already set on line 20.

"${optimizer_args[@]}" \
"${validation_args[@]}" \
"${miscellaneous_args[@]}" \
"${vsa_args[@]}" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a good practice to end files with a newline character for POSIX compatibility.

    "${vsa_args[@]}"

python scripts/huggingface/download_hf.py --repo_id "FastVideo/Wan-Syn_77x448x832_600k" --local_dir "FastVideo/Wan-Syn_77x448x832_600k" --repo_type "dataset"

# 720P dataset
python scripts/huggingface/download_hf.py --repo_id "FastVideo/Wan-Syn_77x768x1280_250k" --local_dir "FastVideo/Wan-Syn_77x768x1280_250k" --repo_type "dataset" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a good practice to end files with a newline character for POSIX compatibility.

Suggested change
python scripts/huggingface/download_hf.py --repo_id "FastVideo/Wan-Syn_77x768x1280_250k" --local_dir "FastVideo/Wan-Syn_77x768x1280_250k" --repo_type "dataset"
python scripts/huggingface/download_hf.py --repo_id "FastVideo/Wan-Syn_77x768x1280_250k" --local_dir "FastVideo/Wan-Syn_77x768x1280_250k" --repo_type "dataset"

@BrianChen1129 BrianChen1129 added the go Trigger Buildkite CI label Jul 30, 2025
training_args=(
--tracker_project_name wan_t2v_distill_dmd_VSA
--output_dir="checkpoints/wan_t2v_finetune"
--output_dir"checkpoints/wan_t2v_finetune"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space between arg name and arg?

@BrianChen1129 BrianChen1129 merged commit f759980 into main Jul 30, 2025
1 check failed
@BrianChen1129 BrianChen1129 deleted the yq/update branch August 12, 2025 22:23
qimcis pushed a commit to qimcis/FastVideo that referenced this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Trigger Buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants