lucidrains / vector-quantize-pytorch

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

Fix Issue #139 and refacto of the whole FSQ implementation #140

Closed MisterBourbaki closed 3 months ago

MisterBourbaki commented 3 months ago

Here is a short PR regarding Finite Scalar Quantization, as it is implemented here. The goal is to 1) fix the bug in Issue #139 and 2) to clean the code for better ease of use.

Here are the main changes:

Fix:

Remove

Add

The whole code has been properly formatted and linting.

Hope it will be reviewed :)