mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Merge pull request #5078 from Anai-Guo/fix/todo-dead-mps-branch
fix(todo): drop the unreachable duplicate cuda branch in init_generator
This commit is contained in:
@@ -29,8 +29,6 @@ def init_generator(device: torch.device, fallback: torch.Generator = None):
|
||||
return torch.Generator(device="cpu").set_state(torch.get_rng_state())
|
||||
elif device.type == "cuda":
|
||||
return torch.Generator(device=device).set_state(torch.cuda.get_rng_state())
|
||||
elif device.type == "cuda":
|
||||
return torch.Generator(device=device).set_state(torch.mps.get_rng_state())
|
||||
else:
|
||||
if fallback is None:
|
||||
return init_generator(torch.device("cpu"))
|
||||
|
||||
Reference in New Issue
Block a user