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

Method encode

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

Source from the content-addressed store, hash-verified

94 self.model_ema(self)
95
96 def encode(self, x):
97 h = self.encoder(x)
98 h = self.quant_conv(h)
99 quant, emb_loss, info = self.quantize(h)
100 return quant, emb_loss, info
101
102 def encode_to_prequant(self, x):
103 h = self.encoder(x)

Callers 7

forwardMethod · 0.95
encode_first_stageMethod · 0.45
encode_first_stageMethod · 0.45
encode_first_stageMethod · 0.45

Calls 1

quantizeMethod · 0.45

Tested by

no test coverage detected