lucidrains / vector-quantize-pytorch

Vector (and Scalar) Quantization, in Pytorch
MIT License
2.12k stars 179 forks source link

Fix 1e7 in random.randint #129

Closed leng-yue closed 1 month ago

leng-yue commented 1 month ago

This PR fixed issue in Python 3.12, which randrange will throw an exception if the input is not an int.

The bug was originally reported in downstream repo fish-speech:

https://github.com/fishaudio/fish-speech/issues/215#issuecomment-2115614074

lucidrains commented 1 month ago

oh nice! residual FSQ is being used 💯