-
Notifications
You must be signed in to change notification settings - Fork 9.9k
feat: ComfyUI can be run on the specified Ascend NPU #9663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Is there currently an issue with Ascent NPUs not working properly if you have only one? |
No, this PR is intended to address the requirement that allows users to selectively designate specific NPUs for ComfyUI to use when they have multiple Ascend NPUs. This need arises from the fact that Ascend NPU devices rarely appear individually. |
Ah, gotcha, thank you for the explanation. |
Just spoke with comfy, could you change this PR so that instead of adding a new startup argument specific to Ascend, you reuse the |
…NPUs simultaneously.
I have received your suggestions and made the corresponding revisions. Currently, |
To make this much more likely to get merged since it now edits the logic for where pytorch deps get loaded, I will push a commit to this PR to simply make it always set the NPU environment variable, same as it it does for HIP_VISIBLE_DEVICES even though that is for ROCm. The print statement needing to say 'npu' is unnecessary. In the future we may say 'setting hardware device id' or something like that for the print statement, but the scope of this PR should be just to get the Ascend NPU device selection working. |
…able without any other edits to master branch
Thank you, this looks much cleaner! I'm considering whether to add detection code like |
Related to #7785
This PR adds support for running ComfyUI on a single Ascend NPU card.
The key changes include:
This allows users with a single Ascend NPU to run ComfyUI without needing multi-card configuration, lowering the entry barrier for NPU users.