From 36326226f7a961f105b5fb513ef3a3f3ceaafd5e Mon Sep 17 00:00:00 2001 From: Max Tretikov Date: Fri, 14 Jun 2024 14:14:00 -0600 Subject: [PATCH] Change default value for clip_type to exception --- comfy/nodes/base_nodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/comfy/nodes/base_nodes.py b/comfy/nodes/base_nodes.py index 229658e68..ef2f81e76 100644 --- a/comfy/nodes/base_nodes.py +++ b/comfy/nodes/base_nodes.py @@ -850,9 +850,12 @@ class DualCLIPLoader: def load_clip(self, clip_name1, clip_name2, type): clip_path1 = folder_paths.get_full_path("clip", clip_name1) clip_path2 = folder_paths.get_full_path("clip", clip_name2) - clip_type = sd.CLIPType.STABLE_DIFFUSION - if type == "sd3": + if type == "sdxl": + clip_type = sd.CLIPType.STABLE_DIFFUSION + elif type == "sd3": clip_type = sd.CLIPType.SD3 + else: + raise ValueError(f"Unknown clip type argument passed: {type} for model {clip_name1} and {clip_name2}") clip = sd.load_clip(ckpt_paths=[clip_path1, clip_path2], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type) return (clip,)