Spaces:
Runtime error
Runtime error
Commit
Β·
1c2ea32
1
Parent(s):
dd6adc1
update
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ model_path='./customnet_v1.pt'
|
|
| 81 |
#if not os.path.exists(model_path):
|
| 82 |
# os.system(f'wget https://huggingface.co/TencentARC/CustomNet/resolve/main/customnet_v1.pt?download=true -P .')
|
| 83 |
ckpt = torch.load(model_path, map_location="cpu")
|
| 84 |
-
model.load_state_dict(ckpt)
|
| 85 |
del ckpt
|
| 86 |
|
| 87 |
model = model.to(device)
|
|
|
|
| 81 |
#if not os.path.exists(model_path):
|
| 82 |
# os.system(f'wget https://huggingface.co/TencentARC/CustomNet/resolve/main/customnet_v1.pt?download=true -P .')
|
| 83 |
ckpt = torch.load(model_path, map_location="cpu")
|
| 84 |
+
model.load_state_dict(ckpt, strict=False)
|
| 85 |
del ckpt
|
| 86 |
|
| 87 |
model = model.to(device)
|