MCPcopy
hub / github.com/FoundationVision/LlamaGen / decode_code

Method decode_code

tokenizer/tokenizer_image/vq_model.py:52–55  ·  view source on GitHub ↗
(self, code_b, shape=None, channel_first=True)

Source from the content-addressed store, hash-verified

50 return dec
51
52 def decode_code(self, code_b, shape=None, channel_first=True):
53 quant_b = self.quantize.get_codebook_entry(code_b, shape, channel_first)
54 dec = self.decode(quant_b)
55 return dec
56
57 def forward(self, input):
58 quant, diff, _ = self.encode(input)

Callers 2

mainFunction · 0.45
mainFunction · 0.45

Calls 2

decodeMethod · 0.95
get_codebook_entryMethod · 0.45

Tested by

no test coverage detected