From 33edee1ba6cd4e6ae166fc7dfa5ae9f7c2ee84e8 Mon Sep 17 00:00:00 2001 From: Brandon Rising Date: Tue, 3 Sep 2024 22:20:38 -0400 Subject: [PATCH] Delete all flux bundle state dict keys when extracting the transformer state dict --- invokeai/backend/model_manager/util/model_util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invokeai/backend/model_manager/util/model_util.py b/invokeai/backend/model_manager/util/model_util.py index f0dbc730ed8..fd904ac3358 100644 --- a/invokeai/backend/model_manager/util/model_util.py +++ b/invokeai/backend/model_manager/util/model_util.py @@ -143,6 +143,7 @@ def convert_bundle_to_flux_transformer_checkpoint( for k, v in transformer_state_dict.items(): if not k.startswith("model.diffusion_model"): + keys_to_remove.append(k) # This can be removed in the future if we only want to delete transformer keys continue if k.endswith("scale"): # Scale math must be done at bfloat16 due to our current flux model