Skip to content

[doc][NPU]Documentation on modifications, NPU environment installation, and additional parameter#1297

Open
Feng0w0 wants to merge 2 commits intomodelscope:mainfrom
Feng0w0:npu_fused
Open

[doc][NPU]Documentation on modifications, NPU environment installation, and additional parameter#1297
Feng0w0 wants to merge 2 commits intomodelscope:mainfrom
Feng0w0:npu_fused

Conversation

@Feng0w0
Copy link
Contributor

@Feng0w0 Feng0w0 commented Feb 13, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Feng0w0, 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 focuses on enhancing the documentation related to NPU (Neural Processing Unit) support. It introduces guidance for a new model series to optimize its performance on NPU hardware and refines the installation instructions for NPU environments to ensure proper setup across different architectures. The changes aim to improve clarity and accuracy for users working with NPU-accelerated pipelines.

Highlights

  • NPU Documentation for Z-Image Series: Added documentation for the Z-Image series model, detailing the use of the --enable_npu_patch parameter to leverage NPU fusion operators for improved performance on NPU devices. This update is reflected in both English and Chinese GPU support documents.
  • NPU Environment Setup Update: Revised the pip install commands within the NPU environment setup instructions. The --extra-index-url "https://download.pytorch.org/whl/cpu" parameter was moved from the npu_aarch64 installation command to the npu (x86) installation command, ensuring correct dependency resolution for different NPU architectures.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/en/Pipeline_Usage/GPU_support.md
    • Added a new entry for the Z-Image series model, specifying the --enable_npu_patch parameter for NPU performance optimization.
  • docs/en/Pipeline_Usage/Setup.md
    • Modified the pip install commands for NPU environments, specifically relocating the --extra-index-url "https://download.pytorch.org/whl/cpu" from the npu_aarch64 installation to the npu (x86) installation.
  • docs/zh/Pipeline_Usage/GPU_support.md
    • Added a new entry in Chinese for the Z-Image series model, specifying the --enable_npu_patch parameter for NPU performance optimization.
  • docs/zh/Pipeline_Usage/Setup.md
    • Modified the pip install commands for NPU environments in the Chinese documentation, specifically relocating the --extra-index-url "https://download.pytorch.org/whl/cpu" from the npu_aarch64 installation to the npu (x86) installation.
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 updates the documentation for NPU support, including installation instructions and adding a new parameter for the Z-Image series model. The changes are clear and helpful. I've made two minor suggestions to add a newline at the end of the modified markdown files, which is a common best practice to ensure file integrity and compatibility with various tools.

| Wan 14B series | --initialize_model_on_cpu | The 14B model needs to be initialized on the CPU |
| Qwen-Image series | --initialize_model_on_cpu | The model needs to be initialized on the CPU | No newline at end of file
| Qwen-Image series | --initialize_model_on_cpu | The model needs to be initialized on the CPU |
| Z-Image series | --enable_npu_patch | Using NPU fusion operator to replace the corresponding operator in Z-image model to improve the performance of the model on NPU | 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. This can prevent issues with file concatenation and some tools that might not process the last line correctly if it's not terminated by a newline.

Suggested change
| Z-Image series | --enable_npu_patch | Using NPU fusion operator to replace the corresponding operator in Z-image model to improve the performance of the model on NPU |
| Z-Image series | --enable_npu_patch | Using NPU fusion operator to replace the corresponding operator in Z-image model to improve the performance of the model on NPU |

| Wan 14B系列 | --initialize_model_on_cpu | 14B模型需要在cpu上进行初始化 |
| Qwen-Image系列 | --initialize_model_on_cpu | 模型需要在cpu上进行初始化 | No newline at end of file
| Qwen-Image系列 | --initialize_model_on_cpu | 模型需要在cpu上进行初始化 |
| Z-Image 系列 | --enable_npu_patch | 使用NPU融合算子来替换Z-image模型中的对应算子以提升模型在NPU上的性能 | 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. This can prevent issues with file concatenation and some tools that might not process the last line correctly if it's not terminated by a newline.

Suggested change
| Z-Image 系列 | --enable_npu_patch | 使用NPU融合算子来替换Z-image模型中的对应算子以提升模型在NPU上的性能 |
| Z-Image 系列 | --enable_npu_patch | 使用NPU融合算子来替换Z-image模型中的对应算子以提升模型在NPU上的性能 |

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.

1 participant