Skip to content

Commit 33edee1

Browse files
committed
Delete all flux bundle state dict keys when extracting the transformer state dict
1 parent d20335d commit 33edee1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

invokeai/backend/model_manager/util/model_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def convert_bundle_to_flux_transformer_checkpoint(
143143

144144
for k, v in transformer_state_dict.items():
145145
if not k.startswith("model.diffusion_model"):
146+
keys_to_remove.append(k) # This can be removed in the future if we only want to delete transformer keys
146147
continue
147148
if k.endswith("scale"):
148149
# Scale math must be done at bfloat16 due to our current flux model

0 commit comments

Comments
 (0)