mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-12 11:46:37 +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:
|
||||
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
|
||||
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user