MCPcopy Create free account
hub / github.com/huggingface/diffusers / __init__

Method __init__

src/diffusers/models/upsampling.py:207–220  ·  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

205 """
206
207 def __init__(
208 self,
209 channels: int | None = None,
210 out_channels: int | None = None,
211 use_conv: bool = False,
212 fir_kernel: tuple[int, int, int, int] = (1, 3, 3, 1),
213 ):
214 super().__init__()
215 out_channels = out_channels if out_channels else channels
216 if use_conv:
217 self.Conv2d_0 = nn.Conv2d(channels, out_channels, kernel_size=3, stride=1, padding=1)
218 self.use_conv = use_conv
219 self.fir_kernel = fir_kernel
220 self.out_channels = out_channels
221
222 def _upsample_2d(
223 self,

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected