Skip to content

Commit

Permalink
Delete all flux bundle state dict keys when extracting the transforme…
Browse files Browse the repository at this point in the history
…r state dict
  • Loading branch information
brandonrising committed Sep 4, 2024
1 parent d20335d commit 33edee1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions invokeai/backend/model_manager/util/model_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33edee1

Please sign in to comment.