Huiwenshi commited on
Commit
dde5f60
·
verified ·
1 Parent(s): e4a3f19

Upload app_hg.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app_hg.py +11 -12
app_hg.py CHANGED
@@ -39,18 +39,6 @@ from infer import seed_everything, save_gif
39
  from infer import Text2Image, Removebg, Image2Views, Views2Mesh, GifRenderer
40
  from third_party.check import check_bake_available
41
 
42
- download_models()
43
-
44
- try:
45
- from third_party.mesh_baker import MeshBaker
46
- BAKE_AVAILEBLE = True
47
- except Exception as err:
48
- print(err)
49
- print("import baking related fail, run without baking")
50
- check_bake_available()
51
- BAKE_AVAILEBLE = False
52
-
53
-
54
  warnings.simplefilter('ignore', category=UserWarning)
55
  warnings.simplefilter('ignore', category=FutureWarning)
56
  warnings.simplefilter('ignore', category=DeprecationWarning)
@@ -95,6 +83,17 @@ def download_models():
95
  print("Successfully downloaded DUSt3R model")
96
  except Exception as e:
97
  print(f"Error downloading DUSt3R: {e}")
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  ################################################################
100
  # initial setting
 
39
  from infer import Text2Image, Removebg, Image2Views, Views2Mesh, GifRenderer
40
  from third_party.check import check_bake_available
41
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  warnings.simplefilter('ignore', category=UserWarning)
43
  warnings.simplefilter('ignore', category=FutureWarning)
44
  warnings.simplefilter('ignore', category=DeprecationWarning)
 
83
  print("Successfully downloaded DUSt3R model")
84
  except Exception as e:
85
  print(f"Error downloading DUSt3R: {e}")
86
+
87
+ download_models()
88
+
89
+ try:
90
+ from third_party.mesh_baker import MeshBaker
91
+ assert check_bake_available()
92
+ BAKE_AVAILEBLE = True
93
+ except Exception as err:
94
+ print(err)
95
+ print("import baking related files fail, running without baking")
96
+ BAKE_AVAILEBLE = False
97
 
98
  ################################################################
99
  # initial setting