Skip to content

Commit 982aa59

Browse files
committed
update
1 parent daf9d0f commit 982aa59

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/diffusers/loaders/single_file_utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,16 @@ def infer_diffusers_model_type(checkpoint):
604604
if any(
605605
g in checkpoint for g in ["guidance_in.in_layer.bias", "model.diffusion_model.guidance_in.in_layer.bias"]
606606
):
607-
if checkpoint["img_in.weight"].shape[1] == 384:
607+
608+
if "model.diffusion_model.img_in.weight" in checkpoint:
609+
key = "model.diffusion_model.img_in.weight"
610+
else:
611+
key = "img_in.weight"
612+
613+
if checkpoint[key].shape[1] == 384:
608614
model_type = "flux-fill"
609615

610-
elif checkpoint["img_in.weight"].shape[1] == 128:
616+
elif checkpoint[key].shape[1] == 128:
611617
model_type = "flux-depth"
612618
else:
613619
model_type = "flux-dev"

0 commit comments

Comments
 (0)