MCPcopy Create free account
hub / github.com/AlayaLab/Hive / encode

Method encode

models/flowsep/diffusers/models/vq_model.py:119–126  ·  view source on GitHub ↗
(self, x: torch.FloatTensor, return_dict: bool = True)

Source from the content-addressed store, hash-verified

117 )
118
119 def encode(self, x: torch.FloatTensor, return_dict: bool = True) -> VQEncoderOutput:
120 h = self.encoder(x)
121 h = self.quant_conv(h)
122
123 if not return_dict:
124 return (h,)
125
126 return VQEncoderOutput(latents=h)
127
128 def decode(
129 self, h: torch.FloatTensor, force_not_quantize: bool = False, return_dict: bool = True

Callers 3

forwardMethod · 0.95
process_nmix_directoryFunction · 0.45
write_tar_fileFunction · 0.45

Calls 1

VQEncoderOutputClass · 0.85

Tested by

no test coverage detected