Add meta to device check

This commit is contained in:
Disty0
2024-08-13 23:35:56 +03:00
parent 97a5faed4c
commit a73716bf89
+1 -1
View File
@@ -764,7 +764,7 @@ def set_diffuser_offload(sd_model, op: str = 'model'):
sd_model.has_accelerate = True
def normalize_device(device):
if torch.device(device).type in {"cpu", "mps"}:
if torch.device(device).type in {"cpu", "mps", "meta"}:
return torch.device(device)
if torch.device(device).index is None:
return torch.device(str(device) + ":0")