mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-16 08:33:29 +00:00
Show the user an error when the controlnet file is invalid.
This commit is contained in:
parent
70d7242e57
commit
2f7d8159c3
2
nodes.py
2
nodes.py
@ -786,6 +786,8 @@ class ControlNetLoader:
|
|||||||
def load_controlnet(self, control_net_name):
|
def load_controlnet(self, control_net_name):
|
||||||
controlnet_path = folder_paths.get_full_path_or_raise("controlnet", control_net_name)
|
controlnet_path = folder_paths.get_full_path_or_raise("controlnet", control_net_name)
|
||||||
controlnet = comfy.controlnet.load_controlnet(controlnet_path)
|
controlnet = comfy.controlnet.load_controlnet(controlnet_path)
|
||||||
|
if controlnet is None:
|
||||||
|
raise RuntimeError("ERROR: controlnet file is invalid and does not contain a valid controlnet model.")
|
||||||
return (controlnet,)
|
return (controlnet,)
|
||||||
|
|
||||||
class DiffControlNetLoader:
|
class DiffControlNetLoader:
|
||||||
|
Loading…
Reference in New Issue
Block a user