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

[NPU] sdxl lora support NPU training #718

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ppdiffusers/examples/text_to_image/README_sdxl.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,14 @@ for file_name in sorted(os.listdir(dir_name)):
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5).images[0]
image.save("pokemon_" + file_name + ".png")
```

## NPU硬件训练
请参照[tools](../../tools/README.md)进行NPU硬件Paddle安装。

使用NPU进行LoRA训练和推理时参考如下命令设置相应的环境变量,训练和推理运行命令可直接参照上述LoRA训练和推理命令。
```bash
export FLAGS_npu_storage_format=0
export FLAGS_use_stride_kernel=0
export FLAGS_npu_scale_aclnn=True
export FLAGS_allocator_strategy=auto_growth
```