mridulk commited on
Commit
8111260
1 Parent(s): 7067143

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,8 +19,8 @@ from ldm.models.diffusion.plms import PLMSSampler
19
 
20
  def load_model_from_config(config, ckpt, verbose=False):
21
  print(f"Loading model from {ckpt}")
22
- # pl_sd = torch.load(ckpt, map_location="cpu")
23
- pl_sd = torch.load(ckpt)#, map_location="cpu")
24
  sd = pl_sd["state_dict"]
25
  model = instantiate_from_config(config.model)
26
  m, u = model.load_state_dict(sd, strict=False)
 
19
 
20
  def load_model_from_config(config, ckpt, verbose=False):
21
  print(f"Loading model from {ckpt}")
22
+ pl_sd = torch.load(ckpt, map_location="cpu")
23
+ # pl_sd = torch.load(ckpt)#, map_location="cpu")
24
  sd = pl_sd["state_dict"]
25
  model = instantiate_from_config(config.model)
26
  m, u = model.load_state_dict(sd, strict=False)