Skip to content

tests: add a test for _keys_to_ignore_on_load_unexpected. - #15140

Open
sayakpaul wants to merge 1 commit into
mainfrom
add-keys-to-ignore-test
Open

sayakpaul wants to merge 1 commit into
mainfrom
add-keys-to-ignore-test

Conversation

@sayakpaul

@sayakpaul sayakpaul commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Check https://github.com/huggingface/diffusers/pull/15107/changes#r4392360669

Tested with the changes in src/diffusers/models/transformers/transformer_cosmos3.py from #15107. Cc: @yzhautouskay


@property
def unexpected_keys_to_ignore(self) -> Optional[list[str]]:
return self.model_class._keys_to_ignore_on_load_unexpected

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this fixture provide concrete checkpoint keys for regex patterns, and include a regex-based case? Returning the pattern itself only works for simple literal patterns; an expression such as \.(?:input_scale|weight_scale)$ does not match its own source string, so the shared test fails before exercising loading.

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

size/S PR with diff < 50 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants