ITADN

VaeImageProcessorLDM3D ignores constructor configuration arguments

#14429Openaswanth-07 创建于 14 天前
bugpipelines
A
aswanth-07commented
## Describe the bug `VaeImageProcessorLDM3D` documents four constructor options, but any non-default values are silently replaced by `VaeImageProcessor` defaults. The subclass constructor is decorated with `@register_to_config`, but it calls `super().__init__()` without forwarding its arguments. The decorated parent constructor then registers its own default values on the same config object, overwriting the values already registered by the subclass. Relevant source: https://github.com/huggingface/diffusers/blob/d6726f38a0c5ca6c06a8f227fb7bade3486ed98d/src/diffusers/image_processor.py#L984-L992 This affects behavior as well as serialization: for example, `do_normalize=False` still normalizes inputs and `do_resize=False` still leaves resizing enabled. I would like to contribute the focused constructor correction and a regression test once a maintainer confirms the scope, following the repository's AI-assisted contribution policy. ## Reproduction ```python from diffusers import VaeImageProcessorLDM3D processor = VaeImageProcessorLDM3D( do_resize=False, vae_scale_factor=4, resample="nearest", do_normalize=False, ) print(processor.config.do_resize) print(processor.config.vae_scale_factor) print(processor.config.resample) print(processor.config.do_normalize) ``` Expected: ```text False 4 nearest False ``` Actual: ```text True 8 lanczos True ``` The same reproduction fails on Diffusers 0.39.0 and current `main` at `d6726f38`. ## System Info - Diffusers version: 0.39.0; also reproduced on 0.40.0.dev0 at `d6726f38` - Platform: Windows-10-10.0.26200-SP0 - Python version: 3.10.11 - PyTorch version: 2.13.0+cpu - GPU used in script: No - Distributed or parallel setup: No ## Who can help? @sayakpaul @DN6 AI disclosure: I used Codex to help identify and reproduce the behavior, verify it on the latest release and current main, search existing issues and PRs, and draft this report. I reviewed the reproduction and diagnosis and will personally handle any follow-up.
0 条评论