MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / __call__

Method __call__

diffusers/src/diffusers/models/vae_flax.py:863–876  ·  view source on GitHub ↗
(self, sample, sample_posterior=False, deterministic: bool = True, return_dict: bool = True)

Source from the content-addressed store, hash-verified

861 return FlaxDecoderOutput(sample=hidden_states)
862
863 def __call__(self, sample, sample_posterior=False, deterministic: bool = True, return_dict: bool = True):
864 posterior = self.encode(sample, deterministic=deterministic, return_dict=return_dict)
865 if sample_posterior:
866 rng = self.make_rng("gaussian")
867 hidden_states = posterior.latent_dist.sample(rng)
868 else:
869 hidden_states = posterior.latent_dist.mode()
870
871 sample = self.decode(hidden_states, return_dict=return_dict).sample
872
873 if not return_dict:
874 return (sample,)
875
876 return FlaxDecoderOutput(sample=sample)

Callers

nothing calls this directly

Calls 5

encodeMethod · 0.95
decodeMethod · 0.95
FlaxDecoderOutputClass · 0.85
sampleMethod · 0.45
modeMethod · 0.45

Tested by

no test coverage detected