ray icon indicating copy to clipboard operation
ray copied to clipboard

[HPU] [Train] Add a Stable Diffusion fine-tuning and serving example

Open kira-lin opened this issue 9 months ago • 3 comments

Why are these changes needed?

This PR adds an example for stable diffusion model fine-tuning and serving using HPU. Moreover, it also covers how to adapt an existing HPU example to run on Ray, so that users can use Ray to run the examples on huggingface/optimum-habana.

Related issue number

Checks

  • [ ] I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • [ ] I've run scripts/format.sh to lint the changes in this PR.
  • [ ] I've included any doc changes needed for https://docs.ray.io/en/master/.
    • [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in doc/source/tune/api/ under the corresponding .rst file.
  • [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • [ ] Unit tests
    • [ ] Release tests
    • [ ] This PR is not tested :(

kira-lin avatar May 09 '24 06:05 kira-lin

Let's also add this example to doc/source/train/examples.yml. You can refer to this PR: https://github.com/ray-project/ray/pull/44667/files.

Also, could you include the required libraries with versions, so that users can reproduce on their own?

woshiyyya avatar May 10 '24 21:05 woshiyyya

Screenshot 2024-05-16 at 1 08 50 PM

Seems to have a syntax error in the notebook. Can you fix that?

woshiyyya avatar May 16 '24 20:05 woshiyyya

Hi @peytondmurray , it's me that added this (hpu_sd_finetune)= tag following our old doc style. Sorry for the confusion, we can remove it if it's no longer applicable now.

For (5), @kira-lin let's remove the outputs and only show the result object in a new cell.

woshiyyya avatar May 17 '24 18:05 woshiyyya

ping @woshiyyya @justinvyu , can we merge this?

kira-lin avatar May 29 '24 01:05 kira-lin

Hi @peytondmurray , can you take a look again and see if the change requests can be resolved?

woshiyyya avatar May 29 '24 18:05 woshiyyya