diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-04-29 08:29:37 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-04-29 08:29:37 +0000 |
commit | 5fe0dd79beaa5ef737ff85254ee9870f60ae9464 (patch) | |
tree | fb712561ac65b99285ad6a48b27a7920d18dde01 /modules/devices.py | |
parent | cb9571e37fc1c0ee22c92ee726147f64ee80f07a (diff) | |
download | stable-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.py | 4 |
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) |