Skip to content

unet check length inputs #2327

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 6 commits into from
Feb 14, 2023

Conversation

williamberman
Copy link
Contributor

@williamberman williamberman commented Feb 13, 2023

re: #2277 + added length checks to block types

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 13, 2023

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten
Copy link
Contributor

Seems like some fast tests are failing will correct them quickly with the printing test tools, so that you can do it next time :-)

  1. Copy-paste all the test failures from: https://github.com/huggingface/diffusers/actions/runs/4161816897/jobs/7200239166#step:6:4144
  2. Extract only the test function names from that file so that you get:
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py::StableDiffusionDepth2ImgPipelineFastTests::test_stable_diffusion_depth2img_default_case
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py::StableDiffusionDepth2ImgPipelineFastTests::test_stable_diffusion_depth2img_multiple_init_images
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py::StableDiffusionDepth2ImgPipelineFastTests::test_stable_diffusion_depth2img_negative_prompt
tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py::StableDiffusionDepth2ImgPipelineFastTests::test_stable_diffusion_depth2img_pil

and save in file failures.txt.
3. Add print_tensor_out to all the relevant tests that are failing, e.g. see: ec6eb48
4. Run:

pytest $(tr '\n' ' ' <../test_failures/failures.txt)
  1. Now a test_corrections.txt file should have been created at root. Run python utils/overwrite_expected_slice.py --correct_filename test_corrections.txt to automatically fix all the tests.
  2. This will look as follows: 64d1727
  3. Run tests again with point 4. -> they should all pass now.
  4. Clean up PR: dbf78f5

=> Finished! Should take only 5min this way instead of having to tediously print out and copy-paste expected values.

@patrickvonplaten
Copy link
Contributor

@williamberman feel free to merge whenever

@williamberman williamberman merged commit e55687e into huggingface:main Feb 14, 2023
mengfei25 pushed a commit to mengfei25/diffusers that referenced this pull request Mar 27, 2023
* unet check length input

* prep test file for changes

* correct all tests

* clean up

---------

Co-authored-by: Patrick von Platen <[email protected]>
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* unet check length input

* prep test file for changes

* correct all tests

* clean up

---------

Co-authored-by: Patrick von Platen <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* unet check length input

* prep test file for changes

* correct all tests

* clean up

---------

Co-authored-by: Patrick von Platen <[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