FoundationVision / VAR

[GPT beats diffusion🔥] [scaling laws in visual generation📈] Official impl. of "Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction". An *ultra-simple, user-friendly yet state-of-the-art* codebase for autoregressive image generation!
MIT License
3.78k stars 285 forks source link

class VQVAE forward function error #46

Closed woldier closed 2 months ago

woldier commented 2 months ago

CN:

VQVAE forward存在code 错误. 我发现 VectorQuantizer2.forward 返回三个参数. 而在https://github.com/FoundationVision/VAR/blob/a5cf0a16624d27b4c687b08f2a0ab006438452cc/models/vqvae.py#L58 接收了VectorQuantizer2.forward 返回的4个参数.

EN:

VQVAE forward has a code error. I found that VectorQuantizer2.forward returns three parameters. And at https://github.com/FoundationVision/VAR/blob/a5cf0a16624d27b4c687b08f2a0ab006438452cc/models/vqvae.py#L58 receives four arguments from VectorQuantizer2.forward.

keyu-tian commented 2 months ago

hi @woldier, thank you and i fixed it in https://github.com/FoundationVision/VAR/commit/0029ecd537a4587e76b165dae04f9124b9391b66