From 61c8eaf6567429739e6c45fc85c656eeb8f4ef74 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Wed, 30 Nov 2022 14:46:38 +0100 Subject: [PATCH] Supporting stable-diffusion by default. (#117) --- bindings/python/convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/python/convert.py b/bindings/python/convert.py index c116da0..e2965c4 100644 --- a/bindings/python/convert.py +++ b/bindings/python/convert.py @@ -96,6 +96,8 @@ def convert_file( sf_filename: str, ): loaded = torch.load(pt_filename) + if "state_dict" in loaded: + loaded = loaded["state_dict"] shared = shared_pointers(loaded) for shared_weights in shared: for name in shared_weights[1:]: -- 2.43.0