mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-13 07:40:50 +08:00
Change default value for clip_type to exception
This commit is contained in:
parent
54e6b82d2c
commit
36326226f7
@ -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,)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user