Spaces:
Paused
Paused
Download tests/test_normalizer.py from minhho/facefusion-nexttech: direct link, hf CLI and curl.
- Browser
- Download file 539 Bytes
-
https://huggingface.co/spaces/minhho/facefusion-nexttech/resolve/main/tests/test_normalizer.py
- Command line
-
hf download hf://spaces/minhho/facefusion-nexttech/tests/test_normalizer.py
-
curl -L -o test_normalizer.py https://huggingface.co/spaces/minhho/facefusion-nexttech/resolve/main/tests/test_normalizer.py
539 Bytes
| from facefusion.normalizer import normalize_fps, normalize_padding | |
| def test_normalize_padding() -> None: | |
| assert normalize_padding([ 0, 0, 0, 0 ]) == (0, 0, 0, 0) | |
| assert normalize_padding([ 1 ]) == (1, 1, 1, 1) | |
| assert normalize_padding([ 1, 2 ]) == (1, 2, 1, 2) | |
| assert normalize_padding([ 1, 2, 3 ]) == (1, 2, 3, 2) | |
| assert normalize_padding(None) is None | |
| def test_normalize_fps() -> None: | |
| assert normalize_fps(0.0) == 1.0 | |
| assert normalize_fps(25.0) == 25.0 | |
| assert normalize_fps(61.0) == 60.0 | |
| assert normalize_fps(None) is None | |