From fbeadef1308a551aead705024df86c51242e7e62 Mon Sep 17 00:00:00 2001 From: C43H66N12O12S2 <36072735+C43H66N12O12S2@users.noreply.github.com> Date: Mon, 12 Sep 2022 16:26:42 +0300 Subject: [PATCH] webui.py channels last support --- webui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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