Skip to content

fix Mellon custom block required input handling#13888

Open
wunianze666-netizen wants to merge 1 commit into
huggingface:mainfrom
wunianze666-netizen:fix/mellon-required-inputs
Open

fix Mellon custom block required input handling#13888
wunianze666-netizen wants to merge 1 commit into
huggingface:mainfrom
wunianze666-netizen:fix/mellon-required-inputs

Conversation

@wunianze666-netizen
Copy link
Copy Markdown

Summary

This PR preserves required custom block inputs when generating a Mellon config.

Motivation

While reviewing the Mellon custom block flow, I noticed that MellonPipelineConfig.from_custom_block() always emitted an empty
equired_inputs list, even when a block input was declared with
equired=True. The same code path also printed a debug line for every input.

This makes the generated Mellon schema less accurate for custom blocks and can leak noisy stdout from a library API. This came up while reading through the modular Mellon findings in #13650.

Changes

  • track required custom block inputs in rom_custom_block()
  • stop printing a debug line for each processed input
  • add a regression test covering the generated
    equired_inputs metadata

Testing

  • python -m py_compile src/diffusers/modular_pipelines/mellon_node_utils.py tests/modular_pipelines/test_modular_pipelines_custom_blocks.py

Notes

I could not run the pytest target in this local environment because pytest and the repo's development dependencies are not installed here, so I limited verification to a syntax check and a focused regression test addition.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant