From a44cedec0a2e2d43dfc01ed888c0440618529b34 Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Sat, 6 Apr 2024 21:58:54 +0900 Subject: [PATCH] fix onnx vae --- modules/onnx_impl/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/onnx_impl/__init__.py b/modules/onnx_impl/__init__.py index 61ff7c76b..a61e5b50c 100644 --- a/modules/onnx_impl/__init__.py +++ b/modules/onnx_impl/__init__.py @@ -105,7 +105,10 @@ class VAEConfig: self.config = config def __getattr__(self, key): - return self.config.get(key, VAEConfig.DEFAULTS[key]) + return self.config.get(key, VAEConfig.DEFAULTS.get(key, None)) + + def get(self, key, default): + return self.config.get(key, VAEConfig.DEFAULTS.get(key, default)) class VAE(TorchCompatibleModule):