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

Method __call__

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

Source from the content-addressed store, hash-verified

207 self.conv_out = nn.Conv2d(block_out_channels[0], out_channels, 3, padding=1)
208
209 def __call__(self, x):
210 x = self.conv_in(x)
211
212 x = self.mid_blocks[0](x)
213 x = self.mid_blocks[1](x)
214 x = self.mid_blocks[2](x)
215
216 for l in self.up_blocks:
217 x = l(x)
218
219 x = self.conv_norm_out(x)
220 x = nn.silu(x)
221 x = self.conv_out(x)
222
223 return x
224
225
226class Autoencoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected