Skip to content

Update default_runner.py#607

Merged
gushiqiao merged 1 commit intoModelTC:mainfrom
Naist4869:patch-1
Dec 13, 2025
Merged

Update default_runner.py#607
gushiqiao merged 1 commit intoModelTC:mainfrom
Naist4869:patch-1

Conversation

@Naist4869
Copy link
Copy Markdown
Contributor

WanModel 继承自 CompiledMethodsMixin,它肯定有 compile

WanModel 继承自 CompiledMethodsMixin,它肯定有 compile
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Naist4869, 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!

此PR修复了 default_runner.py 中的一个细微但关键的拼写错误。此更改确保当启用 compile 配置时,模型中的 compile 方法能够被正确识别和调用。这避免了由于拼写错误可能导致的运行时错误或静默失败,从而保证模型编译按预期执行。

Highlights

  • 修复拼写错误: 将 hasattr(self.model, "comple") 中的 comple 更正为 compile,以确保正确检查模型是否具有 compile 方法。
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
Copy Markdown
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

您好,感谢您的贡献。本次 PR 修复了 init_modules 方法中的一个拼写错误,这是正确的。在审查评论中,我指出了在同一文件中还有一处同样的拼写错误,建议您一并修复以保持代码的一致性。

self.run_input_encoder = self._run_input_encoder_local_s2v
self.config.lock() # lock config to avoid modification
if self.config.get("compile", False) and hasattr(self.model, "comple"):
if self.config.get("compile", False) and hasattr(self.model, "compile"):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

感谢修复此处的拼写错误!这是一个很好的发现。

另外,我注意到在同一个文件的 run_main 方法中(第 306 行)也存在同样的拼写错误,如下所示:

if self.config.get("compile", False) and hasattr(self.model, "comple"):
    self.model.select_graph_for_compile(self.input_info)

建议将此处的 comple 也一并修改为 compile,以确保代码逻辑的完整性和一致性。

@gushiqiao gushiqiao merged commit 66dfa22 into ModelTC:main Dec 13, 2025
1 check passed
helloyongyang pushed a commit that referenced this pull request Mar 6, 2026
WanModel 继承自 CompiledMethodsMixin,它肯定有 compile
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