MCPcopy Index your code
hub / github.com/huggingface/diffusers / __init__

Method __init__

src/diffusers/models/downsampling.py:164–177  ·  view source on GitHub ↗
(
        self,
        channels: int | None = None,
        out_channels: int | None = None,
        use_conv: bool = False,
        fir_kernel: tuple[int, int, int, int] = (1, 3, 3, 1),
    )

Source from the content-addressed store, hash-verified

162 """
163
164 def __init__(
165 self,
166 channels: int | None = None,
167 out_channels: int | None = None,
168 use_conv: bool = False,
169 fir_kernel: tuple[int, int, int, int] = (1, 3, 3, 1),
170 ):
171 super().__init__()
172 out_channels = out_channels if out_channels else channels
173 if use_conv:
174 self.Conv2d_0 = nn.Conv2d(channels, out_channels, kernel_size=3, stride=1, padding=1)
175 self.fir_kernel = fir_kernel
176 self.use_conv = use_conv
177 self.out_channels = out_channels
178
179 def _downsample_2d(
180 self,

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected