Repository navigation
Fix VaeImageProcessorLDM3D ignoring constructor arguments (#14429) - #15061
Open
patrickswedish wants to merge 1 commit into
Open
patrickswedish wants to merge 1 commit into
patrickswedish wants to merge 1 commit into
Conversation
…huggingface#14429) Signed-off-by: Patrick Ribbsaeter <patrickswedish@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #14429
VaeImageProcessorLDM3Ddocuments constructor arguments (do_resize,vae_scale_factor,resample,do_normalize), but previously calledsuper().__init__()with no arguments.Because
VaeImageProcessor.__init__is decorated with@register_to_config, callingsuper().__init__()with no arguments causedVaeImageProcessorto register its own default values (do_resize=True,vae_scale_factor=8,resample="lanczos",do_normalize=True) ontoself.config, clobbering any non-default values supplied during initialization ofVaeImageProcessorLDM3D.This PR forwards
do_resize,vae_scale_factor,resample, anddo_normalizedirectly tosuper().__init__(...), matching the pattern used by sibling subclasses in the same module (IPAdapterMaskProcessorandPixArtImageProcessor).Validation
test_vae_image_processor_ldm3d_configintests/others/test_image_processor.pyto verify that custom constructor arguments are properly preserved inself.configand that default values continue to function as expected.ruff formatandruff check.