Skip to content

Fix reader import error#585

Merged
helloyongyang merged 1 commit intoModelTC:mainfrom
huochaitiantang:fix
Dec 9, 2025
Merged

Fix reader import error#585
helloyongyang merged 1 commit intoModelTC:mainfrom
huochaitiantang:fix

Conversation

@huochaitiantang
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @huochaitiantang, 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 primarily addresses an import error by refactoring several module imports to be conditional, ensuring they are loaded only when needed. It also enhances the robustness of the VAController lifecycle management to prevent runtime errors and updates a configuration default for frame slicing. Additionally, new external libraries have been added to the project's dependencies, indicating potential new features or expanded functionality.

Highlights

  • Conditional Imports Refactoring: The imports for VAReader, OmniVAReader, VARecorder, and X264VARecorder in va_controller.py have been refactored from top-level to conditional imports within their respective initialization methods. This change likely resolves import errors and optimizes module loading.
  • Robust VAController Handling: Error handling for the VAController in wan_audio_runner.py has been improved. The controller is now explicitly initialized to None and its clear() method is called conditionally in the finally block, preventing potential AttributeError if initialization fails.
  • Updated Default Slice Frame: The default value for slice_frame in va_controller.py has been updated to self.prev_frame_length instead of a fixed 1, making its behavior more dynamic based on previous frame length.
  • New Dependencies Added: The requirements.txt file has been updated to include zmq, jsonschema, and pymongo as new project dependencies.
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 primarily addresses an import error by refactoring imports in va_controller.py to be local, which is a good approach to resolve circular dependencies. The changes also include related code cleanup in wan_audio_runner.py to handle object initialization more robustly. I've provided a couple of suggestions to improve code clarity and dependency management. Specifically, I've pointed out a redundant assignment and suggested a way to better manage optional dependencies in requirements.txt.

@helloyongyang helloyongyang merged commit 0ad8ada into ModelTC:main Dec 9, 2025
1 check passed
@huochaitiantang huochaitiantang deleted the fix branch December 16, 2025 02:24
helloyongyang pushed a commit that referenced this pull request Mar 6, 2026
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