diff --git a/webui.py b/webui.py index a6d7ba6c7..cc666e6f6 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