diff --git a/comfy/controlnet.py b/comfy/controlnet.py index 9c10bd3e1..bef7aa3ce 100644 --- a/comfy/controlnet.py +++ b/comfy/controlnet.py @@ -471,7 +471,7 @@ def load_controlnet_hunyuandit(controlnet_data): if len(unexpected) > 0: logging.debug("unexpected controlnet keys: {}".format(unexpected)) - latent_format = comfy.latent_formats.HunyuanDit() + latent_format = comfy.latent_formats.SDXL() control = ControlNetWarperHunyuanDiT(control_model, compression_ratio=1, latent_format=latent_format, load_device=load_device, manual_cast_dtype=manual_cast_dtype) return control diff --git a/comfy/latent_formats.py b/comfy/latent_formats.py index 8ef4dc229..43f81c756 100644 --- a/comfy/latent_formats.py +++ b/comfy/latent_formats.py @@ -36,20 +36,6 @@ class SDXL(LatentFormat): [-0.3112, -0.2359, -0.2076] ] self.taesd_decoder_name = "taesdxl_decoder" - -class HunyuanDit(LatentFormat): - scale_factor = 0.13025 - - def __init__(self): - self.latent_rgb_factors = [ - # R G B - [ 0.3920, 0.4054, 0.4549], - [-0.2634, -0.0196, 0.0653], - [ 0.0568, 0.1687, -0.0755], - [-0.3112, -0.2359, -0.2076] - ] - self.taesd_decoder_name = "taesdxl_decoder" - class SDXL_Playground_2_5(LatentFormat): def __init__(self): diff --git a/comfy/ldm/hydit/controlnet.py b/comfy/ldm/hydit/controlnet.py index b149744fc..f887c163e 100644 --- a/comfy/ldm/hydit/controlnet.py +++ b/comfy/ldm/hydit/controlnet.py @@ -101,7 +101,7 @@ class HunYuanControlNet(nn.Module): self.use_style_cond = use_style_cond self.norm = norm self.dtype = dtype - self.latent_format = comfy.latent_formats.HunyuanDit + self.latent_format = comfy.latent_formats.SDXL self.mlp_t5 = nn.Sequential( @@ -264,6 +264,5 @@ class HunYuanControlNet(nn.Module): x = block(x, c, text_states, freqs_cis_img) controls.append(self.after_proj_list[layer](x)) # zero linear for output - return {'output': controls} \ No newline at end of file