Skip to content
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

Add training support and change lspci for Ascend NPU #14981

Merged
merged 3 commits into from Mar 4, 2024

Conversation

wangshuai09
Copy link
Contributor

@wangshuai09 wangshuai09 commented Feb 21, 2024

Description

  • gpu_info=$(lspci 2>/dev/null | grep -E "VGA|Display") shows the iBMC chip VGA support for Ascend NPU because Ascend NPU has no ability of VGA or Display. So "npu-smi info" is more suitable to comfirm Ascend NPU exists.
  • support training of embedding and hypernetwork.

Screenshots/videos:

  • train embedding
    image
    image

  • train hypernetwork
    image
    image

Checklist:

@wangshuai09 wangshuai09 changed the title Change lspci for Ascend NPU Add training support and change lspci for Ascend NPU Feb 22, 2024
@AUTOMATIC1111
Copy link
Owner

And how would it look for the case where no videocard and no NPU is available?

@wangshuai09
Copy link
Contributor Author

If there are no video card and NPU, the torch_command will not change.

torch_command = os.environ.get('TORCH_COMMAND', f"pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url {torch_index_url}")

It will use cpu as backend and here is screen shoot running with a downloaded embedding,
image

There is a bug in windows with cpu, if using create Embedding, it could save success,
image
But there is no test.pt when training, maybe something wrong in save embedding process.
image
image

@AUTOMATIC1111
Copy link
Owner

What I mean is, it will try to run npu-smi, and that does not exist on most machine.

elif eval "npu-smi info" line should be elif npu-smi info 2>/dev/null

@wangshuai09
Copy link
Contributor Author

wangshuai09 commented Mar 4, 2024

Sorry for my misunderstanding. It will print error on screen using elif eval "npu-smi info.
Your advise is so great.

@AUTOMATIC1111 AUTOMATIC1111 merged commit eee46a5 into AUTOMATIC1111:dev Mar 4, 2024
3 checks passed
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.

None yet

2 participants