Download utils/utils.py from ameerazam08/DiffuseHigh-SDXL: direct link, hf CLI and curl.
- Browser
- Download file 282 Bytes
-
https://huggingface.co/spaces/ameerazam08/DiffuseHigh-SDXL/resolve/main/utils/utils.py
- Command line
-
hf download hf://spaces/ameerazam08/DiffuseHigh-SDXL/utils/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/ameerazam08/DiffuseHigh-SDXL/resolve/main/utils/utils.py
282 Bytes
| import os | |
| import torch | |
| import numpy as np | |
| def set_seeds(seed): | |
| os.environ["PYTHONHASHSEED"] = str(seed) | |
| np.random.seed(seed) | |
| torch.manual_seed(seed) | |
| torch.cuda.manual_seed(seed) | |
| torch.backends.cudnn.deterministic = True | |
| torch.backends.cudnn.benchmark = True |