diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-12 13:40:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 13:40:01 +0000 |
commit | 01f8de322926a518a791d8d750b402866eeca30b (patch) | |
tree | c85ca891394556b36cc049887d9fe86763923036 /webui.py | |
parent | b70b51cc7248f57dcf16add86701139432c21e5b (diff) | |
parent | 8c995be44d64b291ad6f51655fde5445ff94c1ff (diff) | |
download | stable-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.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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
|