MCPcopy Create free account
hub / github.com/CompVis/diff2flow / scale_latents

Method scale_latents

diff2flow/tiny_autoencoder.py:93–95  ·  view source on GitHub ↗

raw latents -> [0, 1]

(x)

Source from the content-addressed store, hash-verified

91
92 @staticmethod
93 def scale_latents(x):
94 """raw latents -> [0, 1]"""
95 return x.div(2 * TinyAutoencoderKL.latent_magnitude).add(TinyAutoencoderKL.latent_shift).clamp(0, 1)
96
97 @staticmethod
98 def unscale_latents(x):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected