diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-02-19 08:15:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 08:15:41 +0000 |
commit | 226bc0465373b55ca8b5fb18e9277c04974a04a8 (patch) | |
tree | 826cb97564051353c1c2d5a591651be034f404db /modules/hypernetworks/hypernetwork.py | |
parent | 3fcc0873173b3ffbeafde766332ff814969e1724 (diff) | |
parent | 2016733814433ca2b69d10764bfa0ab4c7088782 (diff) | |
download | stable-diffusion-webui-gfx803-226bc0465373b55ca8b5fb18e9277c04974a04a8.tar.gz stable-diffusion-webui-gfx803-226bc0465373b55ca8b5fb18e9277c04974a04a8.tar.bz2 stable-diffusion-webui-gfx803-226bc0465373b55ca8b5fb18e9277c04974a04a8.zip |
Merge pull request #7637 from brkirch/fix-hypernetworks-pix2pix
Fix hypernetworks and instruct pix2pix not working with `--upcast-sampling`
Diffstat (limited to 'modules/hypernetworks/hypernetwork.py')
-rw-r--r-- | modules/hypernetworks/hypernetwork.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index 825a93b2..a15bae18 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -380,8 +380,8 @@ def apply_single_hypernetwork(hypernetwork, context_k, context_v, layer=None): layer.hyper_k = hypernetwork_layers[0]
layer.hyper_v = hypernetwork_layers[1]
- context_k = hypernetwork_layers[0](context_k)
- context_v = hypernetwork_layers[1](context_v)
+ context_k = devices.cond_cast_unet(hypernetwork_layers[0](devices.cond_cast_float(context_k)))
+ context_v = devices.cond_cast_unet(hypernetwork_layers[1](devices.cond_cast_float(context_v)))
return context_k, context_v
|