tokenid commited on
Commit
ee2e43b
1 Parent(s): d0d35cc

move FC init

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -101,9 +101,6 @@ state_dict = {k[14:]: v for k, v in state_dict.items() if k.startswith('lrm_gene
101
  model.load_state_dict(state_dict, strict=True)
102
 
103
  model = model.to(device)
104
- if IS_FLEXICUBES:
105
- model.init_flexicubes_geometry(device)
106
- model = model.eval()
107
 
108
  print('Loading Finished!')
109
 
@@ -169,6 +166,11 @@ def make_mesh(mesh_fpath, planes):
169
  @spaces.GPU
170
  def make3d(input_image, sample_steps, sample_seed):
171
 
 
 
 
 
 
172
  images, show_images = generate_mvs(input_image, sample_steps, sample_seed)
173
 
174
  images = np.asarray(images, dtype=np.float32) / 255.0
 
101
  model.load_state_dict(state_dict, strict=True)
102
 
103
  model = model.to(device)
 
 
 
104
 
105
  print('Loading Finished!')
106
 
 
166
  @spaces.GPU
167
  def make3d(input_image, sample_steps, sample_seed):
168
 
169
+ global model
170
+ if IS_FLEXICUBES:
171
+ model.init_flexicubes_geometry(device)
172
+ model = model.eval()
173
+
174
  images, show_images = generate_mvs(input_image, sample_steps, sample_seed)
175
 
176
  images = np.asarray(images, dtype=np.float32) / 255.0