Skip to content

Conversation

@caopulan
Copy link
Contributor

@caopulan caopulan commented Oct 7, 2023

fix inference in custom diffusion
inference codes should be in the loop of dataloader

@pcuenca pcuenca requested a review from sayakpaul October 8, 2023 13:04
@pcuenca
Copy link
Member

pcuenca commented Oct 8, 2023

cc @nupurkmr9, feel free to review if you'd like! :)

@sayakpaul
Copy link
Member

@caopulan could you run make style && make quality so that the quality passes?

@caopulan
Copy link
Contributor Author

caopulan commented Oct 8, 2023

@caopulan could you run make style && make quality so that the quality passes?

I will later check the quality passes.

@caopulan
Copy link
Contributor Author

caopulan commented Oct 8, 2023

@caopulan could you run make style && make quality so that the quality passes?

I run these commands, which rewrite train_custom_diffusion.py.

And there is a nother error src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:327:41: E721 Do not compare types, use isinstance()` but I don't change this file.

@sayakpaul
Copy link
Member

That seems to be because you probably have a different version of black installed than what we use in our CI. You can find these file to know the version we use:

"black~=23.1",

@caopulan
Copy link
Contributor Author

caopulan commented Oct 8, 2023

That seems to be because you probably have a different version of black installed than what we use in our CI. You can find these file to know the version we use:

"black~=23.1",

I use pip install black==23.1 and error still occurs.

Successfully uninstalled black-23.9.1
Successfully installed black-23.1.0
WARNING: You are using pip version 21.3.1; however, version 23.2.1 is available.
You should consider upgrading via the '/Users/sariel/opt/anaconda3/bin/python -m pip install --upgrade pip' command.
(base) sariel@MacBook-Pro-3 diffusers % make style
black examples scripts src tests utils
All done! ✨ 🍰 ✨
664 files left unchanged.
ruff examples scripts src tests utils --fix
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:327:41: E721 Do not compare types, use `isinstance()`
Found 1 error.
make: *** [style] Error 1
(base) sariel@MacBook-Pro-3 diffusers % make quality
black --check examples scripts src tests utils
All done! ✨ 🍰 ✨
664 files would be left unchanged.
ruff examples scripts src tests utils
src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py:327:41: E721 Do not compare types, use `isinstance()`
Found 1 error.
make: *** [quality] Error 1

Could I do anything then? If this error can be ignored, does this pr can be merged in main?

@sayakpaul
Copy link
Member

The error can not be ignored. I will see if I can do anything.

@caopulan
Copy link
Contributor Author

caopulan commented Oct 8, 2023

The error can not be ignored. I will see if I can do anything.

Thanks a lot!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@sayakpaul sayakpaul merged commit cc2c4ae into huggingface:main Oct 9, 2023
@caopulan caopulan deleted the patch-1 branch December 6, 2023 17:35
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* Update train_custom_diffusion.py

* make style

* Empty-Commit

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
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.

4 participants