mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-12 17:27:26 +08:00
Merge 9695bc691e into f48d2a017e
This commit is contained in:
commit
1dbf84c889
22
nodes.py
22
nodes.py
@ -604,8 +604,26 @@ class CheckpointLoaderSimple:
|
|||||||
SEARCH_ALIASES = ["load model", "checkpoint", "model loader", "load checkpoint", "ckpt", "model"]
|
SEARCH_ALIASES = ["load model", "checkpoint", "model loader", "load checkpoint", "ckpt", "model"]
|
||||||
|
|
||||||
def load_checkpoint(self, ckpt_name):
|
def load_checkpoint(self, ckpt_name):
|
||||||
ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name)
|
try:
|
||||||
out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
|
ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name)
|
||||||
|
except FileNotFoundError:
|
||||||
|
available = folder_paths.get_filename_list("checkpoints")
|
||||||
|
available_models = "\n".join(f"- {name}" for name in available[:10])
|
||||||
|
|
||||||
|
raise FileNotFoundError(
|
||||||
|
f"Checkpoint '{ckpt_name}' was not found.\n\n"
|
||||||
|
f"Expected location:\n"
|
||||||
|
f"ComfyUI/models/checkpoints/\n\n"
|
||||||
|
f"Available checkpoints:\n"
|
||||||
|
f"{available_models if available_models else '(none found)'}"
|
||||||
|
)
|
||||||
|
|
||||||
|
out = comfy.sd.load_checkpoint_guess_config(
|
||||||
|
ckpt_path,
|
||||||
|
output_vae=True,
|
||||||
|
output_clip=True,
|
||||||
|
embedding_directory=folder_paths.get_folder_paths("embeddings")
|
||||||
|
)
|
||||||
return out[:3]
|
return out[:3]
|
||||||
|
|
||||||
class DiffusersLoader:
|
class DiffusersLoader:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user