Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,184 Bytes
c8b42eb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
#!/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()
|