brandonsmart commited on
Commit
633a18a
·
1 Parent(s): efabee6

Switching to huggingface model

Browse files
Files changed (1) hide show
  1. demo.py +4 -2
demo.py CHANGED
@@ -12,6 +12,7 @@ import tempfile
12
 
13
  import gradio
14
  import torch
 
15
 
16
  sys.path.append('src/mast3r_src')
17
  sys.path.append('src/mast3r_src/dust3r')
@@ -45,8 +46,6 @@ def get_reconstructed_scene(outdir, model, device, silent, image_size, ios_mode,
45
 
46
  if __name__ == '__main__':
47
 
48
- weights_path = sys.argv[1]
49
-
50
  image_size = 512
51
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
52
  server_name = '127.0.0.1'
@@ -55,6 +54,9 @@ if __name__ == '__main__':
55
  silent = False
56
  ios_mode = True
57
 
 
 
 
58
  model = main.MAST3RGaussians.load_from_checkpoint(weights_path, device)
59
  chkpt_tag = hash_md5(weights_path)
60
 
 
12
 
13
  import gradio
14
  import torch
15
+ from huggingface_hub import hf_hub_download
16
 
17
  sys.path.append('src/mast3r_src')
18
  sys.path.append('src/mast3r_src/dust3r')
 
46
 
47
  if __name__ == '__main__':
48
 
 
 
49
  image_size = 512
50
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
51
  server_name = '127.0.0.1'
 
54
  silent = False
55
  ios_mode = True
56
 
57
+ model_name = "brandonsmart/splatt3r_v1.0"
58
+ filename = "epoch=19-step=1200.ckpt"
59
+ weights_path = hf_hub_download(repo_id=model_name, filename=filename)
60
  model = main.MAST3RGaussians.load_from_checkpoint(weights_path, device)
61
  chkpt_tag = hash_md5(weights_path)
62