Skip to content

Fix missing latents_bn_std dtype cast in VAE normalization#13299

Open
adi776borate wants to merge 1 commit intohuggingface:mainfrom
adi776borate:fix/flux2-vae-device-casting
Open

Fix missing latents_bn_std dtype cast in VAE normalization#13299
adi776borate wants to merge 1 commit intohuggingface:mainfrom
adi776borate:fix/flux2-vae-device-casting

Conversation

@adi776borate
Copy link
Contributor

What does this PR do?

Follow up to #13050

This PR addresses an unintentional dtype/device mismatch during the VAE image encoding step in Flux2 pipelines.

Currently, inside _encode_vae_image, latents_bn_mean is explicitly cast to match image_latents, but latents_bn_std is left in its default buffer state.

Before submitting

Who can review?

@asomoza
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.

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.

1 participant