From 3f9800b33a08a8827a331de0867f63e5cc042566 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Thu, 12 Feb 2026 22:02:33 -0500 Subject: [PATCH] Add process_unet_state_dict method to handle state dict --- comfy/supported_models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/comfy/supported_models.py b/comfy/supported_models.py index 3be8f48dd..c28be1716 100644 --- a/comfy/supported_models.py +++ b/comfy/supported_models.py @@ -1275,6 +1275,15 @@ class Hunyuan3Dv2(supported_models_base.BASE): latent_format = latent_formats.Hunyuan3Dv2 + def process_unet_state_dict(self, state_dict): + out_sd = {} + for k in list(state_dict.keys()): + key_out = k + if key_out.endswith(".scale"): + key_out = "{}.weight".format(key_out[:-len(".scale")]) + out_sd[key_out] = state_dict[k] + return out_sd + def process_unet_state_dict_for_saving(self, state_dict): replace_prefix = {"": "model."} return utils.state_dict_prefix_replace(state_dict, replace_prefix)