Revert "Fix ruff linter (#137)" (#143)

This reverts commit 6b3ad64388.
This commit is contained in:
Chenlei Hu
2024-02-09 02:24:04 +00:00
committed by GitHub
parent b49742354d
commit 388ca351f4
18 changed files with 39 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ def try_load_supported_control_model(ckpt_path):
global supported_control_models
state_dict = ldm_patched.modules.utils.load_torch_file(ckpt_path, safe_load=True)
for supported_type in supported_control_models:
state_dict_copy = dict(state_dict)
state_dict_copy = {k: v for k, v in state_dict.items()}
model = supported_type.try_build_from_state_dict(state_dict_copy, ckpt_path)
if model is not None:
return model