Skip to content

Conversation

@dg845
Copy link
Collaborator

@dg845 dg845 commented Nov 12, 2025

What does this PR do?

This PR reverts the default value for the dim_mult argument to AutoencoderKLWan.__init__ back to a List (e.g. [1, 2, 4, 4] instead of (1, 2, 4, 4)). The rationale behind this is that some code of the Wan VAE code assumes that dim_mult is type List, such as

dims = [dim * u for u in [1] + dim_mult]

This causes errors when dim_mult is not explicitly set, such as in convert_vae() in scripts/convert_wan_to_diffusers.py and also in the AutoencoderKLWan tests.

dim_mult defaulted to a List prior to #12544, but was incorrectly annotated as type Tuple[int], so I believe that PR inadvertently changed the default argument to a Tuple. I have changed the type annotation to List[int] in this PR.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@yiyixuxu

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@dg845 dg845 requested review from sayakpaul and yiyixuxu November 17, 2025 08:26
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Seems to be a pretty safe change 👁️

But how did we not catch it in our tests?

@DN6 DN6 merged commit 67dc65e into huggingface:main Nov 17, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants