MCPcopy
hub / github.com/ali-vilab/AnyDoor / __init__

Method __init__

ldm/modules/diffusionmodules/openaimodel.py:99–106  ·  view source on GitHub ↗
(self, channels, use_conv, dims=2, out_channels=None, padding=1)

Source from the content-addressed store, hash-verified

97 """
98
99 def __init__(self, channels, use_conv, dims=2, out_channels=None, padding=1):
100 super().__init__()
101 self.channels = channels
102 self.out_channels = out_channels or channels
103 self.use_conv = use_conv
104 self.dims = dims
105 if use_conv:
106 self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=padding)
107
108 def forward(self, x):
109 assert x.shape[1] == self.channels

Callers 8

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

conv_ndFunction · 0.90

Tested by

no test coverage detected