dufals commited on
Commit
cb3cb96
·
verified ·
1 Parent(s): 1031cb7

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -62,7 +62,9 @@ MAX_WIDTH = 2048 # our panoramas are 2K native; PaGeR accepts up to 3K
62
  # ZeroGPU requires the model to be placed on cuda at module import, not lazily
63
  # inside the GPU function -- a CUDA emulation mode is active outside
64
  # `@spaces.GPU`, and placements done here are far more efficient.
65
- device = "cuda"
 
 
66
  _cfg = OmegaConf.load(hf_hub_download(repo_id=CHECKPOINT, filename="config.yaml"))
67
  _fov = float(getattr(_cfg, "cube_fov", 90.0))
68
  pager = Pager(CHECKPOINT, cfg=_cfg, device=device)
 
62
  # ZeroGPU requires the model to be placed on cuda at module import, not lazily
63
  # inside the GPU function -- a CUDA emulation mode is active outside
64
  # `@spaces.GPU`, and placements done here are far more efficient.
65
+ # A torch.device, not the string "cuda": Pager keeps whatever it is given and
66
+ # later reads `self.device.type`, which a str does not have.
67
+ device = torch.device("cuda")
68
  _cfg = OmegaConf.load(hf_hub_download(repo_id=CHECKPOINT, filename="config.yaml"))
69
  _fov = float(getattr(_cfg, "cube_fov", 90.0))
70
  pager = Pager(CHECKPOINT, cfg=_cfg, device=device)