rename CPU RNG to RNG source in settings, add infotext and parameters copypaste support to RNG source

This commit is contained in:
AUTOMATIC
2023-04-29 11:29:37 +03:00
parent cb9571e37f
commit 5fe0dd79be
6 changed files with 13 additions and 6 deletions

View File

@@ -95,7 +95,7 @@ def randn(seed, shape):
from modules.shared import opts
torch.manual_seed(seed)
if opts.use_cpu_randn or device.type == 'mps':
if opts.randn_source == "CPU" or device.type == 'mps':
return torch.randn(shape, device=cpu).to(device)
return torch.randn(shape, device=device)
@@ -103,7 +103,7 @@ def randn(seed, shape):
def randn_without_seed(shape):
from modules.shared import opts
if opts.use_cpu_randn or device.type == 'mps':
if opts.randn_source == "CPU" or device.type == 'mps':
return torch.randn(shape, device=cpu).to(device)
return torch.randn(shape, device=device)