mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
add manual seed
This commit is contained in:
Submodule extensions-builtin/sd-webui-controlnet updated: 8d84f1f74f...1c994ff4f7
@@ -161,6 +161,8 @@ def cond_cast_float(tensor):
|
||||
|
||||
def randn(seed, shape):
|
||||
torch.manual_seed(seed)
|
||||
if shared.cmd_opts.use_ipex:
|
||||
torch.xpu.manual_seed_all(seed)
|
||||
if device.type == 'mps':
|
||||
return torch.randn(shape, device=cpu).to(device)
|
||||
return torch.randn(shape, device=device)
|
||||
|
||||
Reference in New Issue
Block a user