Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
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)
|