silentchen commited on
Commit
74efa73
1 Parent(s): 007806e

update space

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -170,12 +170,12 @@ def main():
170
  ckp = torch.load(hf_hub_download(repo_id='silentchen/Shap_Editor', subfolder='single', filename='{}.pt'.format(editing_type)), map_location='cpu')
171
  tmp_model.load_state_dict(ckp['model'])
172
  tmp_model.eval()
173
- # print("loaded latent model")
174
  tmp_model.to(device)
175
  noise_initial = ckp['initial_noise']['noise'].to(device)
176
  initial_noise[editing_type] = noise_initial
177
  noise_start_t[editing_type] = ckp['t_start']
178
- models[editing_type] = tmp_model.to(device)
179
  @torch.no_grad()
180
  def optimize_all(prompt, instruction,
181
  rand_seed):
 
170
  ckp = torch.load(hf_hub_download(repo_id='silentchen/Shap_Editor', subfolder='single', filename='{}.pt'.format(editing_type)), map_location='cpu')
171
  tmp_model.load_state_dict(ckp['model'])
172
  tmp_model.eval()
173
+ print("loaded latent model")
174
  tmp_model.to(device)
175
  noise_initial = ckp['initial_noise']['noise'].to(device)
176
  initial_noise[editing_type] = noise_initial
177
  noise_start_t[editing_type] = ckp['t_start']
178
+ models[editing_type] = tmp_model
179
  @torch.no_grad()
180
  def optimize_all(prompt, instruction,
181
  rand_seed):