Skip to content

Conversation

@pcuenca
Copy link
Member

@pcuenca pcuenca commented Dec 21, 2022

Fixes #1792.

Note that some pipelines (paint by example, image variations) do require a feature_extractor. We should at least display a clear error message if the loaded checkpoint doesn't have one. Or should we automatically instantiate one in those cases?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 21, 2022

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

Copy link
Contributor

@patil-suraj patil-suraj 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 fixing this! Also, since the feature_extractor is a required argument for those pipelines, it should already display a nice error message about that no ? And think we can-not load feature_extractor automatically because those are associated with specific image models and might not be the same for all.

@pcuenca
Copy link
Member Author

pcuenca commented Dec 24, 2022

since the feature_extractor is a required argument for those pipelines, it should already display a nice error message about that no ?

This is what it gives right now:

/home/pedro/.cache/huggingface/diffusers/models--pcuenq--tmp-variations/snapshots/09d9d929c0c58a2ae7a96b7b371e9e91c834e821 does not appear to have a file named preprocessor_config.json. Checkout 'https://huggingface.co//home/pedro/.cache/huggingface/diffusers/models--pcuenq--tmp-variations/snapshots/09d9d929c0c58a2ae7a96b7b371e9e91c834e821/None' for available files.

I think we could maybe improve it in a new PR. Merging this because I think fixing the issue is more important than the error message for those other pipelines :)

@pcuenca
Copy link
Member Author

pcuenca commented Dec 24, 2022

Actually, taking a look at the test failures.

@pcuenca
Copy link
Member Author

pcuenca commented Dec 25, 2022

Tests now pass, cc @anton-l for the changes and merging to fix the issue.

@pcuenca pcuenca merged commit df2b548 into main Dec 25, 2022
@pcuenca pcuenca deleted the fix-required-safety-checker branch December 25, 2022 20:58
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Make safety_checker optional in more pipelines.

* Remove inappropriate comment in inpaint pipeline.

* InPaint Test: set feature_extractor to None.

* Remove import

* img2img test: set feature_extractor to None.

* inpaint sd2 test: set feature_extractor to None.

Co-authored-by: Suraj Patil <[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.

Img2Img pipeline initialization fails on SD variants with no feature extractor/safety checker

4 participants