Skip to content

Commit df8559a

Browse files
fpgaminersayakpaul
andauthored
Fix: UNet2DModel::__init__ type hints; fixes issue huggingface#4806 (huggingface#7175)
Co-authored-by: Sayak Paul <[email protected]>
1 parent 8f206a5 commit df8559a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffusers/models/unets/unet_2d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def __init__(
9999
time_embedding_type: str = "positional",
100100
freq_shift: int = 0,
101101
flip_sin_to_cos: bool = True,
102-
down_block_types: Tuple[str] = ("DownBlock2D", "AttnDownBlock2D", "AttnDownBlock2D", "AttnDownBlock2D"),
103-
up_block_types: Tuple[str] = ("AttnUpBlock2D", "AttnUpBlock2D", "AttnUpBlock2D", "UpBlock2D"),
104-
block_out_channels: Tuple[int] = (224, 448, 672, 896),
102+
down_block_types: Tuple[str, ...] = ("DownBlock2D", "AttnDownBlock2D", "AttnDownBlock2D", "AttnDownBlock2D"),
103+
up_block_types: Tuple[str, ...] = ("AttnUpBlock2D", "AttnUpBlock2D", "AttnUpBlock2D", "UpBlock2D"),
104+
block_out_channels: Tuple[int, ...] = (224, 448, 672, 896),
105105
layers_per_block: int = 2,
106106
mid_block_scale_factor: float = 1,
107107
downsample_padding: int = 1,

0 commit comments

Comments
 (0)