Skip to content

Commit c6a38ff

Browse files
author
Talmaj Marinc
committed
Fixup ruff.
1 parent d4f7131 commit c6a38ff

3 files changed

Lines changed: 1 addition & 5 deletions

File tree

comfy/model_detection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ def detect_unet_config(state_dict, key_prefix, metadata=None):
506506

507507
# Detect in_channels from patch_embed
508508
patch_proj_key = '{}patch_embed.proj.weight'.format(key_prefix)
509-
patch_proj_linear_key = '{}patch_embed.proj.weight'.format(key_prefix)
510509
if patch_proj_key in state_dict_keys:
511510
w = state_dict[patch_proj_key]
512511
if w.ndim == 4:

comfy/sd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import comfy.ldm.wan.vae2_2
1818
import comfy.ldm.hunyuan3d.vae
1919
import comfy.ldm.ace.vae.music_dcae_pipeline
20+
import comfy.ldm.cogvideo.vae
2021
import comfy.ldm.hunyuan_video.vae
2122
import comfy.ldm.mmaudio.vae.autoencoder
2223
import comfy.pixel_space_convert
@@ -651,7 +652,6 @@ def __init__(self, sd=None, device=None, config=None, dtype=None, metadata=None)
651652
self.memory_used_encode = lambda shape, dtype: (1400 * 9 * shape[-2] * shape[-1]) * model_management.dtype_size(dtype)
652653
self.memory_used_decode = lambda shape, dtype: (3600 * 4 * shape[-2] * shape[-1] * 16 * 16) * model_management.dtype_size(dtype)
653654
elif "decoder.conv_in.conv.weight" in sd and "decoder.mid_block.resnets.0.norm1.norm_layer.weight" in sd: # CogVideoX VAE
654-
import comfy.ldm.cogvideo.vae
655655
self.upscale_ratio = (lambda a: max(0, a * 4 - 3), 8, 8)
656656
self.upscale_index_formula = (4, 8, 8)
657657
self.downscale_ratio = (lambda a: max(0, math.floor((a + 3) / 4)), 8, 8)

comfy/supported_models.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,9 +1779,6 @@ def get_model(self, state_dict, prefix="", device=None):
17791779
return out
17801780

17811781
def clip_target(self, state_dict={}):
1782-
pref = self.text_encoder_key_prefix[0]
1783-
t5_detect = comfy.text_encoders.sd3_clip.t5_xxl_detect(state_dict, "{}t5xxl.transformer.".format(pref))
1784-
17851782
class CogVideoXT5Tokenizer(comfy.text_encoders.sd3_clip.T5XXLTokenizer):
17861783
def __init__(self, embedding_directory=None, tokenizer_data={}):
17871784
super().__init__(embedding_directory=embedding_directory, tokenizer_data=tokenizer_data, min_length=226)

0 commit comments

Comments
 (0)