Skip to content

Fix VaeImageProcessorLDM3D ignoring constructor arguments (#14429) - #15061

Open
patrickswedish wants to merge 1 commit into
huggingface:mainfrom
patrickswedish:fix/ldm3d-image-processor-config-14429
Open

patrickswedish wants to merge 1 commit into
huggingface:mainfrom
patrickswedish:fix/ldm3d-image-processor-config-14429

Conversation

@patrickswedish

@patrickswedish patrickswedish commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #14429

VaeImageProcessorLDM3D documents constructor arguments (do_resize, vae_scale_factor, resample, do_normalize), but previously called super().__init__() with no arguments.

Because VaeImageProcessor.__init__ is decorated with @register_to_config, calling super().__init__() with no arguments caused VaeImageProcessor to register its own default values (do_resize=True, vae_scale_factor=8, resample="lanczos", do_normalize=True) onto self.config, clobbering any non-default values supplied during initialization of VaeImageProcessorLDM3D.

This PR forwards do_resize, vae_scale_factor, resample, and do_normalize directly to super().__init__(...), matching the pattern used by sibling subclasses in the same module (IPAdapterMaskProcessor and PixArtImageProcessor).

Validation

  • Added test_vae_image_processor_ldm3d_config in tests/others/test_image_processor.py to verify that custom constructor arguments are properly preserved in self.config and that default values continue to function as expected.
  • Verified test passes locally.
  • Formatted and linted with ruff format and ruff check.

…huggingface#14429)

Signed-off-by: Patrick Ribbsaeter <patrickswedish@gmail.com>
@github-actions github-actions Bot added tests fixes-issue size/S PR with diff < 50 LOC labels Oct 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes-issue size/S PR with diff < 50 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VaeImageProcessorLDM3D ignores constructor configuration arguments

1 participant