diff options
author | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-03 07:21:50 +0000 |
---|---|---|
committer | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-03 07:21:50 +0000 |
commit | f08ae961157d33051b5cd09ba5c77b779096ef69 (patch) | |
tree | 038e0f511d51816c0a971d6093da0420b5677ae0 /modules/sd_samplers_common.py | |
parent | dff60e2e74964a8b02b75ecd8cf8007ef67a9712 (diff) | |
parent | 335428c2c8139dfe07ba096a6defa75036660244 (diff) | |
download | stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.gz stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.bz2 stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.zip |
resolve merge conflicts and swap to dev branch for now
Diffstat (limited to 'modules/sd_samplers_common.py')
-rw-r--r-- | modules/sd_samplers_common.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py index a1aac7cf..bc074238 100644 --- a/modules/sd_samplers_common.py +++ b/modules/sd_samplers_common.py @@ -60,3 +60,13 @@ def store_latent(decoded): class InterruptedException(BaseException):
pass
+
+
+if opts.randn_source == "CPU":
+ import torchsde._brownian.brownian_interval
+
+ def torchsde_randn(size, dtype, device, seed):
+ generator = torch.Generator(devices.cpu).manual_seed(int(seed))
+ return torch.randn(size, dtype=dtype, device=devices.cpu, generator=generator).to(device)
+
+ torchsde._brownian.brownian_interval._randn = torchsde_randn
|