MCPcopy Create free account
hub / github.com/ToTheBeginning/PuLID / encode

Method encode

flux/modules/autoencoder.py:302–305  ·  view source on GitHub ↗
(self, x: Tensor)

Source from the content-addressed store, hash-verified

300 self.shift_factor = params.shift_factor
301
302 def encode(self, x: Tensor) -> Tensor:
303 z = self.reg(self.encoder(x))
304 z = self.scale_factor * (z - self.shift_factor)
305 return z
306
307 def decode(self, z: Tensor) -> Tensor:
308 z = z / self.scale_factor + self.shift_factor

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected