feat(npu): add Ascend platform abstraction and Qwen-Image NPU support - #264
Open
Chitandaaaaa wants to merge 1 commit into
Open
feat(npu): add Ascend platform abstraction and Qwen-Image NPU support#264Chitandaaaaa wants to merge 1 commit into
Chitandaaaaa wants to merge 1 commit into
Conversation
1. Add NPU 950 platform abstraction layer with device registry and auto_detect_device 2. Support mindiesd_attention and mindiesd_compile with capability detection and compile_backend 3. Adapt Qwen-Image model to use platform compile kwargs and NPU attention backend
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an Ascend NPU platform abstraction on top of DiffSynth-Engine
main, and wire Qwen-Image to MindIE-SD attention / compile backends for single-card inference.Changes
diffsynth_engine/platforms/with a device registry andauto_detect/resolve_platformfor CPU / CUDA / ROCm / MPS / AscendAscendPlatformwith capability probing formindie,mindie_attention, andmindie_compilemindieattention backend (AttnImpl.MINDIE) and auto-select it when MindIE-SD is availableQwenImagePipeline.compile()to pass platform-specificcompile_kwargs(MindIE-SD backend when supported)Scope
attn_impl="mindie"is explicitly unsupported for nowFiles
diffsynth_engine/platforms/{__init__,base,ascend}.py(new)diffsynth_engine/utils/platform.py,utils/flag.pydiffsynth_engine/models/basic/attention.pydiffsynth_engine/configs/pipeline.pydiffsynth_engine/pipelines/qwen_image.pyMade with Cursor