diff --git a/nodes.py b/nodes.py index 43c3d82..3451fc7 100644 --- a/nodes.py +++ b/nodes.py @@ -189,10 +189,10 @@ class CLIPLoaderGGUF: clip.patcher = GGUFModelPatcher.clone(clip.patcher) # for some reason this is just missing in some SAI checkpoints - if hasattr(clip.cond_stage_model, "clip_l"): + if getattr(clip.cond_stage_model, "clip_l", None) is not None: if clip.cond_stage_model.clip_l.transformer.text_projection.weight.tensor_shape == None: clip.cond_stage_model.clip_l.transformer.text_projection = comfy.ops.manual_cast.Linear(768, 768) - if hasattr(clip.cond_stage_model, "clip_g"): + if getattr(clip.cond_stage_model, "clip_g", None) is not None: if clip.cond_stage_model.clip_g.transformer.text_projection.weight.tensor_shape == None: clip.cond_stage_model.clip_g.transformer.text_projection = comfy.ops.manual_cast.Linear(1280, 1280)