diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[Tests] help us speed up the fast pipeline tests

Open sayakpaul opened this issue 1 year ago • 6 comments

Currently, the pipeline tests (located under tests/pipelines) take a bit of time to run. We recently performed some optimizations to speed them up but, we can do better.

This is especially desirable because it greatly improves the contribution experience not just for the community but also for us, maintainers. So, we welcome contributions from the community to improve the pipeline test suite that runs during PRs 🤗

What's the problem?

Many pipeline tests (here's an example) use model-level components (such as the UNet) whose size can be made much smaller for testing purposes. The bigger their size, the longer it's going to take to execute them (obviously).

How can you help?

Reduce the sizes of the model-level components and thereby making the pipeline tests run faster.

How should you submit a PR?

  • Start by inspecting the get_dummy_components() function (example) for a given pipeline test script.
  • If you think that the block sizes could further be reduced, make changes, and then run the testing suite.
  • Submit a PR with your changes.

Things to note

  • When submitting a PR, please consider one and only PR pipeline test script at a time.
  • Please tag me in your PR descriptions and mention this issue so that we can keep a proper track.
  • You should try to keep the scope of the changes ONLY to the get_dummy_components() function. If further changes are required, please explain the motivation behind them in your PR description.
  • You can refer to https://github.com/huggingface/diffusers/pull/7580 as a reference.

@yiyixuxu @DN6 for awareness and visibility.

sayakpaul avatar Apr 15 '24 03:04 sayakpaul

Hey @sayakpaul I'd like to take a shot at this. :)

nxbringr avatar Apr 16 '24 01:04 nxbringr

Feel free to target one pipeline test and send over a PR :)

sayakpaul avatar Apr 16 '24 05:04 sayakpaul

Hi @sayakpaul, I would like to contribute!

chiral-carbon avatar Apr 17 '24 02:04 chiral-carbon

Feel free to target one pipeline test and send over a PR :)

sayakpaul avatar Apr 17 '24 03:04 sayakpaul

hey @sayakpaul i am interested to work on this!

AbhinavJangra29 avatar Apr 17 '24 08:04 AbhinavJangra29

@AbhinavJangra29 feel free to open a PR and tag me.

sayakpaul avatar Apr 30 '24 02:04 sayakpaul