aboutsummaryrefslogtreecommitdiffstats
path: root/webui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-09-12 13:40:01 +0000
committerGitHub <noreply@github.com>2022-09-12 13:40:01 +0000
commit01f8de322926a518a791d8d750b402866eeca30b (patch)
treec85ca891394556b36cc049887d9fe86763923036 /webui.py
parentb70b51cc7248f57dcf16add86701139432c21e5b (diff)
parent8c995be44d64b291ad6f51655fde5445ff94c1ff (diff)
downloadstable-diffusion-webui-gfx803-01f8de322926a518a791d8d750b402866eeca30b.tar.gz
stable-diffusion-webui-gfx803-01f8de322926a518a791d8d750b402866eeca30b.tar.bz2
stable-diffusion-webui-gfx803-01f8de322926a518a791d8d750b402866eeca30b.zip
Merge pull request #334 from C43H66N12O12S2/channels-last
Channels last support
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/webui.py b/webui.py
index a6d7ba6c..cc666e6f 100644
--- a/webui.py
+++ b/webui.py
@@ -49,7 +49,8 @@ def load_model_from_config(config, ckpt, verbose=False):
if len(u) > 0 and verbose:
print("unexpected keys:")
print(u)
-
+ if cmd_opts.channelslast:
+ model = model.to(memory_format=torch.channels_last)
model.eval()
return model