-
Notifications
You must be signed in to change notification settings - Fork 6.5k
[UNet2DConditionModel, UNet2DModel] pass norm_num_groups to all the blocks #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
463fb6b
3cc52ee
1770f9a
cf244ab
b79e483
f1bcc1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,7 +114,8 @@ def prepare_init_args_and_inputs_for_common(self): | |
| "in_channels": 4, | ||
| "out_channels": 4, | ||
| "layers_per_block": 2, | ||
| "block_out_channels": (32, 64), | ||
| "block_out_channels": (16, 32), | ||
patil-suraj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "norm_num_groups": 16, | ||
patil-suraj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "attention_head_dim": 32, | ||
| "down_block_types": ("DownBlock2D", "DownBlock2D"), | ||
| "up_block_types": ("UpBlock2D", "UpBlock2D"), | ||
|
|
@@ -291,3 +292,7 @@ def test_output_pretrained_ve_large(self): | |
| # fmt: on | ||
|
|
||
| self.assertTrue(torch.allclose(output_slice, expected_output_slice, rtol=1e-2)) | ||
|
|
||
| def test_forward_with_norm_groups(self): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to adjust norm groups inside the blocks cf https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_blocks.py#L780 |
||
| # not required for this model | ||
| pass | ||
Uh oh!
There was an error while loading. Please reload this page.