Spaces:
Running on Zero
Running on Zero
Download UniCeption/scripts/check_dependencies.py from infinity1096/UFM: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/infinity1096/UFM/resolve/main/UniCeption/scripts/check_dependencies.py
- Command line
-
hf download hf://spaces/infinity1096/UFM/UniCeption/scripts/check_dependencies.py
-
curl -L -o check_dependencies.py https://huggingface.co/spaces/infinity1096/UFM/resolve/main/UniCeption/scripts/check_dependencies.py
1.18 kB
| #!/usr/bin/env python3 | |
| """ | |
| Console script to check UniCeption dependencies. | |
| """ | |
| import sys | |
| from pathlib import Path | |
| # Add the parent directory to the path to import uniception | |
| sys.path.insert(0, str(Path(__file__).parent.parent)) | |
| def check_dependencies(): | |
| """Check if optional dependencies are available.""" | |
| try: | |
| import torch | |
| print(f"PyTorch version: {torch.__version__}") | |
| if torch.cuda.is_available(): | |
| print(f"CUDA available: {torch.version.cuda}") | |
| else: | |
| print("CUDA not available") | |
| except ImportError: | |
| print("PyTorch not installed") | |
| try: | |
| import xformers | |
| print(f"XFormers version: {xformers.__version__}") | |
| except ImportError: | |
| print("XFormers not installed") | |
| try: | |
| from uniception.models.libs.croco.curope import cuRoPE2D | |
| print("CroCo RoPE extension available") | |
| except ImportError: | |
| print("CroCo RoPE extension not available") | |
| def main(): | |
| """Main entry point for the check dependencies script.""" | |
| print("Checking UniCeption Dependencies...") | |
| print("=" * 40) | |
| check_dependencies() | |
| if __name__ == "__main__": | |
| main() | |