aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC43H66N12O12S2 <36072735+C43H66N12O12S2@users.noreply.github.com>2022-09-12 16:26:42 +0300
committerGitHub <noreply@github.com>2022-09-12 16:26:42 +0300
commitfbeadef1308a551aead705024df86c51242e7e62 (patch)
treea5cd3b2e754419df92583cb35325701ee2394a4a
parent11e648f6c75de2fb22460d34a618dbb3aa6df0bc (diff)
webui.py channels last support
-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