MCPcopy Create free account
hub / github.com/LuChengTHU/dpm-solver / encode

Method encode

examples/stable-diffusion/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
__init__Method · 0.45
__getitem__Method · 0.45
inpaint.pyFile · 0.45
put_watermarkFunction · 0.45
mainFunction · 0.45
knn2img.pyFile · 0.45

Calls 1

quantizeMethod · 0.80

Tested by

no test coverage detected