Skip to content

Support custom kernel and bias initializers for the output projection in DePatchify. - #179

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_997306888
Oct 12, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_997306888

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Support custom kernel and bias initializers for the output projection in DePatchify.

Previously, DePatchify always initialized its output projection with Flax's default initializers, preventing DiT models from customizing or zero-initializing the final output projection.

Add dense_kernel_init (defaulting to nn.linear.default_kernel_init) and dense_bias_init (defaulting to nn.initializers.zeros_init()) attributes to DePatchify and pass them to the Dense_Out layer.

@copybara-service copybara-service Bot changed the title Support zero-initializing the output projection in DePatchify. Support custom kernel and bias initializers for the output projection in DePatchify. Oct 12, 2026
… in DePatchify.

Previously, `DePatchify` always initialized its output projection with Flax's default initializers, preventing DiT models from customizing or zero-initializing the final output projection.

Add `dense_kernel_init` (defaulting to `nn.linear.default_kernel_init`) and `dense_bias_init` (defaulting to `nn.initializers.zeros_init()`) attributes to `DePatchify` and pass them to the `Dense_Out` layer.

PiperOrigin-RevId: 997967390
@copybara-service
copybara-service Bot merged commit 4acf5cf into main Oct 12, 2026
1 of 2 checks passed
@copybara-service
copybara-service Bot deleted the test_997306888 branch October 12, 2026 16:30
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