mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-13 11:53:31 +00:00
Show a proper error to the user when a vision model file is invalid.
This commit is contained in:
parent
3bfe4e5276
commit
49b732afd5
2
nodes.py
2
nodes.py
@ -1006,6 +1006,8 @@ class CLIPVisionLoader:
|
||||
def load_clip(self, clip_name):
|
||||
clip_path = folder_paths.get_full_path_or_raise("clip_vision", clip_name)
|
||||
clip_vision = comfy.clip_vision.load(clip_path)
|
||||
if clip_vision is None:
|
||||
raise RuntimeError("ERROR: clip vision file is invalid and does not contain a valid vision model.")
|
||||
return (clip_vision,)
|
||||
|
||||
class CLIPVisionEncode:
|
||||
|
Loading…
Reference in New Issue
Block a user