aboutsummaryrefslogtreecommitdiffstats
path: root/modules/esrgan_model.py
diff options
context:
space:
mode:
authorbrkirch <brkirch@users.noreply.github.com>2022-10-08 05:47:02 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-10-08 06:39:17 +0000
commitf2055cb1d4ce45d7aaacc49d8ab5bec7791a8f47 (patch)
tree330009c4b6063c24668e2e013e44a24ccbb1c5ee /modules/esrgan_model.py
parenta958f9b3fdea95c01d360aba1b6fe0ce3ea6b349 (diff)
downloadstable-diffusion-webui-gfx803-f2055cb1d4ce45d7aaacc49d8ab5bec7791a8f47.tar.gz
stable-diffusion-webui-gfx803-f2055cb1d4ce45d7aaacc49d8ab5bec7791a8f47.tar.bz2
stable-diffusion-webui-gfx803-f2055cb1d4ce45d7aaacc49d8ab5bec7791a8f47.zip
Add hypernetwork support to split cross attention v1
* Add hypernetwork support to split_cross_attention_forward_v1 * Fix device check in esrgan_model.py to use devices.device_esrgan instead of shared.device
Diffstat (limited to 'modules/esrgan_model.py')
-rw-r--r--modules/esrgan_model.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py
index d17e730f..28548124 100644
--- a/modules/esrgan_model.py
+++ b/modules/esrgan_model.py
@@ -111,7 +111,7 @@ class UpscalerESRGAN(Upscaler):
print("Unable to load %s from %s" % (self.model_path, filename))
return None
- pretrained_net = torch.load(filename, map_location='cpu' if shared.device.type == 'mps' else None)
+ pretrained_net = torch.load(filename, map_location='cpu' if devices.device_esrgan.type == 'mps' else None)
crt_model = arch.RRDBNet(3, 3, 64, 23, gc=32)
pretrained_net = fix_model_layers(crt_model, pretrained_net)