Skip to content

Commit d542c51

Browse files
author
hanjian.thu123
committed
[bugfix] align z_interplote_up for bsc and autoregressive_infer_cfg
1 parent cd9d1d7 commit d542c51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infinity/models/infinity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def autoregressive_infer_cfg(
598598
codes = vae.quantizer.lfq.indices_to_codes(idx_Bld, label_type='bit_label') # [B, d, 1, h, w] or [B, d, 1, 2h, 2w]
599599
if si != num_stages_minus_1:
600600
summed_codes += F.interpolate(codes, size=vae_scale_schedule[-1], mode=vae.quantizer.z_interplote_up)
601-
last_stage = F.interpolate(summed_codes, size=vae_scale_schedule[si+1], mode=vae.quantizer.z_interplote_down) # [B, d, 1, h, w] or [B, d, 1, 2h, 2w]
601+
last_stage = F.interpolate(summed_codes, size=vae_scale_schedule[si+1], mode=vae.quantizer.z_interplote_up) # [B, d, 1, h, w] or [B, d, 1, 2h, 2w]
602602
last_stage = last_stage.squeeze(-3) # [B, d, h, w] or [B, d, 2h, 2w]
603603
if self.apply_spatial_patchify: # patchify operation
604604
last_stage = torch.nn.functional.pixel_unshuffle(last_stage, 2) # [B, 4d, h, w]

0 commit comments

Comments
 (0)