update cache handling
Browse files
app.py
CHANGED
|
@@ -21,7 +21,8 @@ from mast3r.utils.misc import hash_md5
|
|
| 21 |
import matplotlib.pyplot as pl
|
| 22 |
pl.ion()
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
batch_size = 1
|
| 26 |
|
| 27 |
weights_path = "naver/" + 'MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric'
|
|
@@ -33,4 +34,5 @@ chkpt_tag = hash_md5(weights_path)
|
|
| 33 |
with tempfile.TemporaryDirectory(suffix='_mast3r_gradio_demo') as tmpdirname:
|
| 34 |
cache_path = os.path.join(tmpdirname, chkpt_tag)
|
| 35 |
os.makedirs(cache_path, exist_ok=True)
|
| 36 |
-
main_demo(tmpdirname, model, device, 512, server_name=None, server_port=None,
|
|
|
|
|
|
| 21 |
import matplotlib.pyplot as pl
|
| 22 |
pl.ion()
|
| 23 |
|
| 24 |
+
# for gpu >= Ampere and pytorch >= 1.12
|
| 25 |
+
torch.backends.cuda.matmul.allow_tf32 = True
|
| 26 |
batch_size = 1
|
| 27 |
|
| 28 |
weights_path = "naver/" + 'MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric'
|
|
|
|
| 34 |
with tempfile.TemporaryDirectory(suffix='_mast3r_gradio_demo') as tmpdirname:
|
| 35 |
cache_path = os.path.join(tmpdirname, chkpt_tag)
|
| 36 |
os.makedirs(cache_path, exist_ok=True)
|
| 37 |
+
main_demo(tmpdirname, model, device, 512, server_name=None, server_port=None,
|
| 38 |
+
silent=True, share=None, gradio_delete_cache=7200)
|
mast3r
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
Subproject commit
|
|
|
|
| 1 |
+
Subproject commit 050f8f9695738d2caba598f26f19847c7ec38a8e
|