aboutsummaryrefslogtreecommitdiffstats
path: root/modules/devices.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-04-29 08:29:37 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-04-29 08:29:37 +0000
commit5fe0dd79beaa5ef737ff85254ee9870f60ae9464 (patch)
treefb712561ac65b99285ad6a48b27a7920d18dde01 /modules/devices.py
parentcb9571e37fc1c0ee22c92ee726147f64ee80f07a (diff)
downloadstable-diffusion-webui-gfx803-5fe0dd79beaa5ef737ff85254ee9870f60ae9464.tar.gz
stable-diffusion-webui-gfx803-5fe0dd79beaa5ef737ff85254ee9870f60ae9464.tar.bz2
stable-diffusion-webui-gfx803-5fe0dd79beaa5ef737ff85254ee9870f60ae9464.zip
rename CPU RNG to RNG source in settings, add infotext and parameters copypaste support to RNG source
Diffstat (limited to 'modules/devices.py')
-rw-r--r--modules/devices.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/devices.py b/modules/devices.py
index 3bc86a6a..c705a3cb 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -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)