Skip to content

make pipelines tests device-agnostic (part1) #9399

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

Merged
merged 72 commits into from
Nov 22, 2024
Merged

Conversation

faaany
Copy link
Contributor

@faaany faaany commented Sep 9, 2024

What does this PR do?

Below are some evidences:

PASSED tests/pipelines/animatediff/test_animatediff.py::AnimateDiffPipelineFastTests::test_to_device
PASSED tests/pipelines/amused/test_amused.py::AmusedPipelineFastTests::test_model_cpu_offload_forward_pass
PASSED tests/pipelines/amused/test_amused.py::AmusedPipelineFastTests::test_cpu_offload_
forward_pass_twice
PASSED tests/pipelines/amused/test_amused_inpaint.py::AmusedInpaintPipelineFastTests::te
st_to_device

@yiyixuxu

@faaany faaany marked this pull request as ready for review September 9, 2024 22:55
@sayakpaul
Copy link
Member

Could you provide some details about the machine you used to run the tests changed in this PR?

@faaany
Copy link
Contributor Author

faaany commented Sep 10, 2024

Could you provide some details about the machine you used to run the tests changed in this PR?

yes, I am running on Intel(R) Data Center GPU Max 1550.

@faaany
Copy link
Contributor Author

faaany commented Sep 10, 2024

Could you provide some details about the machine you used to run the tests changed in this PR?

xpu is the common device name for intel gpu.

@faaany
Copy link
Contributor Author

faaany commented Sep 12, 2024

Hi @sayakpaul , any concern on this PR?

@faaany
Copy link
Contributor Author

faaany commented Sep 13, 2024

could you pls help retrigger the CI? Thx a lot!

@sayakpaul sayakpaul requested a review from yiyixuxu September 13, 2024 05:46
@faaany
Copy link
Contributor Author

faaany commented Nov 11, 2024

Thanks for the comments. Code Update!

@IlyasMoutawwakil
Copy link
Member

@faaany can you please run styling on this branch and apply the same comments to part 2 PR ? (require_non_cpu is still defined and used there)

@faaany
Copy link
Contributor Author

faaany commented Nov 18, 2024

@faaany can you please run styling on this branch and apply the same comments to part 2 PR ? (require_non_cpu is still defined and used there)

Thanks for the review! Style fixed and let me un-draft the part2 PR, once this one got merged

@IlyasMoutawwakil
Copy link
Member

@faaany your changes didn't pass the code quality check, can you do make style && make quality

@faaany
Copy link
Contributor Author

faaany commented Nov 18, 2024

@faaany your changes didn't pass the code quality check, can you do make style && make quality

done

Copy link
Member

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the awesome work here! I think this looks good to merge and the failing tests are unrelated (I've restarted them anyway to make it go away). Off to @DN6 for merging since he has much more experience on the tests front

@a-r-r-o-w a-r-r-o-w requested a review from DN6 November 18, 2024 20:41
@faaany
Copy link
Contributor Author

faaany commented Nov 21, 2024

Hi @DN6 , could you take a look at this PR?

@DN6 DN6 merged commit 64b3e0f into huggingface:main Nov 22, 2024
14 of 15 checks passed
lawrence-cj pushed a commit to lawrence-cj/diffusers that referenced this pull request Nov 26, 2024
* enable on xpu

* add 1 more

* add one more

* enable more

* add 1 more

* add more

* enable 1

* enable more cases

* enable

* enable

* update comment

* one more

* enable 1

* add more cases

* enable xpu

* add one more caswe

* add more cases

* add 1

* add more

* add more cases

* add case

* enable

* add more

* add more

* add more

* enbale more

* add more

* update code

* update test marker

* add skip back

* update comment

* remove single files

* remove

* style

* add

* revert

* reformat

* update decorator

* update

* update

* update

* Update tests/pipelines/deepfloyd_if/test_if.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update src/diffusers/utils/testing_utils.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <[email protected]>

* update float16

* no unitest.skipt

* update

* apply style check

* reapply format

---------

Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: Dhruv Nair <[email protected]>
sayakpaul added a commit that referenced this pull request Dec 23, 2024
* enable on xpu

* add 1 more

* add one more

* enable more

* add 1 more

* add more

* enable 1

* enable more cases

* enable

* enable

* update comment

* one more

* enable 1

* add more cases

* enable xpu

* add one more caswe

* add more cases

* add 1

* add more

* add more cases

* add case

* enable

* add more

* add more

* add more

* enbale more

* add more

* update code

* update test marker

* add skip back

* update comment

* remove single files

* remove

* style

* add

* revert

* reformat

* update decorator

* update

* update

* update

* Update tests/pipelines/deepfloyd_if/test_if.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update src/diffusers/utils/testing_utils.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <[email protected]>

* update float16

* no unitest.skipt

* update

* apply style check

* reapply format

---------

Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: Dhruv Nair <[email protected]>
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.

8 participants