Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix map_location issue
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ from huggingface_hub import hf_hub_download
|
|
| 11 |
|
| 12 |
def check_simple_file(st_weights_path, torch_weights_path):
|
| 13 |
st_weights = safetensors.torch.load_file(st_weights_path)
|
| 14 |
-
torch_weights = torch.load(torch_weights_path)
|
| 15 |
|
| 16 |
# check if keys are the same
|
| 17 |
if st_weights.keys() != torch_weights.keys():
|
|
|
|
| 11 |
|
| 12 |
def check_simple_file(st_weights_path, torch_weights_path):
|
| 13 |
st_weights = safetensors.torch.load_file(st_weights_path)
|
| 14 |
+
torch_weights = torch.load(torch_weights_path, map_location=torch.device('cpu'))
|
| 15 |
|
| 16 |
# check if keys are the same
|
| 17 |
if st_weights.keys() != torch_weights.keys():
|