MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / __call__

Method __call__

stable_diffusion/stable_diffusion/vae.py:142–156  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

140 self.conv_out = nn.Conv2d(block_out_channels[-1], out_channels, 3, padding=1)
141
142 def __call__(self, x):
143 x = self.conv_in(x)
144
145 for l in self.down_blocks:
146 x = l(x)
147
148 x = self.mid_blocks[0](x)
149 x = self.mid_blocks[1](x)
150 x = self.mid_blocks[2](x)
151
152 x = self.conv_norm_out(x)
153 x = nn.silu(x)
154 x = self.conv_out(x)
155
156 return x
157
158
159class Decoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected