MCPcopy Create free account
hub / github.com/Text-to-Audio/Make-An-Audio / encode

Method encode

ldm/models/autoencoder.py:289–292  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

287 self.embed_dim = embed_dim
288
289 def encode(self, x):# VQModel的quantize写在encoder里,VQModelInterface则将其写在decoder里
290 h = self.encoder(x)
291 h = self.quant_conv(h)
292 return h
293
294 def decode(self, h, force_not_quantize=False):
295 # also go through quantization layer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected