fix model type handling in analyze_state_dict_state function for SD3

This commit is contained in:
Kohya S
2025-08-13 21:38:51 +09:00
parent dcce057609
commit 351bed965c

View File

@@ -50,14 +50,14 @@ def analyze_state_dict_state(state_dict: Dict, prefix: str = ""):
context_embedder_in_features = context_shape[1]
context_embedder_out_features = context_shape[0]
# only supports 3-5-large, medium or 3-medium
# only supports 3-5-large, medium or 3-medium. This is added after `stable-diffusion-3-`.
if qk_norm is not None:
if len(x_block_self_attn_layers) == 0:
model_type = "3-5-large"
model_type = "5-large"
else:
model_type = "3-5-medium"
model_type = "5-medium"
else:
model_type = "3-medium"
model_type = "medium"
params = sd3_models.SD3Params(
patch_size=patch_size,