MCPcopy Create free account
hub / github.com/IceClear/StableSR / encode

Method encode

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

Source from the content-addressed store, hash-verified

102 self.model_ema(self)
103
104 def encode(self, x):
105 h = self.encoder(x)
106 h = self.quant_conv(h)
107 quant, emb_loss, info = self.quantize(h)
108 return quant, emb_loss, info
109
110 def encode_to_prequant(self, x):
111 h = self.encoder(x)

Callers 15

forwardMethod · 0.95
predictMethod · 0.45
inferenceFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
encode_first_stageMethod · 0.45

Calls 1

quantizeMethod · 0.80

Tested by

no test coverage detected