Download code/models/tt_dit/experimental/tests/conftest.py from sunandbean/diffrhythm-1.2-p100a: direct link, hf CLI and curl.
- Browser
- Download file 296 Bytes
-
https://huggingface.co/sunandbean/diffrhythm-1.2-p100a/resolve/main/code/models/tt_dit/experimental/tests/conftest.py
- Command line
-
hf download hf://sunandbean/diffrhythm-1.2-p100a/code/models/tt_dit/experimental/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/sunandbean/diffrhythm-1.2-p100a/resolve/main/code/models/tt_dit/experimental/tests/conftest.py
296 Bytes
| # SPDX-FileCopyrightText: © 2026 Tenstorrent USA, Inc. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| import os | |
| import torch | |
| from loguru import logger | |
| num_torch_threads = max(1, os.cpu_count()) | |
| logger.info(f"Setting torch num_threads to {num_torch_threads}") | |
| torch.set_num_threads(num_torch_threads) | |