config.py 304 B

1234567891011121314151617
  1. import torch
  2. import util
  3. device = (
  4. 'cuda:0' if torch.cuda.is_available()
  5. else (
  6. 'mps' if util.has_mps()
  7. else 'cpu'
  8. )
  9. )
  10. is_half = util.is_half(device)
  11. x_pad = 3 if is_half else 1
  12. x_query = 10 if is_half else 6
  13. x_center = 60 if is_half else 38
  14. x_max = 65 if is_half else 41