MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / __init__

Method __init__

src/diffusers/models/upsampling.py:210–223  ·  view source on GitHub ↗
(
        self,
        channels: Optional[int] = None,
        out_channels: Optional[int] = None,
        use_conv: bool = False,
        fir_kernel: Tuple[int, int, int, int] = (1, 3, 3, 1),
    )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected