MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / encode

Method encode

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

Source from the content-addressed store, hash-verified

128
129 @apply_forward_hook
130 def encode(self, x: torch.FloatTensor, return_dict: bool = True) -> VQEncoderOutput:
131 h = self.encoder(x)
132 h = self.quant_conv(h)
133
134 if not return_dict:
135 return (h,)
136
137 return VQEncoderOutput(latents=h)
138
139 @apply_forward_hook
140 def decode(

Callers 13

forwardMethod · 0.95
run_ruffFunction · 0.45
convert_modelsFunction · 0.45
convert_modelsFunction · 0.45
test_latents_inputMethod · 0.45
test_latents_inputMethod · 0.45
test_latents_inputMethod · 0.45
test_encode_decodeMethod · 0.45

Calls 1

VQEncoderOutputClass · 0.85