lucidrains / magvit2-pytorch

Implementation of MagViT2 Tokenizer in Pytorch
MIT License
565 stars 34 forks source link

implementation #2

Closed 0nutation closed 1 year ago

0nutation commented 1 year ago

I write a pytorch version of Lookup-Free Quantization in https://github.com/0nutation/Lookup-Free-Quantization.

lucidrains commented 1 year ago

@0nutation looks good! so torch sign produces 0 for 0, which is an edge case you'll have to handle (one way is (x > 0) * 2 - 1)