Spaces:
Running
Running
Download src/rstor/utils.py from balthou/image-deblurring: direct link, hf CLI and curl.
- Browser
- Download file 318 Bytes
-
https://huggingface.co/spaces/balthou/image-deblurring/resolve/main/src/rstor/utils.py
- Command line
-
hf download hf://spaces/balthou/image-deblurring/src/rstor/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/balthou/image-deblurring/resolve/main/src/rstor/utils.py
318 Bytes
| import numpy as np | |
| try: | |
| import numba | |
| except ImportError: | |
| numba = None | |
| import torch | |
| THREADS_PER_BLOCK = 32 # 32 or 16 | |
| DEFAULT_NUMPY_FLOAT_TYPE = np.float32 | |
| DEFAULT_CUDA_FLOAT_TYPE = numba.float32 | |
| DEFAULT_TORCH_FLOAT_TYPE = torch.float32 | |
| DEFAULT_NUMPY_INT_TYPE = np.int32 | |
| DEFAULT_CUDA_INT_TYPE = numba.int32 | |