Spaces:
Paused
Paused
Download preprocess/tools/note_transcription/utils/__init__.py from aiqtech/SoulX-Singer: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/spaces/aiqtech/SoulX-Singer/resolve/main/preprocess/tools/note_transcription/utils/__init__.py
- Command line
-
hf download hf://spaces/aiqtech/SoulX-Singer/preprocess/tools/note_transcription/utils/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/aiqtech/SoulX-Singer/resolve/main/preprocess/tools/note_transcription/utils/__init__.py
383 Bytes
| def seed_everything(seed: int, seed_cudnn=False): | |
| import random, os | |
| import numpy as np | |
| import torch | |
| random.seed(seed) | |
| os.environ['PYTHONHASHSEED'] = str(seed) | |
| np.random.seed(seed) | |
| torch.manual_seed(seed) | |
| torch.cuda.manual_seed(seed) | |
| if seed_cudnn: | |
| torch.backends.cudnn.deterministic = True | |
| torch.backends.cudnn.benchmark = True | |