Open Mr-Jin2 opened 9 months ago
hi, I'm trying to use bash test.sh to reproduce the results of a paper. But I can't find any declaration about α ,in this function. https://github.com/siyuhuang/QuantArt/blob/84d3c83032c03053577159f0af6a137c7a6dae3d/taming/models/vqgan_ref.py#L137
bash test.sh
def transfer(self, x, ref, quantize=True): with torch.no_grad(): quant_x, _, _ = self.encode(x, quantize=True) quant_x = quant_x.detach() quant_ref, _, info_ref = self.encode_real(ref, quantize=True) indices_ref = info_ref[2] quant_ref = quant_ref.detach() h_x = self.model_x2y(quant_x, quant_ref) if not quantize: return quant_x, h_x, quant_ref, torch.zeros(1).to(self.device), [0,0,0], indices_ref quant_y, diff_x2y, info_y = self.quantize_dec(h_x) indices_y = info_y[2] return quant_x, quant_y, quant_ref, diff_x2y, indices_y, indices_ref
Any advice is super appreciated.
We did not provide the α-controlled inference code. You can achieve it in a simple way by interpolating between the quantized and continuous latent representations then decoding it into an image.
hi, I'm trying to use
bash test.sh
to reproduce the results of a paper. But I can't find any declaration about α ,in this function. https://github.com/siyuhuang/QuantArt/blob/84d3c83032c03053577159f0af6a137c7a6dae3d/taming/models/vqgan_ref.py#L137Any advice is super appreciated.