From 845da1b073d82b3abd4a7840c09a05b560a1adda Mon Sep 17 00:00:00 2001 From: Talmaj Marinc Date: Fri, 10 Apr 2026 20:24:57 +0200 Subject: [PATCH] Fixup ruff. --- comfy/model_detection.py | 1 - comfy/sd.py | 2 +- comfy/supported_models.py | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/comfy/model_detection.py b/comfy/model_detection.py index a1df050ef..885a3035f 100644 --- a/comfy/model_detection.py +++ b/comfy/model_detection.py @@ -506,7 +506,6 @@ def detect_unet_config(state_dict, key_prefix, metadata=None): # Detect in_channels from patch_embed patch_proj_key = '{}patch_embed.proj.weight'.format(key_prefix) - patch_proj_linear_key = '{}patch_embed.proj.weight'.format(key_prefix) if patch_proj_key in state_dict_keys: w = state_dict[patch_proj_key] if w.ndim == 4: diff --git a/comfy/sd.py b/comfy/sd.py index 6cbd1eae9..144425f9b 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -17,6 +17,7 @@ import comfy.ldm.wan.vae import comfy.ldm.wan.vae2_2 import comfy.ldm.hunyuan3d.vae import comfy.ldm.ace.vae.music_dcae_pipeline +import comfy.ldm.cogvideo.vae import comfy.ldm.hunyuan_video.vae import comfy.ldm.mmaudio.vae.autoencoder import comfy.pixel_space_convert @@ -651,7 +652,6 @@ class VAE: self.memory_used_encode = lambda shape, dtype: (1400 * 9 * shape[-2] * shape[-1]) * model_management.dtype_size(dtype) self.memory_used_decode = lambda shape, dtype: (3600 * 4 * shape[-2] * shape[-1] * 16 * 16) * model_management.dtype_size(dtype) elif "decoder.conv_in.conv.weight" in sd and "decoder.mid_block.resnets.0.norm1.norm_layer.weight" in sd: # CogVideoX VAE - import comfy.ldm.cogvideo.vae self.upscale_ratio = (lambda a: max(0, a * 4 - 3), 8, 8) self.upscale_index_formula = (4, 8, 8) self.downscale_ratio = (lambda a: max(0, math.floor((a + 3) / 4)), 8, 8) diff --git a/comfy/supported_models.py b/comfy/supported_models.py index b489102d4..858931210 100644 --- a/comfy/supported_models.py +++ b/comfy/supported_models.py @@ -1779,9 +1779,6 @@ class CogVideoX_T2V(supported_models_base.BASE): return out def clip_target(self, state_dict={}): - pref = self.text_encoder_key_prefix[0] - t5_detect = comfy.text_encoders.sd3_clip.t5_xxl_detect(state_dict, "{}t5xxl.transformer.".format(pref)) - class CogVideoXT5Tokenizer(comfy.text_encoders.sd3_clip.T5XXLTokenizer): def __init__(self, embedding_directory=None, tokenizer_data={}): super().__init__(embedding_directory=embedding_directory, tokenizer_data=tokenizer_data, min_length=226)