MCPcopy Index your code
hub / github.com/huggingface/diffusers / assert_param_count

Function assert_param_count

scripts/convert_if.py:1176–1179  ·  view source on GitHub ↗
(model_1, model_2)

Source from the content-addressed store, hash-verified

1174
1175
1176def assert_param_count(model_1, model_2):
1177 count_1 = sum(p.numel() for p in model_1.parameters())
1178 count_2 = sum(p.numel() for p in model_2.parameters())
1179 assert count_1 == count_2, f"{model_1.__class__}: {count_1} != {model_2.__class__}: {count_2}"
1180
1181
1182def superres_check_against_original(dump_path, unet_checkpoint_path):

Callers 1

verify_param_countFunction · 0.85

Calls 1

parametersMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…