mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-13 00:47:03 +08:00
fix typo in hunyuandit controlnet
This commit is contained in:
parent
e5577ac9fd
commit
839a0978d1
@ -471,7 +471,7 @@ def load_controlnet_hunyuandit(controlnet_data):
|
|||||||
if len(unexpected) > 0:
|
if len(unexpected) > 0:
|
||||||
logging.debug("unexpected controlnet keys: {}".format(unexpected))
|
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)
|
control = ControlNetWarperHunyuanDiT(control_model, compression_ratio=1, latent_format=latent_format, load_device=load_device, manual_cast_dtype=manual_cast_dtype)
|
||||||
return control
|
return control
|
||||||
|
|
||||||
|
|||||||
@ -37,20 +37,6 @@ class SDXL(LatentFormat):
|
|||||||
]
|
]
|
||||||
self.taesd_decoder_name = "taesdxl_decoder"
|
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):
|
class SDXL_Playground_2_5(LatentFormat):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.scale_factor = 0.5
|
self.scale_factor = 0.5
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class HunYuanControlNet(nn.Module):
|
|||||||
self.use_style_cond = use_style_cond
|
self.use_style_cond = use_style_cond
|
||||||
self.norm = norm
|
self.norm = norm
|
||||||
self.dtype = dtype
|
self.dtype = dtype
|
||||||
self.latent_format = comfy.latent_formats.HunyuanDit
|
self.latent_format = comfy.latent_formats.SDXL
|
||||||
|
|
||||||
|
|
||||||
self.mlp_t5 = nn.Sequential(
|
self.mlp_t5 = nn.Sequential(
|
||||||
@ -264,6 +264,5 @@ class HunYuanControlNet(nn.Module):
|
|||||||
x = block(x, c, text_states, freqs_cis_img)
|
x = block(x, c, text_states, freqs_cis_img)
|
||||||
controls.append(self.after_proj_list[layer](x)) # zero linear for output
|
controls.append(self.after_proj_list[layer](x)) # zero linear for output
|
||||||
|
|
||||||
|
|
||||||
return {'output': controls}
|
return {'output': controls}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user