diff --git a/comfy/model_downloader.py b/comfy/model_downloader.py index 7e9c66308..81f9afe80 100644 --- a/comfy/model_downloader.py +++ b/comfy/model_downloader.py @@ -33,7 +33,7 @@ def get_or_download(folder_name: str, filename: str, known_files: List[HuggingFi destination = folder_paths.get_folder_paths(folder_name)[0] known_file: Optional[HuggingFile | CivitFile] = None for candidate in known_files: - if candidate.filename == filename or filename in candidate.alternate_filenames or filename == candidate.save_with_filename: + if str(candidate) == filename or candidate.filename == filename or filename in candidate.alternate_filenames or filename == candidate.save_with_filename: known_file = candidate break if known_file is None: diff --git a/comfy/utils.py b/comfy/utils.py index ab41799e3..98f3f602f 100644 --- a/comfy/utils.py +++ b/comfy/utils.py @@ -24,6 +24,8 @@ PROGRESS_BAR_HOOK = None def load_torch_file(ckpt, safe_load=False, device=None): if device is None: device = torch.device("cpu") + if ckpt is None: + raise FileNotFoundError("the checkpoint was not found") if ckpt.lower().endswith(".safetensors"): sd = safetensors.torch.load_file(ckpt, device=device.type) else: