From 13e81a64a7ad28edfd3e0c9cfbb183e6830931bc Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:11:40 +0900 Subject: [PATCH 01/20] chore(deps): update lockfile --- poetry.lock | 406 +++++++++++++++++++--------------------------------- 1 file changed, 144 insertions(+), 262 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4c169e59..b8b0cd9f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -183,6 +183,21 @@ toolz = "*" [package.extras] dev = ["black", "docutils", "flake8", "ipython", "m2r", "mistune (<2.0.0)", "pytest", "recommonmark", "sphinx", "vega-datasets"] +[[package]] +name = "aniso8601" +version = "9.0.1" +description = "A library for parsing ISO 8601 strings." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "aniso8601-9.0.1-py2.py3-none-any.whl", hash = "sha256:1d2b7ef82963909e93c4f24ce48d4de9e66009a21bf1c1e1c85bdd0812fe412f"}, + {file = "aniso8601-9.0.1.tar.gz", hash = "sha256:72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973"}, +] + +[package.extras] +dev = ["black", "coverage", "isort", "pre-commit", "pyenchant", "pylint"] + [[package]] name = "ansicon" version = "1.89.0" @@ -301,14 +316,14 @@ pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} [[package]] name = "beautifulsoup4" -version = "4.12.1" +version = "4.12.2" description = "Screen-scraping library" category = "main" optional = false python-versions = ">=3.6.0" files = [ - {file = "beautifulsoup4-4.12.1-py3-none-any.whl", hash = "sha256:e44795bb4f156d94abb5fbc56efff871c1045bfef72e9efe77558db9f9616ac3"}, - {file = "beautifulsoup4-4.12.1.tar.gz", hash = "sha256:c7bdbfb20a0dbe09518b96a809d93351b2e2bcb8046c0809466fa6632a10c257"}, + {file = "beautifulsoup4-4.12.2-py3-none-any.whl", hash = "sha256:bd2520ca0d9d7d12694a53d44ac482d181b4ec1888909b035a3dbf40d0f57d4a"}, + {file = "beautifulsoup4-4.12.2.tar.gz", hash = "sha256:492bbc69dca35d12daac71c4db1bfff0c876c00ef4a2ffacce226d4638eb72da"}, ] [package.dependencies] @@ -846,14 +861,14 @@ toml = ["tomli"] [[package]] name = "croniter" -version = "1.3.8" +version = "1.3.10" description = "croniter provides iteration for datetime object with cron like format" category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "croniter-1.3.8-py2.py3-none-any.whl", hash = "sha256:d6ed8386d5f4bbb29419dc1b65c4909c04a2322bd15ec0dc5b2877bfa1b75c7a"}, - {file = "croniter-1.3.8.tar.gz", hash = "sha256:32a5ec04e97ec0837bcdf013767abd2e71cceeefd3c2e14c804098ce51ad6cd9"}, + {file = "croniter-1.3.10-py2.py3-none-any.whl", hash = "sha256:362bbba72cbd3d3ffa34218414762c81e48001ba6bf7f32164b6e22aa597cbb3"}, + {file = "croniter-1.3.10.tar.gz", hash = "sha256:bb9550b4761509b813d5397aaf4c15b800b29d002500e0c5f29e20d87558aae1"}, ] [package.dependencies] @@ -1088,34 +1103,35 @@ tqdm = "*" [[package]] name = "fastapi" -version = "0.88.0" +version = "0.1.17" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" files = [ - {file = "fastapi-0.88.0-py3-none-any.whl", hash = "sha256:263b718bb384422fe3d042ffc9a0c8dece5e034ab6586ff034f6b4b1667c3eee"}, - {file = "fastapi-0.88.0.tar.gz", hash = "sha256:915bf304180a0e7c5605ec81097b7d4cd8826ff87a02bb198e336fb9f3b5ff02"}, + {file = "fastapi-0.1.17-py3-none-any.whl", hash = "sha256:a6aaad2f60684477480ac9d7a1c95e67f4696a722f184db467494bfdd5b8f29d"}, + {file = "fastapi-0.1.17.tar.gz", hash = "sha256:a9a9b6cc32c38bab27a6549b94c44a30c70b485bc789d03de3aa8725f3394be5"}, ] [package.dependencies] -email-validator = {version = ">=1.1.1", optional = true, markers = "extra == \"all\""} -httpx = {version = ">=0.23.0", optional = true, markers = "extra == \"all\""} -itsdangerous = {version = ">=1.1.0", optional = true, markers = "extra == \"all\""} -jinja2 = {version = ">=2.11.2", optional = true, markers = "extra == \"all\""} -orjson = {version = ">=3.2.1", optional = true, markers = "extra == \"all\""} -pydantic = ">=1.6.2,<1.7 || >1.7,<1.7.1 || >1.7.1,<1.7.2 || >1.7.2,<1.7.3 || >1.7.3,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" -python-multipart = {version = ">=0.0.5", optional = true, markers = "extra == \"all\""} -pyyaml = {version = ">=5.3.1", optional = true, markers = "extra == \"all\""} -starlette = "0.22.0" -ujson = {version = ">=4.0.1,<4.0.2 || >4.0.2,<4.1.0 || >4.1.0,<4.2.0 || >4.2.0,<4.3.0 || >4.3.0,<5.0.0 || >5.0.0,<5.1.0 || >5.1.0", optional = true, markers = "extra == \"all\""} -uvicorn = {version = ">=0.12.0", extras = ["standard"], optional = true, markers = "extra == \"all\""} +aiofiles = {version = "*", optional = true, markers = "extra == \"all\""} +email_validator = {version = "*", optional = true, markers = "extra == \"all\""} +graphene = {version = "*", optional = true, markers = "extra == \"all\""} +itsdangerous = {version = "*", optional = true, markers = "extra == \"all\""} +jinja2 = {version = "*", optional = true, markers = "extra == \"all\""} +pydantic = ">=0.17" +python-multipart = {version = "*", optional = true, markers = "extra == \"all\""} +pyyaml = {version = "*", optional = true, markers = "extra == \"all\""} +requests = {version = "*", optional = true, markers = "extra == \"all\""} +starlette = ">=0.9.7" +ujson = {version = "*", optional = true, markers = "extra == \"all\""} +uvicorn = {version = "*", optional = true, markers = "extra == \"all\""} [package.extras] -all = ["email-validator (>=1.1.1)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -dev = ["pre-commit (>=2.17.0,<3.0.0)", "ruff (==0.0.138)", "uvicorn[standard] (>=0.12.0,<0.19.0)"] -doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer[all] (>=0.6.1,<0.7.0)"] -test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.10.0)", "coverage[toml] (>=6.5.0,<7.0)", "databases[sqlite] (>=0.3.2,<0.7.0)", "email-validator (>=1.1.1,<2.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.23.0,<0.24.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.982)", "orjson (>=3.2.1,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=7.1.3,<8.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "ruff (==0.0.138)", "sqlalchemy (>=1.3.18,<=1.4.41)", "types-orjson (==3.6.2)", "types-ujson (==5.5.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"] +all = ["aiofiles", "email_validator", "graphene", "itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests", "ujson", "ujson", "uvicorn"] +dev = ["passlib[bcrypt]", "pyjwt"] +doc = ["markdown-include", "mkdocs", "mkdocs-material"] +test = ["black", "email_validator", "isort", "mypy", "pytest (>=4.0.0)", "pytest-cov", "requests"] [[package]] name = "ffmpy" @@ -1295,14 +1311,14 @@ files = [ [[package]] name = "fsspec" -version = "2023.3.0" +version = "2023.4.0" description = "File-system specification" category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "fsspec-2023.3.0-py3-none-any.whl", hash = "sha256:bf57215e19dbfa4fe7edae53040cc1deef825e3b1605cca9a8d2c2fadd2328a0"}, - {file = "fsspec-2023.3.0.tar.gz", hash = "sha256:24e635549a590d74c6c18274ddd3ffab4753341753e923408b1904eaabafe04d"}, + {file = "fsspec-2023.4.0-py3-none-any.whl", hash = "sha256:f398de9b49b14e9d84d2c2d11b7b67121bc072fe97b930c4e5668ac3917d8307"}, + {file = "fsspec-2023.4.0.tar.gz", hash = "sha256:bf064186cd8808f0b2f6517273339ba0a0c8fb1b7048991c28bc67f58b8b67cd"}, ] [package.dependencies] @@ -1314,7 +1330,9 @@ abfs = ["adlfs"] adl = ["adlfs"] arrow = ["pyarrow (>=1)"] dask = ["dask", "distributed"] +devel = ["pytest", "pytest-cov"] dropbox = ["dropbox", "dropboxdrivefs", "requests"] +full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] fuse = ["fusepy"] gcs = ["gcsfs"] git = ["pygit2"] @@ -1413,6 +1431,54 @@ typing-extensions = "*" uvicorn = "*" websockets = ">=10.0" +[[package]] +name = "graphene" +version = "3.2.2" +description = "GraphQL Framework for Python" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "graphene-3.2.2-py2.py3-none-any.whl", hash = "sha256:753de13948cbf42e32cc87fb533167c88907066eb984251fdbb006c0aab8da00"}, + {file = "graphene-3.2.2.tar.gz", hash = "sha256:5b03e72770dc901f40be55784058d6bb1d952a49eb819a4a085962d5e1cf5fcf"}, +] + +[package.dependencies] +aniso8601 = ">=8,<10" +graphql-core = ">=3.1,<3.3" +graphql-relay = ">=3.1,<3.3" + +[package.extras] +dev = ["black (==22.3.0)", "coveralls (>=3.3,<4)", "flake8 (>=4,<5)", "iso8601 (>=1,<2)", "mock (>=4,<5)", "pytest (>=6,<7)", "pytest-asyncio (>=0.16,<2)", "pytest-benchmark (>=3.4,<4)", "pytest-cov (>=3,<4)", "pytest-mock (>=3,<4)", "pytz (==2022.1)", "snapshottest (>=0.6,<1)"] +test = ["coveralls (>=3.3,<4)", "iso8601 (>=1,<2)", "mock (>=4,<5)", "pytest (>=6,<7)", "pytest-asyncio (>=0.16,<2)", "pytest-benchmark (>=3.4,<4)", "pytest-cov (>=3,<4)", "pytest-mock (>=3,<4)", "pytz (==2022.1)", "snapshottest (>=0.6,<1)"] + +[[package]] +name = "graphql-core" +version = "3.2.3" +description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." +category = "main" +optional = false +python-versions = ">=3.6,<4" +files = [ + {file = "graphql-core-3.2.3.tar.gz", hash = "sha256:06d2aad0ac723e35b1cb47885d3e5c45e956a53bc1b209a9fc5369007fe46676"}, + {file = "graphql_core-3.2.3-py3-none-any.whl", hash = "sha256:5766780452bd5ec8ba133f8bf287dc92713e3868ddd83aee4faab9fc3e303dc3"}, +] + +[[package]] +name = "graphql-relay" +version = "3.2.0" +description = "Relay library for graphql-core" +category = "main" +optional = false +python-versions = ">=3.6,<4" +files = [ + {file = "graphql-relay-3.2.0.tar.gz", hash = "sha256:1ff1c51298356e481a0be009ccdff249832ce53f30559c1338f22a0e0d17250c"}, + {file = "graphql_relay-3.2.0-py3-none-any.whl", hash = "sha256:c9b22bd28b170ba1fe674c74384a8ff30a76c8e26f88ac3aa1584dd3179953e5"}, +] + +[package.dependencies] +graphql-core = ">=3.2,<3.3" + [[package]] name = "grpcio" version = "1.53.0" @@ -1505,60 +1571,6 @@ sniffio = ">=1.0.0,<2.0.0" http2 = ["h2 (>=3,<5)"] socks = ["socksio (>=1.0.0,<2.0.0)"] -[[package]] -name = "httptools" -version = "0.5.0" -description = "A collection of framework independent HTTP protocol utils." -category = "main" -optional = false -python-versions = ">=3.5.0" -files = [ - {file = "httptools-0.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8f470c79061599a126d74385623ff4744c4e0f4a0997a353a44923c0b561ee51"}, - {file = "httptools-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e90491a4d77d0cb82e0e7a9cb35d86284c677402e4ce7ba6b448ccc7325c5421"}, - {file = "httptools-0.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1d2357f791b12d86faced7b5736dea9ef4f5ecdc6c3f253e445ee82da579449"}, - {file = "httptools-0.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f90cd6fd97c9a1b7fe9215e60c3bd97336742a0857f00a4cb31547bc22560c2"}, - {file = "httptools-0.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5230a99e724a1bdbbf236a1b58d6e8504b912b0552721c7c6b8570925ee0ccde"}, - {file = "httptools-0.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3a47a34f6015dd52c9eb629c0f5a8a5193e47bf2a12d9a3194d231eaf1bc451a"}, - {file = "httptools-0.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:24bb4bb8ac3882f90aa95403a1cb48465de877e2d5298ad6ddcfdebec060787d"}, - {file = "httptools-0.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e67d4f8734f8054d2c4858570cc4b233bf753f56e85217de4dfb2495904cf02e"}, - {file = "httptools-0.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7e5eefc58d20e4c2da82c78d91b2906f1a947ef42bd668db05f4ab4201a99f49"}, - {file = "httptools-0.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0297822cea9f90a38df29f48e40b42ac3d48a28637368f3ec6d15eebefd182f9"}, - {file = "httptools-0.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:557be7fbf2bfa4a2ec65192c254e151684545ebab45eca5d50477d562c40f986"}, - {file = "httptools-0.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:54465401dbbec9a6a42cf737627fb0f014d50dc7365a6b6cd57753f151a86ff0"}, - {file = "httptools-0.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4d9ebac23d2de960726ce45f49d70eb5466725c0087a078866043dad115f850f"}, - {file = "httptools-0.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:e8a34e4c0ab7b1ca17b8763613783e2458e77938092c18ac919420ab8655c8c1"}, - {file = "httptools-0.5.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f659d7a48401158c59933904040085c200b4be631cb5f23a7d561fbae593ec1f"}, - {file = "httptools-0.5.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef1616b3ba965cd68e6f759eeb5d34fbf596a79e84215eeceebf34ba3f61fdc7"}, - {file = "httptools-0.5.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3625a55886257755cb15194efbf209584754e31d336e09e2ffe0685a76cb4b60"}, - {file = "httptools-0.5.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:72ad589ba5e4a87e1d404cc1cb1b5780bfcb16e2aec957b88ce15fe879cc08ca"}, - {file = "httptools-0.5.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:850fec36c48df5a790aa735417dca8ce7d4b48d59b3ebd6f83e88a8125cde324"}, - {file = "httptools-0.5.0-cp36-cp36m-win_amd64.whl", hash = "sha256:f222e1e9d3f13b68ff8a835574eda02e67277d51631d69d7cf7f8e07df678c86"}, - {file = "httptools-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3cb8acf8f951363b617a8420768a9f249099b92e703c052f9a51b66342eea89b"}, - {file = "httptools-0.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:550059885dc9c19a072ca6d6735739d879be3b5959ec218ba3e013fd2255a11b"}, - {file = "httptools-0.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a04fe458a4597aa559b79c7f48fe3dceabef0f69f562daf5c5e926b153817281"}, - {file = "httptools-0.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d0c1044bce274ec6711f0770fd2d5544fe392591d204c68328e60a46f88843b"}, - {file = "httptools-0.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c6eeefd4435055a8ebb6c5cc36111b8591c192c56a95b45fe2af22d9881eee25"}, - {file = "httptools-0.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:5b65be160adcd9de7a7e6413a4966665756e263f0d5ddeffde277ffeee0576a5"}, - {file = "httptools-0.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fe9c766a0c35b7e3d6b6939393c8dfdd5da3ac5dec7f971ec9134f284c6c36d6"}, - {file = "httptools-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:85b392aba273566c3d5596a0a490978c085b79700814fb22bfd537d381dd230c"}, - {file = "httptools-0.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5e3088f4ed33947e16fd865b8200f9cfae1144f41b64a8cf19b599508e096bc"}, - {file = "httptools-0.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c2a56b6aad7cc8f5551d8e04ff5a319d203f9d870398b94702300de50190f63"}, - {file = "httptools-0.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9b571b281a19762adb3f48a7731f6842f920fa71108aff9be49888320ac3e24d"}, - {file = "httptools-0.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa47ffcf70ba6f7848349b8a6f9b481ee0f7637931d91a9860a1838bfc586901"}, - {file = "httptools-0.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:bede7ee075e54b9a5bde695b4fc8f569f30185891796b2e4e09e2226801d09bd"}, - {file = "httptools-0.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:64eba6f168803a7469866a9c9b5263a7463fa8b7a25b35e547492aa7322036b6"}, - {file = "httptools-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4b098e4bb1174096a93f48f6193e7d9aa7071506a5877da09a783509ca5fff42"}, - {file = "httptools-0.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9423a2de923820c7e82e18980b937893f4aa8251c43684fa1772e341f6e06887"}, - {file = "httptools-0.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca1b7becf7d9d3ccdbb2f038f665c0f4857e08e1d8481cbcc1a86a0afcfb62b2"}, - {file = "httptools-0.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:50d4613025f15f4b11f1c54bbed4761c0020f7f921b95143ad6d58c151198142"}, - {file = "httptools-0.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8ffce9d81c825ac1deaa13bc9694c0562e2840a48ba21cfc9f3b4c922c16f372"}, - {file = "httptools-0.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:1af91b3650ce518d226466f30bbba5b6376dbd3ddb1b2be8b0658c6799dd450b"}, - {file = "httptools-0.5.0.tar.gz", hash = "sha256:295874861c173f9101960bba332429bb77ed4dcd8cdf5cee9922eb00e4f6bc09"}, -] - -[package.extras] -test = ["Cython (>=0.29.24,<0.30.0)"] - [[package]] name = "httpx" version = "0.23.3" @@ -1673,14 +1685,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.1.0" +version = "6.2.0" description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-6.1.0-py3-none-any.whl", hash = "sha256:ff80f3b5394912eb1b108fcfd444dc78b7f1f3e16b16188054bd01cb9cb86f09"}, - {file = "importlib_metadata-6.1.0.tar.gz", hash = "sha256:43ce9281e097583d758c2c708c4376371261a02c34682491a8e98352365aad20"}, + {file = "importlib_metadata-6.2.0-py3-none-any.whl", hash = "sha256:8388b74023a138c605fddd0d47cb81dd706232569f56c9aca7d9c7fdb54caeba"}, + {file = "importlib_metadata-6.2.0.tar.gz", hash = "sha256:9127aad2f49d7203e7112098c12b92e4fd1061ccd18548cdfdc49171a8c073cc"}, ] [package.dependencies] @@ -3744,18 +3756,17 @@ files = [ [[package]] name = "pytest" -version = "7.2.2" +version = "7.3.0" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.2.2-py3-none-any.whl", hash = "sha256:130328f552dcfac0b1cec75c12e3f005619dc5f874f0a06e8ff7263f0ee6225e"}, - {file = "pytest-7.2.2.tar.gz", hash = "sha256:c99ab0c73aceb050f68929bc93af19ab6db0558791c6a0715723abe9d0ade9d4"}, + {file = "pytest-7.3.0-py3-none-any.whl", hash = "sha256:933051fa1bfbd38a21e73c3960cebdad4cf59483ddba7696c48509727e17f201"}, + {file = "pytest-7.3.0.tar.gz", hash = "sha256:58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d"}, ] [package.dependencies] -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" @@ -3764,7 +3775,7 @@ pluggy = ">=0.12,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-cov" @@ -3800,21 +3811,6 @@ files = [ [package.dependencies] six = ">=1.5" -[[package]] -name = "python-dotenv" -version = "1.0.0" -description = "Read key-value pairs from a .env file and set them as environment variables" -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, - {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, -] - -[package.extras] -cli = ["click (>=5.0)"] - [[package]] name = "python-editor" version = "1.0.4" @@ -4249,58 +4245,6 @@ tabulate = ">=0.8.9" ja = ["ipadic (>=1.0,<2.0)", "mecab-python3 (==1.0.5)"] ko = ["mecab-ko (==1.0.0)", "mecab-ko-dic (>=1.0,<2.0)"] -[[package]] -name = "scikit-image" -version = "0.19.3" -description = "Image processing in Python" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "scikit-image-0.19.3.tar.gz", hash = "sha256:24b5367de1762da6ee126dd8f30cc4e7efda474e0d7d70685433f0e3aa2ec450"}, - {file = "scikit_image-0.19.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:3a01372ae4bca223873304b0bff79b9d92446ac6d6177f73d89b45561e2d09d8"}, - {file = "scikit_image-0.19.3-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:fdf48d9b1f13af69e4e2c78e05067e322e9c8c97463c315cd0ecb47a94e259fc"}, - {file = "scikit_image-0.19.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b6a8f98f2ac9bb73706461fd1dec875f6a5141759ed526850a5a49e90003d19"}, - {file = "scikit_image-0.19.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cfbb073f23deb48e0e60c47f8741d8089121d89cc78629ea8c5b51096efc5be7"}, - {file = "scikit_image-0.19.3-cp310-cp310-win_amd64.whl", hash = "sha256:cc24177de3fdceca5d04807ad9c87d665f0bf01032ed94a9055cd1ed2b3f33e9"}, - {file = "scikit_image-0.19.3-cp37-cp37m-macosx_10_13_x86_64.whl", hash = "sha256:fd9dd3994bb6f9f7a35f228323f3c4dc44b3cf2ff15fd72d895216e9333550c6"}, - {file = "scikit_image-0.19.3-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ad5d8000207a264d1a55681a9276e6a739d3f05cf4429004ad00d61d1892235f"}, - {file = "scikit_image-0.19.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:84baa3179f3ae983c3a5d81c1e404bc92dcf7daeb41bfe9369badcda3fb22b92"}, - {file = "scikit_image-0.19.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f9f8a1387afc6c70f2bed007c3854a2d7489f9f7713c242f16f32ee05934bc2"}, - {file = "scikit_image-0.19.3-cp37-cp37m-win32.whl", hash = "sha256:9fb0923a3bfa99457c5e17888f27b3b8a83a3600b4fef317992e7b7234764732"}, - {file = "scikit_image-0.19.3-cp37-cp37m-win_amd64.whl", hash = "sha256:ce3d2207f253b8eb2c824e30d145a9f07a34a14212d57f3beca9f7e03c383cbe"}, - {file = "scikit_image-0.19.3-cp38-cp38-macosx_10_13_x86_64.whl", hash = "sha256:2a02d1bd0e2b53e36b952bd5fd6118d9ccc3ee51de35705d63d8eb1f2e86adef"}, - {file = "scikit_image-0.19.3-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:03779a7e1736fdf89d83c0ba67d44110496edd736a3bfce61a2b5177a1c8a099"}, - {file = "scikit_image-0.19.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19a21a101a20c587a3b611a2cf6f86c35aae9f8d9563279b987e83ee1c9a9790"}, - {file = "scikit_image-0.19.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f50b923f8099c1045fcde7418d86b206c87e333e43da980f41d8577b9605245"}, - {file = "scikit_image-0.19.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e207c6ce5ce121d7d9b9d2b61b9adca57d1abed112c902d8ffbfdc20fb42c12b"}, - {file = "scikit_image-0.19.3-cp38-cp38-win32.whl", hash = "sha256:a7c3985c68bfe05f7571167ee021d14f5b8d1a4a250c91f0b13be7fb07e6af34"}, - {file = "scikit_image-0.19.3-cp38-cp38-win_amd64.whl", hash = "sha256:651de1c2ce1fbee834753b46b8e7d81cb12a5594898babba63ac82b30ddad49d"}, - {file = "scikit_image-0.19.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:8d8917fcf85b987b1f287f823f3a1a7dac38b70aaca759bc0200f3bc292d5ced"}, - {file = "scikit_image-0.19.3-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:0b0a199157ce8487c77de4fde0edc0b42d6d42818881c11f459262351d678b2d"}, - {file = "scikit_image-0.19.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33dfd463ee6cc509defa279b963829f2230c9e0639ccd3931045be055878eea6"}, - {file = "scikit_image-0.19.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a8714348ddd671f819457a797c97d4c672166f093def66d66c3254cbd1d43f83"}, - {file = "scikit_image-0.19.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff3b1025356508d41f4fe48528e509d95f9e4015e90cf158cd58c56dc63e0ac5"}, - {file = "scikit_image-0.19.3-cp39-cp39-win32.whl", hash = "sha256:9439e5294de3f18d6e82ec8eee2c46590231cf9c690da80545e83a0733b7a69e"}, - {file = "scikit_image-0.19.3-cp39-cp39-win_amd64.whl", hash = "sha256:32fb88cc36203b99c9672fb972c9ef98635deaa5fc889fe969f3e11c44f22919"}, -] - -[package.dependencies] -imageio = ">=2.4.1" -networkx = ">=2.2" -numpy = ">=1.17.0" -packaging = ">=20.0" -pillow = ">=6.1.0,<7.1.0 || >7.1.0,<7.1.1 || >7.1.1,<8.3.0 || >8.3.0" -PyWavelets = ">=1.1.1" -scipy = ">=1.4.1" -tifffile = ">=2019.7.26" - -[package.extras] -data = ["pooch (>=1.3.0)"] -docs = ["cloudpickle (>=0.2.1)", "dask[array] (>=0.15.0,!=2.17.0)", "ipywidgets", "kaleido", "matplotlib (>=3.3)", "myst-parser", "numpydoc (>=1.0)", "pandas (>=0.23.0)", "plotly (>=4.14.0)", "pooch (>=1.3.0)", "pytest-runner", "scikit-learn", "seaborn (>=0.7.1)", "sphinx (>=1.8)", "sphinx-copybutton", "sphinx-gallery (>=0.10.1)", "tifffile (>=2020.5.30)"] -optional = ["SimpleITK", "astropy (>=3.1.2)", "cloudpickle (>=0.2.1)", "dask[array] (>=1.0.0,!=2.17.0)", "matplotlib (>=3.0.3)", "pooch (>=1.3.0)", "pyamg", "qtpy"] -test = ["asv", "codecov", "flake8", "matplotlib (>=3.0.3)", "pooch (>=1.3.0)", "pytest (>=5.2.0)", "pytest-cov (>=2.7.0)", "pytest-faulthandler", "pytest-localserver"] - [[package]] name = "scikit-image" version = "0.20.0" @@ -4340,7 +4284,10 @@ numpy = ">=1.21.1" packaging = ">=20.0" pillow = ">=9.0.1" PyWavelets = ">=1.1.1" -scipy = {version = ">=1.8", markers = "python_version > \"3.9\""} +scipy = [ + {version = ">=1.8,<1.9.2", markers = "python_version <= \"3.9\""}, + {version = ">=1.8", markers = "python_version > \"3.9\""}, +] tifffile = ">=2019.7.26" [package.extras] @@ -4414,6 +4361,42 @@ resampy = ">=0.2" scikit-image = ">=0.17" scipy = ">=1.5" +[[package]] +name = "scipy" +version = "1.9.1" +description = "SciPy: Scientific Library for Python" +category = "main" +optional = false +python-versions = ">=3.8,<3.12" +files = [ + {file = "scipy-1.9.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c61b4a91a702e8e04aeb0bfc40460e1f17a640977c04dda8757efb0199c75332"}, + {file = "scipy-1.9.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:d79da472015d0120ba9b357b28a99146cd6c17b9609403164b1a8ed149b4dfc8"}, + {file = "scipy-1.9.1-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl", hash = "sha256:825951b88f56765aeb6e5e38ac9d7d47407cfaaeb008d40aa1b45a2d7ea2731e"}, + {file = "scipy-1.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f950a04b33e17b38ff561d5a0951caf3f5b47caa841edd772ffb7959f20a6af0"}, + {file = "scipy-1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc81ac25659fec73599ccc52c989670e5ccd8974cf34bacd7b54a8d809aff1a"}, + {file = "scipy-1.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:8d3faa40ac16c6357aaf7ea50394ea6f1e8e99d75e927a51102b1943b311b4d9"}, + {file = "scipy-1.9.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7a412c476a91b080e456229e413792bbb5d6202865dae963d1e6e28c2bb58691"}, + {file = "scipy-1.9.1-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:eb954f5aca4d26f468bbebcdc5448348eb287f7bea536c6306f62ea062f63d9a"}, + {file = "scipy-1.9.1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl", hash = "sha256:3c6f5d1d4b9a5e4fe5e14f26ffc9444fc59473bbf8d45dc4a9a15283b7063a72"}, + {file = "scipy-1.9.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:bc4e2c77d4cd015d739e75e74ebbafed59ba8497a7ed0fd400231ed7683497c4"}, + {file = "scipy-1.9.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0419485dbcd0ed78c0d5bf234c5dd63e86065b39b4d669e45810d42199d49521"}, + {file = "scipy-1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:34441dfbee5b002f9e15285014fd56e5e3372493c3e64ae297bae2c4b9659f5a"}, + {file = "scipy-1.9.1-cp38-cp38-win32.whl", hash = "sha256:b97b479f39c7e4aaf807efd0424dec74bbb379108f7d22cf09323086afcd312c"}, + {file = "scipy-1.9.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8fe305d9d67a81255e06203454729405706907dccbdfcc330b7b3482a6c371d"}, + {file = "scipy-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:39ab9240cd215a9349c85ab908dda6d732f7d3b4b192fa05780812495536acc4"}, + {file = "scipy-1.9.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:71487c503e036740635f18324f62a11f283a632ace9d35933b2b0a04fd898c98"}, + {file = "scipy-1.9.1-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl", hash = "sha256:3bc1ab68b9a096f368ba06c3a5e1d1d50957a86665fc929c4332d21355e7e8f4"}, + {file = "scipy-1.9.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f7c39f7dbb57cce00c108d06d731f3b0e2a4d3a95c66d96bce697684876ce4d4"}, + {file = "scipy-1.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47d1a95bd9d37302afcfe1b84c8011377c4f81e33649c5a5785db9ab827a6ade"}, + {file = "scipy-1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96d7cf7b25c9f23c59a766385f6370dab0659741699ecc7a451f9b94604938ce"}, + {file = "scipy-1.9.1-cp39-cp39-win32.whl", hash = "sha256:09412eb7fb60b8f00b328037fd814d25d261066ebc43a1e339cdce4f7502877e"}, + {file = "scipy-1.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:90c805f30c46cf60f1e76e947574f02954d25e3bb1e97aa8a07bc53aa31cf7d1"}, + {file = "scipy-1.9.1.tar.gz", hash = "sha256:26d28c468900e6d5fdb37d2812ab46db0ccd22c63baa095057871faa3a498bc9"}, +] + +[package.dependencies] +numpy = ">=1.18.5,<1.25.0" + [[package]] name = "scipy" version = "1.10.1" @@ -4538,7 +4521,6 @@ files = [ {file = "soundfile-0.12.1-py2.py3-none-any.whl", hash = "sha256:828a79c2e75abab5359f780c81dccd4953c45a2c4cd4f05ba3e233ddf984b882"}, {file = "soundfile-0.12.1-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:d922be1563ce17a69582a352a86f28ed8c9f6a8bc951df63476ffc310c064bfa"}, {file = "soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:bceaab5c4febb11ea0554566784bcf4bc2e3977b53946dda2b12804b4fe524a8"}, - {file = "soundfile-0.12.1-py2.py3-none-manylinux_2_17_x86_64.whl", hash = "sha256:2dc3685bed7187c072a46ab4ffddd38cef7de9ae5eb05c03df2ad569cf4dacbc"}, {file = "soundfile-0.12.1-py2.py3-none-manylinux_2_31_x86_64.whl", hash = "sha256:074247b771a181859d2bc1f98b5ebf6d5153d2c397b86ee9e29ba602a8dfe2a6"}, {file = "soundfile-0.12.1-py2.py3-none-win32.whl", hash = "sha256:59dfd88c79b48f441bbf6994142a19ab1de3b9bb7c12863402c2bc621e49091a"}, {file = "soundfile-0.12.1-py2.py3-none-win_amd64.whl", hash = "sha256:0d86924c00b62552b650ddd28af426e3ff2d4dc2e9047dae5b3d8452e0a49a77"}, @@ -4731,14 +4713,14 @@ test = ["pytest"] [[package]] name = "starlette" -version = "0.22.0" +version = "0.26.1" description = "The little ASGI library that shines." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "starlette-0.22.0-py3-none-any.whl", hash = "sha256:b5eda991ad5f0ee5d8ce4c4540202a573bb6691ecd0c712262d0bc85cf8f2c50"}, - {file = "starlette-0.22.0.tar.gz", hash = "sha256:b092cbc365bea34dd6840b42861bdabb2f507f8671e642e8272d2442e08ea4ff"}, + {file = "starlette-0.26.1-py3-none-any.whl", hash = "sha256:e87fce5d7cbdde34b76f0ac69013fd9d190d581d80681493016666e6f96c6d5e"}, + {file = "starlette-0.26.1.tar.gz", hash = "sha256:41da799057ea8620e4667a3e69a5b1923ebd32b1819c8fa75634bbe8d8bea9bd"}, ] [package.dependencies] @@ -4996,22 +4978,18 @@ files = [ {file = "torchaudio-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5d21ebbb55e7040d418d5062b0e882f9660d68b477b38fd436fa6c92ccbb52a"}, {file = "torchaudio-2.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6dbcd93b29d71a2f500f36a34ea5e467f510f773da85322098e6bdd8c9dc9948"}, {file = "torchaudio-2.0.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:5fdaba10ff06d098d603d9eb8d2ff541c3f3fe28ba178a78787190cec0d5187f"}, - {file = "torchaudio-2.0.1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:6419199c773c5045c594ff950d5e5dbbfa6c830892ec09721d4ed8704b702bfd"}, {file = "torchaudio-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:a5c81e480e5dcdcba065af1e3e31678ac29518991f00260094d37a39e63d76e5"}, {file = "torchaudio-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e2a047675493c0aa258fec621ef40e8b01abe3d8dbc872152e4b5998418aa3c5"}, {file = "torchaudio-2.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:91a28e587f708a03320eddbcc4a7dd1ad7150b3d4846b6c1557d85cc89a8d06c"}, {file = "torchaudio-2.0.1-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:ba7740d98f601218ff667598ab3d9dab5f326878374fcb52d656f4ff033b9e96"}, - {file = "torchaudio-2.0.1-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:f401b192921c8b77cc5e478ede589b256dba463f1cee91172ecb376fea45a288"}, {file = "torchaudio-2.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:0ef6754cf75ca5fd5117cb6243a6cf33552d67e9af0075aa6954b2c34bbf1036"}, {file = "torchaudio-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:022ca1baa4bb819b78343bd47b57ff6dc6f9fc19fa4ef269946aadf7e62db3c0"}, {file = "torchaudio-2.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a153ad5cdb62de8ec9fd1360a0d080bbaf39d578ae04e788db211571e675b7e0"}, {file = "torchaudio-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:aa7897774ab4156d0b72f7078b823ebc1371ee24c50df965447782889552367a"}, - {file = "torchaudio-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:48d133593cddfe0424a350b566d54065bf6fe7469654de7add2f11b3ef03c5d9"}, {file = "torchaudio-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:ac65eb067feee435debba81adfe8337fa007a06de6508c0d80261c5562b6d098"}, {file = "torchaudio-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e3c6c8f9ea9f0e2df7a0b9375b0dcf955906e38fc12fab542b72a861564af8e7"}, {file = "torchaudio-2.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1d0cf0779a334ec1861e9fa28bceb66a633c42e8f6b3322e2e37ff9f20d0ae81"}, {file = "torchaudio-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:ab7acd2b5d351a2c65e4d935bb90b9256382bed93df57ee177bdbbe31c3cc984"}, - {file = "torchaudio-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:77b953fd7278773269a9477315b8998ae7e5011cc4b2907e0df18162327482f1"}, {file = "torchaudio-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:c01bcea9d4c4a6616452e6cbd44d55913d8e6dee58191b925f35d46a2bf6e71b"}, ] @@ -5123,15 +5101,6 @@ category = "main" optional = false python-versions = "*" files = [ - {file = "triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:38806ee9663f4b0f7cd64790e96c579374089e58f49aac4a6608121aa55e2505"}, - {file = "triton-2.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:226941c7b8595219ddef59a1fdb821e8c744289a132415ddd584facedeb475b1"}, - {file = "triton-2.0.0-1-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4c9fc8c89874bc48eb7e7b2107a9b8d2c0bf139778637be5bfccb09191685cfd"}, - {file = "triton-2.0.0-1-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d2684b6a60b9f174f447f36f933e9a45f31db96cb723723ecd2dcfd1c57b778b"}, - {file = "triton-2.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9d4978298b74fcf59a75fe71e535c092b023088933b2f1df933ec32615e4beef"}, - {file = "triton-2.0.0-1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:74f118c12b437fb2ca25e1a04759173b517582fcf4c7be11913316c764213656"}, - {file = "triton-2.0.0-1-pp37-pypy37_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9618815a8da1d9157514f08f855d9e9ff92e329cd81c0305003eb9ec25cc5add"}, - {file = "triton-2.0.0-1-pp38-pypy38_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aca3303629cd3136375b82cb9921727f804e47ebee27b2677fef23005c3851a"}, - {file = "triton-2.0.0-1-pp39-pypy39_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e3e13aa8b527c9b642e3a9defcc0fbd8ffbe1c80d8ac8c15a01692478dc64d8a"}, {file = "triton-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f05a7e64e4ca0565535e3d5d3405d7e49f9d308505bb7773d21fb26a4c008c2"}, {file = "triton-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb4b99ca3c6844066e516658541d876c28a5f6e3a852286bbc97ad57134827fd"}, {file = "triton-2.0.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47b4d70dc92fb40af553b4460492c31dc7d3a114a979ffb7a5cdedb7eb546c08"}, @@ -5310,63 +5279,11 @@ files = [ [package.dependencies] click = ">=7.0" -colorama = {version = ">=0.4", optional = true, markers = "sys_platform == \"win32\" and extra == \"standard\""} h11 = ">=0.8" -httptools = {version = ">=0.5.0", optional = true, markers = "extra == \"standard\""} -python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} -pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""} -uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""} -watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} -websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""} [package.extras] standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] -[[package]] -name = "uvloop" -version = "0.17.0" -description = "Fast implementation of asyncio event loop on top of libuv" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ce9f61938d7155f79d3cb2ffa663147d4a76d16e08f65e2c66b77bd41b356718"}, - {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:68532f4349fd3900b839f588972b3392ee56042e440dd5873dfbbcd2cc67617c"}, - {file = "uvloop-0.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0949caf774b9fcefc7c5756bacbbbd3fc4c05a6b7eebc7c7ad6f825b23998d6d"}, - {file = "uvloop-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff3d00b70ce95adce264462c930fbaecb29718ba6563db354608f37e49e09024"}, - {file = "uvloop-0.17.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a5abddb3558d3f0a78949c750644a67be31e47936042d4f6c888dd6f3c95f4aa"}, - {file = "uvloop-0.17.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8efcadc5a0003d3a6e887ccc1fb44dec25594f117a94e3127954c05cf144d811"}, - {file = "uvloop-0.17.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3378eb62c63bf336ae2070599e49089005771cc651c8769aaad72d1bd9385a7c"}, - {file = "uvloop-0.17.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6aafa5a78b9e62493539456f8b646f85abc7093dd997f4976bb105537cf2635e"}, - {file = "uvloop-0.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c686a47d57ca910a2572fddfe9912819880b8765e2f01dc0dd12a9bf8573e539"}, - {file = "uvloop-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:864e1197139d651a76c81757db5eb199db8866e13acb0dfe96e6fc5d1cf45fc4"}, - {file = "uvloop-0.17.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2a6149e1defac0faf505406259561bc14b034cdf1d4711a3ddcdfbaa8d825a05"}, - {file = "uvloop-0.17.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6708f30db9117f115eadc4f125c2a10c1a50d711461699a0cbfaa45b9a78e376"}, - {file = "uvloop-0.17.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:23609ca361a7fc587031429fa25ad2ed7242941adec948f9d10c045bfecab06b"}, - {file = "uvloop-0.17.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2deae0b0fb00a6af41fe60a675cec079615b01d68beb4cc7b722424406b126a8"}, - {file = "uvloop-0.17.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45cea33b208971e87a31c17622e4b440cac231766ec11e5d22c76fab3bf9df62"}, - {file = "uvloop-0.17.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9b09e0f0ac29eee0451d71798878eae5a4e6a91aa275e114037b27f7db72702d"}, - {file = "uvloop-0.17.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbbaf9da2ee98ee2531e0c780455f2841e4675ff580ecf93fe5c48fe733b5667"}, - {file = "uvloop-0.17.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a4aee22ece20958888eedbad20e4dbb03c37533e010fb824161b4f05e641f738"}, - {file = "uvloop-0.17.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:307958f9fc5c8bb01fad752d1345168c0abc5d62c1b72a4a8c6c06f042b45b20"}, - {file = "uvloop-0.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ebeeec6a6641d0adb2ea71dcfb76017602ee2bfd8213e3fcc18d8f699c5104f"}, - {file = "uvloop-0.17.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1436c8673c1563422213ac6907789ecb2b070f5939b9cbff9ef7113f2b531595"}, - {file = "uvloop-0.17.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8887d675a64cfc59f4ecd34382e5b4f0ef4ae1da37ed665adba0c2badf0d6578"}, - {file = "uvloop-0.17.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3db8de10ed684995a7f34a001f15b374c230f7655ae840964d51496e2f8a8474"}, - {file = "uvloop-0.17.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7d37dccc7ae63e61f7b96ee2e19c40f153ba6ce730d8ba4d3b4e9738c1dccc1b"}, - {file = "uvloop-0.17.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cbbe908fda687e39afd6ea2a2f14c2c3e43f2ca88e3a11964b297822358d0e6c"}, - {file = "uvloop-0.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d97672dc709fa4447ab83276f344a165075fd9f366a97b712bdd3fee05efae8"}, - {file = "uvloop-0.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1e507c9ee39c61bfddd79714e4f85900656db1aec4d40c6de55648e85c2799c"}, - {file = "uvloop-0.17.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c092a2c1e736086d59ac8e41f9c98f26bbf9b9222a76f21af9dfe949b99b2eb9"}, - {file = "uvloop-0.17.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:30babd84706115626ea78ea5dbc7dd8d0d01a2e9f9b306d24ca4ed5796c66ded"}, - {file = "uvloop-0.17.0.tar.gz", hash = "sha256:0ddf6baf9cf11a1a22c71487f39f15b2cf78eb5bde7e5b45fbb99e8a9d91b9e1"}, -] - -[package.extras] -dev = ["Cython (>=0.29.32,<0.30.0)", "Sphinx (>=4.1.2,<4.2.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=22.0.0,<22.1.0)", "pycodestyle (>=2.7.0,<2.8.0)", "pytest (>=3.6.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] -docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] -test = ["Cython (>=0.29.32,<0.30.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=22.0.0,<22.1.0)", "pycodestyle (>=2.7.0,<2.8.0)"] - [[package]] name = "virtualenv" version = "20.21.0" @@ -5388,41 +5305,6 @@ platformdirs = ">=2.4,<4" docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] test = ["covdefaults (>=2.2.2)", "coverage (>=7.1)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23)", "pytest (>=7.2.1)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)"] -[[package]] -name = "watchfiles" -version = "0.19.0" -description = "Simple, modern and high performance file watching and code reload in python." -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "watchfiles-0.19.0-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:91633e64712df3051ca454ca7d1b976baf842d7a3640b87622b323c55f3345e7"}, - {file = "watchfiles-0.19.0-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:b6577b8c6c8701ba8642ea9335a129836347894b666dd1ec2226830e263909d3"}, - {file = "watchfiles-0.19.0-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:18b28f6ad871b82df9542ff958d0c86bb0d8310bb09eb8e87d97318a3b5273af"}, - {file = "watchfiles-0.19.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fac19dc9cbc34052394dbe81e149411a62e71999c0a19e1e09ce537867f95ae0"}, - {file = "watchfiles-0.19.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:09ea3397aecbc81c19ed7f025e051a7387feefdb789cf768ff994c1228182fda"}, - {file = "watchfiles-0.19.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c0376deac92377817e4fb8f347bf559b7d44ff556d9bc6f6208dd3f79f104aaf"}, - {file = "watchfiles-0.19.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c75eff897786ee262c9f17a48886f4e98e6cfd335e011c591c305e5d083c056"}, - {file = "watchfiles-0.19.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb5d45c4143c1dd60f98a16187fd123eda7248f84ef22244818c18d531a249d1"}, - {file = "watchfiles-0.19.0-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:79c533ff593db861ae23436541f481ec896ee3da4e5db8962429b441bbaae16e"}, - {file = "watchfiles-0.19.0-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:3d7d267d27aceeeaa3de0dd161a0d64f0a282264d592e335fff7958cc0cbae7c"}, - {file = "watchfiles-0.19.0-cp37-abi3-win32.whl", hash = "sha256:176a9a7641ec2c97b24455135d58012a5be5c6217fc4d5fef0b2b9f75dbf5154"}, - {file = "watchfiles-0.19.0-cp37-abi3-win_amd64.whl", hash = "sha256:945be0baa3e2440151eb3718fd8846751e8b51d8de7b884c90b17d271d34cae8"}, - {file = "watchfiles-0.19.0-cp37-abi3-win_arm64.whl", hash = "sha256:0089c6dc24d436b373c3c57657bf4f9a453b13767150d17284fc6162b2791911"}, - {file = "watchfiles-0.19.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:cae3dde0b4b2078f31527acff6f486e23abed307ba4d3932466ba7cdd5ecec79"}, - {file = "watchfiles-0.19.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:7f3920b1285a7d3ce898e303d84791b7bf40d57b7695ad549dc04e6a44c9f120"}, - {file = "watchfiles-0.19.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9afd0d69429172c796164fd7fe8e821ade9be983f51c659a38da3faaaaac44dc"}, - {file = "watchfiles-0.19.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68dce92b29575dda0f8d30c11742a8e2b9b8ec768ae414b54f7453f27bdf9545"}, - {file = "watchfiles-0.19.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:5569fc7f967429d4bc87e355cdfdcee6aabe4b620801e2cf5805ea245c06097c"}, - {file = "watchfiles-0.19.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5471582658ea56fca122c0f0d0116a36807c63fefd6fdc92c71ca9a4491b6b48"}, - {file = "watchfiles-0.19.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b538014a87f94d92f98f34d3e6d2635478e6be6423a9ea53e4dd96210065e193"}, - {file = "watchfiles-0.19.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20b44221764955b1e703f012c74015306fb7e79a00c15370785f309b1ed9aa8d"}, - {file = "watchfiles-0.19.0.tar.gz", hash = "sha256:d9b073073e048081e502b6c6b0b88714c026a1a4c890569238d04aca5f9ca74b"}, -] - -[package.dependencies] -anyio = ">=3.0.0" - [[package]] name = "wcwidth" version = "0.2.6" From 96f9ea1e12bf6de18528f23f5d99a691eaeb1a9e Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:46:23 +0900 Subject: [PATCH 02/20] fix(train): do not train d --- src/so_vits_svc_fork/train.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index 2209de6b..7ccf8540 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -8,7 +8,7 @@ import lightning.pytorch as pl import torch -from lightning.pytorch.accelerators import TPUAccelerator +from lightning.pytorch.accelerators import IPUAccelerator, TPUAccelerator from lightning.pytorch.loggers import TensorBoardLogger from torch.cuda.amp import autocast from torch.nn import functional as F @@ -195,6 +195,8 @@ def __init__(self, reset_optimizer: bool = False, **hparams: Any): ) def configure_optimizers(self): + if isinstance(self.trainer.accelerator, IPUAccelerator): + return self.optim_g, self.optim_d return [self.optim_g, self.optim_d], [self.scheduler_g, self.scheduler_d] def log_image_dict( @@ -225,7 +227,10 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: self.net_d.train() # get optims - optim_g, optim_d = self.optimizers() + if isinstance(self.trainer.accelerator, IPUAccelerator): + optim_g = self.optimizers() + else: + optim_g, optim_d = self.optimizers() # Generator # train @@ -320,6 +325,8 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: optim_g.zero_grad() self.untoggle_optimizer(optim_g) + if isinstance(self.trainer.accelerator, IPUAccelerator): + return # Discriminator # train self.toggle_optimizer(optim_d) From e4f90799380033ae325d30734f578ef51bd5b19d Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:51:07 +0900 Subject: [PATCH 03/20] fix(train): fix last commit --- src/so_vits_svc_fork/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index 7ccf8540..b8efae2e 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -196,7 +196,7 @@ def __init__(self, reset_optimizer: bool = False, **hparams: Any): def configure_optimizers(self): if isinstance(self.trainer.accelerator, IPUAccelerator): - return self.optim_g, self.optim_d + return [self.optim_g], [self.scheduler_g] return [self.optim_g, self.optim_d], [self.scheduler_g, self.scheduler_d] def log_image_dict( From 3dd74937949330144b2e7f891e4dab50ce073f51 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:56:10 +0900 Subject: [PATCH 04/20] fix(train): fix beta types --- src/so_vits_svc_fork/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index b8efae2e..7cb167a9 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -178,13 +178,13 @@ def __init__(self, reset_optimizer: bool = False, **hparams: Any): self.optim_g = torch.optim.AdamW( self.net_g.parameters(), self.hparams.train.learning_rate, - betas=self.hparams.train.betas, + betas=tuple(self.hparams.train.betas), eps=self.hparams.train.eps, ) self.optim_d = torch.optim.AdamW( self.net_d.parameters(), self.hparams.train.learning_rate, - betas=self.hparams.train.betas, + betas=tuple(self.hparams.train.betas), eps=self.hparams.train.eps, ) self.scheduler_g = torch.optim.lr_scheduler.ExponentialLR( From f050adc47fb5d4d605be8ba35c0b433a5b746301 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:59:18 +0900 Subject: [PATCH 05/20] fix: fix normalize_f0 --- src/so_vits_svc_fork/f0.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/so_vits_svc_fork/f0.py b/src/so_vits_svc_fork/f0.py index 990f2050..85f397aa 100644 --- a/src/so_vits_svc_fork/f0.py +++ b/src/so_vits_svc_fork/f0.py @@ -29,8 +29,6 @@ def normalize_f0( factor = torch.ones(f0.shape[0], 1).to(f0.device) # normalize f0 based on means and factor f0_norm = (f0 - means.unsqueeze(-1)) * factor.unsqueeze(-1) - if torch.isnan(f0_norm).any(): - exit(0) return f0_norm * x_mask From fcdbc8823c33500b59cf6fb069ecacc9352f2d83 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 14:41:40 +0900 Subject: [PATCH 06/20] fix(f0): fix f0 --- src/so_vits_svc_fork/f0.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/so_vits_svc_fork/f0.py b/src/so_vits_svc_fork/f0.py index 85f397aa..eabfc529 100644 --- a/src/so_vits_svc_fork/f0.py +++ b/src/so_vits_svc_fork/f0.py @@ -216,12 +216,12 @@ def compute_f0( def f0_to_coarse(f0: torch.Tensor | float): is_torch = isinstance(f0, torch.Tensor) f0_mel = 1127 * (1 + f0 / 700).log() if is_torch else 1127 * np.log(1 + f0 / 700) - f0_mel[f0_mel > 0] = (f0_mel[f0_mel > 0] - f0_mel_min) * (f0_bin - 2) / ( - f0_mel_max - f0_mel_min - ) + 1 + # f0_mel[f0_mel > 0] = ... + f0_mel = (f0_mel - f0_mel_min) * (f0_bin - 2) / (f0_mel_max - f0_mel_min) + 1 - f0_mel[f0_mel <= 1] = 1 - f0_mel[f0_mel > f0_bin - 1] = f0_bin - 1 + # f0_mel[f0_mel <= 1] = 1 + # f0_mel[f0_mel > f0_bin - 1] = f0_bin - 1 + f0_mel = torch.clamp(f0_mel, 1, f0_bin - 1) f0_coarse = (f0_mel + 0.5).long() if is_torch else np.rint(f0_mel).astype(np.int) assert f0_coarse.max() <= 255 and f0_coarse.min() >= 1, ( f0_coarse.max(), From 8473833c5b1444128f76e3f3b6d64d4662b81a9f Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 14:43:54 +0900 Subject: [PATCH 07/20] fix(f0): fix f0 --- src/so_vits_svc_fork/f0.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/so_vits_svc_fork/f0.py b/src/so_vits_svc_fork/f0.py index eabfc529..c104d4f5 100644 --- a/src/so_vits_svc_fork/f0.py +++ b/src/so_vits_svc_fork/f0.py @@ -223,10 +223,10 @@ def f0_to_coarse(f0: torch.Tensor | float): # f0_mel[f0_mel > f0_bin - 1] = f0_bin - 1 f0_mel = torch.clamp(f0_mel, 1, f0_bin - 1) f0_coarse = (f0_mel + 0.5).long() if is_torch else np.rint(f0_mel).astype(np.int) - assert f0_coarse.max() <= 255 and f0_coarse.min() >= 1, ( - f0_coarse.max(), - f0_coarse.min(), - ) + # assert f0_coarse.max() <= 255 and f0_coarse.min() >= 1, ( + # f0_coarse.max(), + # f0_coarse.min(), + # ) return f0_coarse From f80491f7e9e1e7b4b575362aa58463121aff13d2 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 14:50:49 +0900 Subject: [PATCH 08/20] fix: fix slice_pitch_segments --- src/so_vits_svc_fork/modules/commons.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/so_vits_svc_fork/modules/commons.py b/src/so_vits_svc_fork/modules/commons.py index 16b3cfbe..85e72c70 100644 --- a/src/so_vits_svc_fork/modules/commons.py +++ b/src/so_vits_svc_fork/modules/commons.py @@ -5,12 +5,12 @@ def slice_pitch_segments(x, ids_str, segment_size=4): - ret = torch.zeros_like(x[:, :segment_size]) + """ret = torch.zeros_like(x[:, :segment_size]) for i in range(x.size(0)): idx_str = ids_str[i] idx_end = idx_str + segment_size - ret[i] = x[i, idx_str:idx_end] - return ret + ret[i] = x[i, idx_str:idx_end]""" + return x[:, ids_str : ids_str + segment_size] def rand_slice_segments_with_pitch(x, pitch, x_lengths=None, segment_size=4): From e83bb85bd9b814e1c381859b104c1538dccfdbd2 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 14:55:13 +0900 Subject: [PATCH 09/20] fix(commons): fix more --- src/so_vits_svc_fork/modules/commons.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/so_vits_svc_fork/modules/commons.py b/src/so_vits_svc_fork/modules/commons.py index 85e72c70..b5b56fd6 100644 --- a/src/so_vits_svc_fork/modules/commons.py +++ b/src/so_vits_svc_fork/modules/commons.py @@ -34,10 +34,12 @@ def get_padding(kernel_size, dilation=1): return int((kernel_size * dilation - dilation) / 2) -def convert_pad_shape(pad_shape): - l = pad_shape[::-1] - pad_shape = [item for sublist in l for item in sublist] - return pad_shape +def convert_pad_shape(pad_shape) -> torch.Tensor: + # l = pad_shape[::-1] + # pad_shape = [item for sublist in l for item in sublist] + # return pad_shape + # more efficient + return torch.tensor(pad_shape[::-1]).view(-1) def intersperse(lst, item): @@ -67,12 +69,7 @@ def rand_gumbel_like(x): def slice_segments(x, ids_str, segment_size=4): - ret = torch.zeros_like(x[:, :, :segment_size]) - for i in range(x.size(0)): - idx_str = ids_str[i] - idx_end = idx_str + segment_size - ret[i] = x[i, :, idx_str:idx_end] - return ret + return x[:, :, ids_str : ids_str + segment_size] def rand_slice_segments(x, x_lengths=None, segment_size=4): From a685de13a2fe59da4de6c126dc42f8a8b30efa68 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 14:56:33 +0900 Subject: [PATCH 10/20] fix: revert convert_pad_shape change --- src/so_vits_svc_fork/modules/commons.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/so_vits_svc_fork/modules/commons.py b/src/so_vits_svc_fork/modules/commons.py index b5b56fd6..b962ac10 100644 --- a/src/so_vits_svc_fork/modules/commons.py +++ b/src/so_vits_svc_fork/modules/commons.py @@ -34,12 +34,12 @@ def get_padding(kernel_size, dilation=1): return int((kernel_size * dilation - dilation) / 2) -def convert_pad_shape(pad_shape) -> torch.Tensor: - # l = pad_shape[::-1] - # pad_shape = [item for sublist in l for item in sublist] - # return pad_shape +def convert_pad_shape(pad_shape): + l = pad_shape[::-1] + pad_shape = [item for sublist in l for item in sublist] + return pad_shape # more efficient - return torch.tensor(pad_shape[::-1]).view(-1) + # return torch.tensor(pad_shape[::-1]).view(-1) def intersperse(lst, item): From bb7992ad54c1a96e0a43a840cf35aa2fca7254c2 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:01:53 +0900 Subject: [PATCH 11/20] fix(commons): fix --- src/so_vits_svc_fork/modules/commons.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/so_vits_svc_fork/modules/commons.py b/src/so_vits_svc_fork/modules/commons.py index b962ac10..a764bd35 100644 --- a/src/so_vits_svc_fork/modules/commons.py +++ b/src/so_vits_svc_fork/modules/commons.py @@ -10,7 +10,10 @@ def slice_pitch_segments(x, ids_str, segment_size=4): idx_str = ids_str[i] idx_end = idx_str + segment_size ret[i] = x[i, idx_str:idx_end]""" - return x[:, ids_str : ids_str + segment_size] + idx_str = ids_str.unsqueeze(1) + idx_end = idx_str + segment_size + ret = x.gather(1, torch.arange(idx_str, idx_end).unsqueeze(2)).squeeze(2) + return ret def rand_slice_segments_with_pitch(x, pitch, x_lengths=None, segment_size=4): @@ -19,7 +22,7 @@ def rand_slice_segments_with_pitch(x, pitch, x_lengths=None, segment_size=4): x_lengths = t ids_str_max = x_lengths - segment_size + 1 ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long) - ret = slice_segments(x, ids_str, segment_size) + ret = slice_pitch_segments(x, ids_str, segment_size) ret_pitch = slice_pitch_segments(pitch, ids_str, segment_size) return ret, ret_pitch, ids_str From b8924418f237cc94cb761c993ce483fa43bf1a13 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:23:46 +0900 Subject: [PATCH 12/20] fix: update slice_segments (it was hard...) --- .idea/workspace.xml | 21 +-- src/so_vits_svc_fork/modules/commons.py | 166 +++++-------------- src/so_vits_svc_fork/modules/synthesizers.py | 46 ++++- src/so_vits_svc_fork/train.py | 4 +- 4 files changed, 86 insertions(+), 151 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 73a840f7..f5be289f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,23 +2,9 @@ - - - - - - - - - - - - - - - - - + + + diff --git a/src/so_vits_svc_fork/modules/commons.py b/src/so_vits_svc_fork/modules/commons.py index a764bd35..b9ef83c7 100644 --- a/src/so_vits_svc_fork/modules/commons.py +++ b/src/so_vits_svc_fork/modules/commons.py @@ -1,30 +1,49 @@ -import math - import torch -from torch.nn import functional as F +from torch import Tensor + + +def slice_segments(x: Tensor, starts: Tensor, length: int) -> Tensor: + x_slice = torch.zeros((x.size()[:-1] + (length,)), dtype=x.dtype, device=x.device) + ends = starts + length + for i, (start, end) in enumerate(zip(starts, ends)): + x_slice[i, ...] = x[i, ..., start:end] + return x_slice -def slice_pitch_segments(x, ids_str, segment_size=4): - """ret = torch.zeros_like(x[:, :segment_size]) - for i in range(x.size(0)): - idx_str = ids_str[i] - idx_end = idx_str + segment_size - ret[i] = x[i, idx_str:idx_end]""" - idx_str = ids_str.unsqueeze(1) - idx_end = idx_str + segment_size - ret = x.gather(1, torch.arange(idx_str, idx_end).unsqueeze(2)).squeeze(2) - return ret +def slice_2d_segments(x: Tensor, starts: Tensor, length: int) -> Tensor: + batch_size, num_features, seq_len = x.shape + ends = starts + length + idxs = ( + torch.arange(seq_len) + .unsqueeze(0) + .unsqueeze(1) + .repeat(batch_size, num_features, 1) + ) + mask = (idxs >= starts.unsqueeze(-1).unsqueeze(-1)) & ( + idxs < ends.unsqueeze(-1).unsqueeze(-1) + ) + return x[mask].reshape(batch_size, num_features, length) -def rand_slice_segments_with_pitch(x, pitch, x_lengths=None, segment_size=4): - b, d, t = x.size() - if x_lengths is None: - x_lengths = t - ids_str_max = x_lengths - segment_size + 1 - ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long) - ret = slice_pitch_segments(x, ids_str, segment_size) - ret_pitch = slice_pitch_segments(pitch, ids_str, segment_size) - return ret, ret_pitch, ids_str +def slice_1d_segments(x: Tensor, starts: Tensor, length: int) -> Tensor: + batch_size, seq_len = x.shape + ends = starts + length + idxs = torch.arange(seq_len).unsqueeze(0).repeat(batch_size, 1) + mask = (idxs >= starts.unsqueeze(-1)) & (idxs < ends.unsqueeze(-1)) + return x[mask].reshape(batch_size, length) + + +def _slice_segments_v3(x: Tensor, starts: Tensor, length: int) -> Tensor: + shape = x.shape[:-1] + (length,) + ends = starts + length + idxs = torch.arange(x.shape[-1], device=x.device).unsqueeze(0).unsqueeze(0) + unsqueeze_dims = len(shape) - len( + x.shape + ) # calculate number of dimensions to unsqueeze + starts = starts.reshape(starts.shape + (1,) * unsqueeze_dims) + ends = ends.reshape(ends.shape + (1,) * unsqueeze_dims) + mask = (idxs >= starts) & (idxs < ends) + return x[mask].reshape(shape) def init_weights(m, mean=0.0, std=0.01): @@ -41,86 +60,6 @@ def convert_pad_shape(pad_shape): l = pad_shape[::-1] pad_shape = [item for sublist in l for item in sublist] return pad_shape - # more efficient - # return torch.tensor(pad_shape[::-1]).view(-1) - - -def intersperse(lst, item): - result = [item] * (len(lst) * 2 + 1) - result[1::2] = lst - return result - - -def kl_divergence(m_p, logs_p, m_q, logs_q): - """KL(P||Q)""" - kl = (logs_q - logs_p) - 0.5 - kl += ( - 0.5 * (torch.exp(2.0 * logs_p) + ((m_p - m_q) ** 2)) * torch.exp(-2.0 * logs_q) - ) - return kl - - -def rand_gumbel(shape): - """Sample from the Gumbel distribution, protect from overflows.""" - uniform_samples = torch.rand(shape) * 0.99998 + 0.00001 - return -torch.log(-torch.log(uniform_samples)) - - -def rand_gumbel_like(x): - g = rand_gumbel(x.size()).to(dtype=x.dtype, device=x.device) - return g - - -def slice_segments(x, ids_str, segment_size=4): - return x[:, :, ids_str : ids_str + segment_size] - - -def rand_slice_segments(x, x_lengths=None, segment_size=4): - b, d, t = x.size() - if x_lengths is None: - x_lengths = t - ids_str_max = x_lengths - segment_size + 1 - ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long) - ret = slice_segments(x, ids_str, segment_size) - return ret, ids_str - - -def rand_spec_segments(x, x_lengths=None, segment_size=4): - b, d, t = x.size() - if x_lengths is None: - x_lengths = t - ids_str_max = x_lengths - segment_size - ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long) - ret = slice_segments(x, ids_str, segment_size) - return ret, ids_str - - -def get_timing_signal_1d(length, channels, min_timescale=1.0, max_timescale=1.0e4): - position = torch.arange(length, dtype=torch.float) - num_timescales = channels // 2 - log_timescale_increment = math.log(float(max_timescale) / float(min_timescale)) / ( - num_timescales - 1 - ) - inv_timescales = min_timescale * torch.exp( - torch.arange(num_timescales, dtype=torch.float) * -log_timescale_increment - ) - scaled_time = position.unsqueeze(0) * inv_timescales.unsqueeze(1) - signal = torch.cat([torch.sin(scaled_time), torch.cos(scaled_time)], 0) - signal = F.pad(signal, [0, 0, 0, channels % 2]) - signal = signal.view(1, channels, length) - return signal - - -def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4): - b, channels, length = x.size() - signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale) - return x + signal.to(dtype=x.dtype, device=x.device) - - -def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis=1): - b, channels, length = x.size() - signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale) - return torch.cat([x, signal.to(dtype=x.dtype, device=x.device)], axis) def subsequent_mask(length): @@ -138,11 +77,6 @@ def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels): return acts -def shift_1d(x): - x = F.pad(x, convert_pad_shape([[0, 0], [0, 0], [1, 0]]))[:, :, :-1] - return x - - def sequence_mask(length, max_length=None): if max_length is None: max_length = length.max() @@ -150,24 +84,6 @@ def sequence_mask(length, max_length=None): return x.unsqueeze(0) < length.unsqueeze(1) -def generate_path(duration, mask): - """ - duration: [b, 1, t_x] - mask: [b, 1, t_y, t_x] - """ - duration.device - - b, _, t_y, t_x = mask.shape - cum_duration = torch.cumsum(duration, -1) - - cum_duration_flat = cum_duration.view(b * t_x) - path = sequence_mask(cum_duration_flat, t_y).to(mask.dtype) - path = path.view(b, t_x, t_y) - path = path - F.pad(path, convert_pad_shape([[0, 0], [1, 0], [0, 0]]))[:, :-1] - path = path.unsqueeze(1).transpose(2, 3) * mask - return path - - def clip_grad_value_(parameters, clip_value, norm_type=2): if isinstance(parameters, torch.Tensor): parameters = [parameters] diff --git a/src/so_vits_svc_fork/modules/synthesizers.py b/src/so_vits_svc_fork/modules/synthesizers.py index c96e021b..def09dee 100644 --- a/src/so_vits_svc_fork/modules/synthesizers.py +++ b/src/so_vits_svc_fork/modules/synthesizers.py @@ -163,7 +163,26 @@ def __init__( ) self.emb_uv = nn.Embedding(2, hidden_channels) - def forward(self, c, f0, uv, spec, g=None, c_lengths=None, spec_lengths=None): + def forward( + self, + c: torch.Tensor, + f0: torch.Tensor, + uv: torch.Tensor, + spec: torch.Tensor, + g: torch.Tensor, + c_lengths: torch.Tensor, + spec_lengths: torch.Tensor, + ) -> torch.Tensor: + """ + B: batch size + c: content, (B, ssl_dim, T) + f0: f0, (B, T) + uv: uv, (B, T) + spec: spectrogram, (B, F, T) + g: speaker id, (B,) + c_lengths: content length, (B,) + spec_lengths: spectrogram length, (B,) + """ g = self.emb_g(g).transpose(1, 2) # ssl prenet x_mask = torch.unsqueeze(commons.sequence_mask(c_lengths, c.size(2)), 1).to( @@ -179,24 +198,29 @@ def forward(self, c, f0, uv, spec, g=None, c_lengths=None, spec_lengths=None): # encoder z_ptemp, m_p, logs_p, _ = self.enc_p(x, x_mask, f0=f0_to_coarse(f0)) z, m_q, logs_q, spec_mask = self.enc_q(spec, spec_lengths, g=g) + # z: [batch, dim, time] # flow z_p = self.flow(z, spec_mask, g=g) - z_slice, pitch_slice, ids_slice = commons.rand_slice_segments_with_pitch( - z, f0, spec_lengths, self.segment_size - ) + + # randomly slice to time = self.segment_size + slice_starts = ( + torch.rand(z.size(0)) * (spec_lengths - self.segment_size) + ).long() + z_slice = commons.slice_2d_segments(z_p, slice_starts, self.segment_size) + f0_slice = commons.slice_1d_segments(f0, slice_starts, self.segment_size) # MB-iSTFT-VITS if self.mb: o, o_mb = self.dec(z_slice, g=g) # HiFi-GAN else: - o = self.dec(z_slice, g=g, f0=pitch_slice) + o = self.dec(z_slice, g=g, f0=f0_slice) o_mb = None return ( o, o_mb, - ids_slice, + slice_starts, spec_mask, (z, z_p, m_p, logs_p, m_q, logs_q), pred_lf0, @@ -204,7 +228,15 @@ def forward(self, c, f0, uv, spec, g=None, c_lengths=None, spec_lengths=None): lf0, ) - def infer(self, c, f0, uv, g=None, noice_scale=0.35, predict_f0=False): + def infer( + self, + c: torch.Tensor, + f0: torch.Tensor, + uv: torch.Tensor, + g: torch.Tensor, + noice_scale: float = 0.35, + predict_f0: bool = False, + ) -> torch.Tensor: c_lengths = (torch.ones(c.size(0)) * c.size(-1)).to(c.device) g = self.emb_g(g).transpose(1, 2) x_mask = torch.unsqueeze(commons.sequence_mask(c_lengths, c.size(2)), 1).to( diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index 7cb167a9..b9f8ace6 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -246,13 +246,13 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: norm_lf0, lf0, ) = self.net_g(c, f0, uv, spec, g=g, c_lengths=lengths, spec_lengths=lengths) - y_mel = commons.slice_segments( + y_mel = commons.slice_2d_segments( mel, ids_slice, self.hparams.train.segment_size // self.hparams.data.hop_length, ) y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1), self.hparams) - y = commons.slice_segments( + y = commons.slice_2d_segments( y, ids_slice * self.hparams.data.hop_length, self.hparams.train.segment_size, From 2fdf01d9d2f8af608d4bb4ea5e3125c39c31d410 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:32:17 +0900 Subject: [PATCH 13/20] fix: do not use slice_segments in ipu --- src/so_vits_svc_fork/modules/synthesizers.py | 19 +++++++--- src/so_vits_svc_fork/train.py | 39 ++++++++++++++------ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/so_vits_svc_fork/modules/synthesizers.py b/src/so_vits_svc_fork/modules/synthesizers.py index def09dee..fbf24eed 100644 --- a/src/so_vits_svc_fork/modules/synthesizers.py +++ b/src/so_vits_svc_fork/modules/synthesizers.py @@ -51,6 +51,7 @@ def __init__( gen_istft_n_fft: int = 16, gen_istft_hop_size: int = 4, subbands: int = 4, + ipu: bool = False, **kwargs: Any, ): super().__init__() @@ -162,6 +163,7 @@ def __init__( spk_channels=gin_channels, ) self.emb_uv = nn.Embedding(2, hidden_channels) + self.ipu = ipu def forward( self, @@ -204,11 +206,18 @@ def forward( z_p = self.flow(z, spec_mask, g=g) # randomly slice to time = self.segment_size - slice_starts = ( - torch.rand(z.size(0)) * (spec_lengths - self.segment_size) - ).long() - z_slice = commons.slice_2d_segments(z_p, slice_starts, self.segment_size) - f0_slice = commons.slice_1d_segments(f0, slice_starts, self.segment_size) + if not self.ipu: + slice_starts = ( + torch.rand(z.size(0)) * (spec_lengths - self.segment_size) + ).long() + z_slice = commons.slice_2d_segments(z, slice_starts, self.segment_size) + f0_slice = commons.slice_1d_segments(f0, slice_starts, self.segment_size) + else: + slice_starts = torch.randint( + 0, spec_lengths - self.segment_size, (1,) + ).item() + z_slice = z[..., slice_starts : slice_starts + self.segment_size] + f0_slice = f0[..., slice_starts : slice_starts + self.segment_size] # MB-iSTFT-VITS if self.mb: diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index b9f8ace6..299ad15d 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -171,6 +171,7 @@ def __init__(self, reset_optimizer: bool = False, **hparams: Any): self.net_g = SynthesizerTrn( self.hparams.data.filter_length // 2 + 1, self.hparams.train.segment_size // self.hparams.data.hop_length, + ipu=True, **self.hparams.model, ) self.net_d = MultiPeriodDiscriminator(self.hparams.model.use_spectral_norm) @@ -227,7 +228,8 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: self.net_d.train() # get optims - if isinstance(self.trainer.accelerator, IPUAccelerator): + self.is_ipu = isinstance(self.trainer.accelerator, IPUAccelerator) + if self.is_ipu: optim_g = self.optimizers() else: optim_g, optim_d = self.optimizers() @@ -246,17 +248,32 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: norm_lf0, lf0, ) = self.net_g(c, f0, uv, spec, g=g, c_lengths=lengths, spec_lengths=lengths) - y_mel = commons.slice_2d_segments( - mel, - ids_slice, - self.hparams.train.segment_size // self.hparams.data.hop_length, - ) + y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1), self.hparams) - y = commons.slice_2d_segments( - y, - ids_slice * self.hparams.data.hop_length, - self.hparams.train.segment_size, - ) + if self.is_ipu: + y_mel = mel[ + ..., + ids_slice : self.hparams.train.segment_size + // self.hparams.data.hop_length + + ids_slice, + ] + y = y[ + ..., + ids_slice + * self.hparams.data.hop_length : self.hparams.train.segment_size + + ids_slice * self.hparams.data.hop_length, + ] + else: + y_mel = commons.slice_2d_segments( + mel, + ids_slice, + self.hparams.train.segment_size // self.hparams.data.hop_length, + ) + y = commons.slice_2d_segments( + y, + ids_slice * self.hparams.data.hop_length, + self.hparams.train.segment_size, + ) # generator loss LOG.debug("Calculating generator loss") From ae7d5cfcd12336bc6fd5b65cc83aaf515dee8421 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:34:19 +0900 Subject: [PATCH 14/20] fix: fix --- src/so_vits_svc_fork/modules/synthesizers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/so_vits_svc_fork/modules/synthesizers.py b/src/so_vits_svc_fork/modules/synthesizers.py index fbf24eed..732fbb20 100644 --- a/src/so_vits_svc_fork/modules/synthesizers.py +++ b/src/so_vits_svc_fork/modules/synthesizers.py @@ -1,3 +1,4 @@ +import random import warnings from logging import getLogger from typing import Any, Literal, Sequence @@ -213,9 +214,7 @@ def forward( z_slice = commons.slice_2d_segments(z, slice_starts, self.segment_size) f0_slice = commons.slice_1d_segments(f0, slice_starts, self.segment_size) else: - slice_starts = torch.randint( - 0, spec_lengths - self.segment_size, (1,) - ).item() + slice_starts = random.randint(0, spec.size(2) - self.segment_size) z_slice = z[..., slice_starts : slice_starts + self.segment_size] f0_slice = f0[..., slice_starts : slice_starts + self.segment_size] From 26e800c27919147a2ede636efee864c5ca8995e2 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:36:51 +0900 Subject: [PATCH 15/20] fix: fuck mel --- src/so_vits_svc_fork/modules/mel_processing.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/so_vits_svc_fork/modules/mel_processing.py b/src/so_vits_svc_fork/modules/mel_processing.py index 298acd86..6b325a86 100644 --- a/src/so_vits_svc_fork/modules/mel_processing.py +++ b/src/so_vits_svc_fork/modules/mel_processing.py @@ -1,4 +1,4 @@ -"""from logging import getLogger +from logging import getLogger import torch import torch.utils.data @@ -42,7 +42,8 @@ def mel_spectrogram_torch(audio: torch.Tensor, hps: HParams) -> torch.Tensor: power=1.0, window_fn=torch.hann_window, normalized=False, - ).to(audio.device)(audio)""" + ).to(audio.device)(audio) + from logging import getLogger @@ -87,7 +88,7 @@ def spectral_de_normalize_torch(magnitudes): hann_window = {} -def spectrogram_torch(y, hps, center=False): +def spectrogram_torch_old(y, hps, center=False): if torch.min(y) < -1.0: LOG.info("min value is ", torch.min(y)) if torch.max(y) > 1.0: @@ -127,7 +128,7 @@ def spectrogram_torch(y, hps, center=False): return spec -def spec_to_mel_torch(spec, hps): +def spec_to_mel_torch_old(spec, hps): sampling_rate = hps.data.sampling_rate n_fft = hps.data.filter_length num_mels = hps.data.n_mel_channels @@ -148,7 +149,7 @@ def spec_to_mel_torch(spec, hps): return spec -def mel_spectrogram_torch(y, hps, center=False): +def mel_spectrogram_torch_old(y, hps, center=False): sampling_rate = hps.data.sampling_rate n_fft = hps.data.filter_length num_mels = hps.data.n_mel_channels From 55b498949dbcfd16ac16fce5dc4d097354a7f9dd Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:39:00 +0900 Subject: [PATCH 16/20] Revert "fix: fuck mel" This reverts commit 26e800c27919147a2ede636efee864c5ca8995e2. --- src/so_vits_svc_fork/modules/mel_processing.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/so_vits_svc_fork/modules/mel_processing.py b/src/so_vits_svc_fork/modules/mel_processing.py index 6b325a86..298acd86 100644 --- a/src/so_vits_svc_fork/modules/mel_processing.py +++ b/src/so_vits_svc_fork/modules/mel_processing.py @@ -1,4 +1,4 @@ -from logging import getLogger +"""from logging import getLogger import torch import torch.utils.data @@ -42,8 +42,7 @@ def mel_spectrogram_torch(audio: torch.Tensor, hps: HParams) -> torch.Tensor: power=1.0, window_fn=torch.hann_window, normalized=False, - ).to(audio.device)(audio) - + ).to(audio.device)(audio)""" from logging import getLogger @@ -88,7 +87,7 @@ def spectral_de_normalize_torch(magnitudes): hann_window = {} -def spectrogram_torch_old(y, hps, center=False): +def spectrogram_torch(y, hps, center=False): if torch.min(y) < -1.0: LOG.info("min value is ", torch.min(y)) if torch.max(y) > 1.0: @@ -128,7 +127,7 @@ def spectrogram_torch_old(y, hps, center=False): return spec -def spec_to_mel_torch_old(spec, hps): +def spec_to_mel_torch(spec, hps): sampling_rate = hps.data.sampling_rate n_fft = hps.data.filter_length num_mels = hps.data.n_mel_channels @@ -149,7 +148,7 @@ def spec_to_mel_torch_old(spec, hps): return spec -def mel_spectrogram_torch_old(y, hps, center=False): +def mel_spectrogram_torch(y, hps, center=False): sampling_rate = hps.data.sampling_rate n_fft = hps.data.filter_length num_mels = hps.data.n_mel_channels From 388c02242322f227fda647bddc2b9e12310e3011 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:39:58 +0900 Subject: [PATCH 17/20] fix: mel on cpu --- src/so_vits_svc_fork/train.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index 299ad15d..f7c2d6e3 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -249,7 +249,9 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: lf0, ) = self.net_g(c, f0, uv, spec, g=g, c_lengths=lengths, spec_lengths=lengths) - y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1), self.hparams) + y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1).cpu(), self.hparams).to( + self.device + ) if self.is_ipu: y_mel = mel[ ..., From 58d37332b6ef615e18c61abc7be54dba4fa5e055 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 16:42:26 +0900 Subject: [PATCH 18/20] fix: detach --- src/so_vits_svc_fork/train.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index f7c2d6e3..b5d30aee 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -249,9 +249,9 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: lf0, ) = self.net_g(c, f0, uv, spec, g=g, c_lengths=lengths, spec_lengths=lengths) - y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1).cpu(), self.hparams).to( - self.device - ) + y_hat_mel = mel_spectrogram_torch( + y_hat.squeeze(1).detach().cpu(), self.hparams + ).to(self.device) if self.is_ipu: y_mel = mel[ ..., @@ -344,7 +344,7 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: optim_g.zero_grad() self.untoggle_optimizer(optim_g) - if isinstance(self.trainer.accelerator, IPUAccelerator): + if self.is_ipu: return # Discriminator # train From 7db599991cf6bcaa7e291039f2a6c0caf361cd9f Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 17:13:37 +0900 Subject: [PATCH 19/20] Revert "Revert "fix: fuck mel"" This reverts commit 55b498949dbcfd16ac16fce5dc4d097354a7f9dd. --- src/so_vits_svc_fork/modules/mel_processing.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/so_vits_svc_fork/modules/mel_processing.py b/src/so_vits_svc_fork/modules/mel_processing.py index 298acd86..6b325a86 100644 --- a/src/so_vits_svc_fork/modules/mel_processing.py +++ b/src/so_vits_svc_fork/modules/mel_processing.py @@ -1,4 +1,4 @@ -"""from logging import getLogger +from logging import getLogger import torch import torch.utils.data @@ -42,7 +42,8 @@ def mel_spectrogram_torch(audio: torch.Tensor, hps: HParams) -> torch.Tensor: power=1.0, window_fn=torch.hann_window, normalized=False, - ).to(audio.device)(audio)""" + ).to(audio.device)(audio) + from logging import getLogger @@ -87,7 +88,7 @@ def spectral_de_normalize_torch(magnitudes): hann_window = {} -def spectrogram_torch(y, hps, center=False): +def spectrogram_torch_old(y, hps, center=False): if torch.min(y) < -1.0: LOG.info("min value is ", torch.min(y)) if torch.max(y) > 1.0: @@ -127,7 +128,7 @@ def spectrogram_torch(y, hps, center=False): return spec -def spec_to_mel_torch(spec, hps): +def spec_to_mel_torch_old(spec, hps): sampling_rate = hps.data.sampling_rate n_fft = hps.data.filter_length num_mels = hps.data.n_mel_channels @@ -148,7 +149,7 @@ def spec_to_mel_torch(spec, hps): return spec -def mel_spectrogram_torch(y, hps, center=False): +def mel_spectrogram_torch_old(y, hps, center=False): sampling_rate = hps.data.sampling_rate n_fft = hps.data.filter_length num_mels = hps.data.n_mel_channels From d343cb15a53e2d594ceba297610cf6890edd49e1 Mon Sep 17 00:00:00 2001 From: 34j <55338215+34j@users.noreply.github.com> Date: Sun, 9 Apr 2023 17:19:16 +0900 Subject: [PATCH 20/20] fix(train): patch melscale --- src/so_vits_svc_fork/train.py | 90 +++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index b5d30aee..195dbff8 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -120,6 +120,92 @@ def stft( torch.stft = stft + if isinstance(self.trainer.accelerator, IPUAccelerator): + # patch mel_scale_fbanks + LOG.warning( + "Using IPU. Patching torchaudio.functional.mel_scale_fbanks not to use max()" + ) + + import torchaudio.functional + from torchaudio.functional.functional import ( + _create_triangular_filterbank, + _hz_to_mel, + _mel_to_hz, + ) + + def melscale_fbanks( + n_freqs: int, + f_min: float, + f_max: float, + n_mels: int, + sample_rate: int, + norm: str | None = None, + mel_scale: str = "htk", + ) -> torch.Tensor: + r"""Create a frequency bin conversion matrix. + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + For the sake of the numerical compatibility with librosa, not all the coefficients + in the resulting filter bank has magnitude of 1. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/mel_fbanks.png + :alt: Visualization of generated filter bank + + Args: + n_freqs (int): Number of frequencies to highlight/apply + f_min (float): Minimum frequency (Hz) + f_max (float): Maximum frequency (Hz) + n_mels (int): Number of mel filterbanks + sample_rate (int): Sample rate of the audio waveform + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + Tensor: Triangular filter banks (fb matrix) of size (``n_freqs``, ``n_mels``) + meaning number of frequencies to highlight/apply to x the number of filterbanks. + Each column is a filterbank so that assuming there is a matrix A of + size (..., ``n_freqs``), the applied result would be + ``A * melscale_fbanks(A.size(-1), ...)``. + + """ + + if norm is not None and norm != "slaney": + raise ValueError('norm must be one of None or "slaney"') + + # freq bins + all_freqs = torch.linspace(0, sample_rate // 2, n_freqs) + + # calculate mel freq bins + m_min = _hz_to_mel(f_min, mel_scale=mel_scale) + m_max = _hz_to_mel(f_max, mel_scale=mel_scale) + + m_pts = torch.linspace(m_min, m_max, n_mels + 2) + f_pts = _mel_to_hz(m_pts, mel_scale=mel_scale) + + # create filterbank + fb = _create_triangular_filterbank(all_freqs, f_pts) + + if norm is not None and norm == "slaney": + # Slaney-style mel is scaled to be approx constant energy per channel + enorm = 2.0 / (f_pts[2 : n_mels + 2] - f_pts[:n_mels]) + fb *= enorm.unsqueeze(0) + + # if (fb.max(dim=0).values == 0.0).any(): + # warnings.warn( + # "At least one mel filterbank has all zero values. " + # f"The value for `n_mels` ({n_mels}) may be set too high. " + # f"Or, the value for `n_freqs` ({n_freqs}) may be set too low." + # ) + + return fb + + torchaudio.functional.melscale_fbanks = melscale_fbanks + def set_current_epoch(self, epoch: int): LOG.info(f"Setting current epoch to {epoch}") self.trainer.fit_loop.epoch_progress.current.completed = epoch @@ -249,9 +335,7 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: lf0, ) = self.net_g(c, f0, uv, spec, g=g, c_lengths=lengths, spec_lengths=lengths) - y_hat_mel = mel_spectrogram_torch( - y_hat.squeeze(1).detach().cpu(), self.hparams - ).to(self.device) + y_hat_mel = mel_spectrogram_torch(y_hat.squeeze(1), self.hparams) if self.is_ipu: y_mel = mel[ ...,