stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Add training support and change lspci for Ascend NPU

Open wangshuai09 opened this issue 1 year ago • 3 comments

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 avatar Feb 21 '24 07:02 wangshuai09

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

AUTOMATIC1111 avatar Feb 26 '24 04:02 AUTOMATIC1111

If there are no video card and NPU, the torch_command will not change. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/cf2772fab0af5573da775e7437e6acdca424f26e/modules/launch_utils.py#L318 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

wangshuai09 avatar Feb 27 '24 01:02 wangshuai09

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

AUTOMATIC1111 avatar Mar 02 '24 04:03 AUTOMATIC1111

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

wangshuai09 avatar Mar 04 '24 09:03 wangshuai09