lucidrains / vector-quantize-pytorch

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

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

Closed MisterBourbaki closed 4 months ago

MisterBourbaki commented 5 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 :)