Commit edebe4d4 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #16088 from cuba3/dev_cuba3

Maintaining Project Compatibility for Python 3.9 Users Without Upgrade Requirements.
parents b9c3f4ec 9e60cdbc
......@@ -20,7 +20,6 @@ def get_param(model) -> torch.nn.Parameter:
def float64(t: torch.Tensor):
"""return torch.float64 if device is not mps or xpu, else return torch.float32"""
match t.device.type:
case 'mps', 'xpu':
return torch.float32
if t.device.type in ['mps', 'xpu']:
return torch.float32
return torch.float64
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment