Skip to content

Commit c4a14df

Browse files
authored
Dynamically detect chroma radiance patch size (Comfy-Org#11991)
1 parent 965d0ed commit c4a14df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/model_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def detect_unet_config(state_dict, key_prefix, metadata=None):
253253
dit_config["image_model"] = "chroma_radiance"
254254
dit_config["in_channels"] = 3
255255
dit_config["out_channels"] = 3
256-
dit_config["patch_size"] = 16
256+
dit_config["patch_size"] = state_dict.get('{}img_in_patch.weight'.format(key_prefix)).size(dim=-1)
257257
dit_config["nerf_hidden_size"] = 64
258258
dit_config["nerf_mlp_ratio"] = 4
259259
dit_config["nerf_depth"] = 4

0 commit comments

Comments
 (0)