anzorq commited on
Commit
d535e23
1 Parent(s): 4d4b3ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -53,7 +53,7 @@ def load_img2mesh_model(model_name):
53
  return i2m_model, base_diffusion_i2m
54
 
55
  img2mesh_model_name = 'base40M' #'base300M' #'base1B'
56
- img2mesh_model, base_diffusion_i2m = load_img2mesh_model(img2mesh_model_name)
57
 
58
 
59
  set_state('Creating upsample model...')
@@ -78,14 +78,14 @@ def get_sampler(model_name, txt2obj, guidance_scale):
78
 
79
  global img2mesh_model_name
80
  global base_diffusion_i2m
81
- global img2mesh_model
82
  if model_name != img2mesh_model_name:
83
  img2mesh_model_name = model_name
84
- img2mesh_model, base_diffusion_i2m = load_img2mesh_model(model_name)
85
 
86
  return PointCloudSampler(
87
  device=device,
88
- models=[t2m_model, upsampler_model],
89
  diffusions=[base_diffusion_t2m if txt2obj else base_diffusion_i2m, upsampler_diffusion],
90
  num_points=[1024, 4096 - 1024],
91
  aux_channels=['R', 'G', 'B'],
 
53
  return i2m_model, base_diffusion_i2m
54
 
55
  img2mesh_model_name = 'base40M' #'base300M' #'base1B'
56
+ i2m_model, base_diffusion_i2m = load_img2mesh_model(img2mesh_model_name)
57
 
58
 
59
  set_state('Creating upsample model...')
 
78
 
79
  global img2mesh_model_name
80
  global base_diffusion_i2m
81
+ global i2m_model
82
  if model_name != img2mesh_model_name:
83
  img2mesh_model_name = model_name
84
+ i2m_model, base_diffusion_i2m = load_img2mesh_model(model_name)
85
 
86
  return PointCloudSampler(
87
  device=device,
88
+ models=[t2m_model if txt2obj else i2m_model, upsampler_model],
89
  diffusions=[base_diffusion_t2m if txt2obj else base_diffusion_i2m, upsampler_diffusion],
90
  num_points=[1024, 4096 - 1024],
91
  aux_channels=['R', 'G', 'B'],