Skip to content

[Feat] Add f2v for sekotalk#562

Merged
helloyongyang merged 3 commits intomainfrom
dev/f2v
Dec 4, 2025
Merged

[Feat] Add f2v for sekotalk#562
helloyongyang merged 3 commits intomainfrom
dev/f2v

Conversation

@wangshankun
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @wangshankun, 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 a new "f2v" (frame-to-video) processing mode for the seko_talk model, enhancing its ability to generate video conditioned on an initial reference image. The changes involve a new configuration file to activate this mode, modifications to the audio and input processing logic to integrate the reference image as a conditioning element, and a new script to demonstrate its usage. This feature aims to provide more control over the initial state of generated videos by leveraging a static image.

Highlights

  • New F2V Configuration: Introduced configs/seko_talk/seko_talk_28_f2v.json to enable and configure the new "f2v_process" feature for the seko_talk model, including specific inference steps, FPS, and LoRA settings.
  • Conditional Audio Input Processing: Modified lightx2v/models/networks/wan/infer/audio/pre_infer.py to conditionally adjust audio patch embedding concatenation based on the f2v_process flag, preventing audio embeddings from being concatenated with the main input x when f2v is active.
  • Reference Image Integration: Updated lightx2v/models/runners/wan/wan_audio_runner.py to store the input image as a reference (self.ref_img) and use it to initialize self.prev_video when f2v_process is enabled, allowing the initial frame to condition video generation.
  • F2V Run Script: Added scripts/seko_talk/run_seko_talk_28_f2v.sh to provide an example and facilitate running the seko_talk model with the new f2v configuration, including predefined prompts and input paths.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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 introduces a 'first-frame-to-video' (f2v) feature for the sekotalk model. The changes include a new configuration file and run script for this feature, along with modifications in the audio runner and pre-inference logic to handle the f2v_process flag. The core logic correctly uses the input image as the initial frame for video generation. My review includes suggestions to improve the portability of the configuration and the robustness of the new run script by removing a hardcoded path and adding validation for required variables.

"f2v_process": true,
"lora_configs": [
{
"path": "/mnt/afs1/wangshankun/LightX2V/lightx2v_I2V_14B_480p_cfg_step_distill_rank32_bf16.safetensors",
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 file path for the LoRA configuration is hardcoded to an absolute path. This makes the configuration not portable and will cause errors if run on a different machine or with a different directory structure. It's recommended to use a placeholder or a path relative to the model directory, which can be resolved at runtime.

Comment on lines +3 to +5
lightx2v_path=
model_path=

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 variables lightx2v_path and model_path are initialized as empty, requiring users to edit the script. This can lead to errors if not set. A more robust and flexible approach is to read these paths from environment variables and validate that they are set, providing a clear error message to the user if they are missing.

Suggested change
lightx2v_path=
model_path=
lightx2v_path=${LIGHTX2V_PATH:-}
model_path=${MODEL_PATH:-}
if [[ -z "$lightx2v_path" || -z "$model_path" ]]; then
echo "Error: LIGHTX2V_PATH and MODEL_PATH environment variables must be set."
exit 1
fi

@helloyongyang helloyongyang merged commit f67c46e into main Dec 4, 2025
2 checks passed
@helloyongyang helloyongyang deleted the dev/f2v branch December 28, 2025 16:05
helloyongyang added a commit that referenced this pull request Mar 6, 2026
Co-authored-by: Yang Yong (雍洋) <yongyang1030@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants