Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
15c8a9e
1
Parent(s):
1359947
app.py
CHANGED
|
@@ -351,7 +351,8 @@ if settings.env.use_line_mask:
|
|
| 351 |
|
| 352 |
settings.env.model_path = hf_hub_download(repo_id="hanquansanren/DvD", filename="model1852000.pt", token=token)
|
| 353 |
# model.cpu().load_state_dict(dist_util.load_state_dict(settings.env.model_path, map_location="cpu"), strict=False)
|
| 354 |
-
|
|
|
|
| 355 |
logger.log(f"Model loaded with {settings.env.model_path}")
|
| 356 |
|
| 357 |
model.to('cuda')
|
|
|
|
| 351 |
|
| 352 |
settings.env.model_path = hf_hub_download(repo_id="hanquansanren/DvD", filename="model1852000.pt", token=token)
|
| 353 |
# model.cpu().load_state_dict(dist_util.load_state_dict(settings.env.model_path, map_location="cpu"), strict=False)
|
| 354 |
+
model_ckpt = torch.load(settings.env.model_path, map_location='cpu')
|
| 355 |
+
model.cpu().load_state_dict(model_ckpt, strict=False)
|
| 356 |
logger.log(f"Model loaded with {settings.env.model_path}")
|
| 357 |
|
| 358 |
model.to('cuda')
|