Skip to content

Modular pipelines: warn when a denoiser_input_fields entry is not passed to the transformer #15022

Open

Description

@yiyixuxu

The loop denoisers forward the fields tagged denoiser_input_fields whose name matches the transformer's forward signature and drop the rest silently, e.g. in qwenimage/denoise.py:

transformer_args = set(inspect.signature(components.transformer.forward).parameters.keys())
for field_name, field_value in block_state.denoiser_input_fields.items():
    if field_name in transformer_args and field_name not in guider_inputs:
        additional_cond_kwargs[field_name] = field_value

So a custom block tagging a field under a name the transformer does not take (a typo, or a field meant for another transformer) runs without any error and the conditioning never reaches the model. Same pattern in the helios, wan, wan_animate_2, ltx2 and minimax_h3 denoisers.

Proposal: work on a copy of the dict, pop the fields the block consumes by name and the ones matching the signature, and logger.warning_once whatever is left:

`denoiser_input_fields` not passed to the transformer: ['typo_field']

Two things found while trying this out:

  • QwenImage's edit-plus and layered RoPE input steps still tag txt_seq_lens / negative_txt_seq_lens for the denoiser, but the transformer no longer takes them since [core] remove txt_seq_lens from qwen transformer. #13674.
  • diffusers' logger has no warning_once of its own. The existing logger.warning_once calls only work because transformers patches logging.Logger when it is imported.

Posted by Claude Code on behalf of @yiyixuxu, who reviewed and approved this text.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions