{"record":{"id":"928d38898da7207e","repo":"Comfy-Org/ComfyUI","slug":"error-controlnet-file-is-invalid-and-does-not-con","errorCode":null,"errorMessage":"ERROR: controlnet file is invalid and does not contain a valid controlnet model.","messagePattern":"ERROR: controlnet file is invalid and does not contain a valid controlnet model\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nodes.py","lineNumber":880,"sourceCode":"    CATEGORY = \"model/loaders\"\n    SEARCH_ALIASES = [\"controlnet\", \"control net\", \"cn\", \"load controlnet\", \"controlnet loader\"]\n\n    def load_controlnet(self, control_net_name):\n        controlnet_path = folder_paths.get_full_path_or_raise(\"controlnet\", control_net_name)\n        controlnet = comfy.controlnet.load_controlnet(controlnet_path)\n        if controlnet is None:\n            raise RuntimeError(\"ERROR: controlnet file is invalid and does not contain a valid controlnet model.\")\n        return (controlnet,)\n\nclass DiffControlNetLoader:","sourceCodeStart":862,"sourceCodeEnd":898,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/nodes.py#L862-L898","documentation":"Error \"ERROR: controlnet file is invalid and does not contain a valid controlnet model.\" thrown in Comfy-Org/ComfyUI.","triggerScenarios":"Thrown at nodes.py:880 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Load a valid controlnet checkpoint file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}