Skip to content

Conversation

@sayakpaul
Copy link
Member

What does this PR do?

Follow-up of #7477.

This PR targets the test_dict_tuple_outputs_equivalent() method we run for all pipelines. I took the top 10 time-consuming tests from the lot and decided to use static slices ONLY for them. This is because of the rest of the tests, it's under a second. So, it doesn't matter that much.

The next PR will be similar to this but for test_inference_batch_single_identical().

@sayakpaul sayakpaul requested review from DN6 and yiyixuxu March 29, 2024 13:15
image_latents_params = TEXT_TO_IMAGE_IMAGE_PARAMS

def get_dummy_components(self):
torch.manual_seed(0)
Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise for consecutive runs, the underlying pipeline will yield different results.

expected_slice = np.array(
[0.5381963, 0.4836803, 0.45821992, 0.5577731, 0.51210403, 0.4794795, 0.59282357, 0.5647199, 0.43100584]
)
expected_slice = np.array([0.549, 0.5053, 0.4676, 0.5816, 0.5364, 0.483, 0.5937, 0.5719, 0.4318])
Copy link
Member Author

Choose a reason for hiding this comment

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

The reason why this needs changing is because we're fixing the seeds when initializing the model level components of the pipeline.

@sayakpaul sayakpaul merged commit 2b04ec2 into main Apr 2, 2024
@sayakpaul sayakpaul deleted the speed-up-fast-pipeline-tests-ii branch April 2, 2024 07:55
noskill pushed a commit to noskill/diffusers that referenced this pull request Apr 5, 2024
* start printing the tensors.

* print full throttle

* set static slices for 7 tests.

* remove printing.

* flatten

* disable test for controlnet

* what happens when things are seeded properly?

* set the right value

* style./

* make pia test fail to check things

* print.

* fix pia.

* checking for animatediff.

* fix: animatediff.

* video synthesis

* final piece.

* style.

* print guess.

* fix: assertion for control guess.

---------

Co-authored-by: Dhruv Nair <[email protected]>
sayakpaul added a commit that referenced this pull request Dec 23, 2024
* start printing the tensors.

* print full throttle

* set static slices for 7 tests.

* remove printing.

* flatten

* disable test for controlnet

* what happens when things are seeded properly?

* set the right value

* style./

* make pia test fail to check things

* print.

* fix pia.

* checking for animatediff.

* fix: animatediff.

* video synthesis

* final piece.

* style.

* print guess.

* fix: assertion for control guess.

---------

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.

3 participants