Load Checkpoint¶
Documentation¶
- Class name:
CheckpointLoaderSimple
- Category:
loaders
- Output node:
False
The CheckpointLoaderSimple node is designed for loading model checkpoints without requiring a configuration name. It simplifies the checkpoint loading process by automatically guessing the appropriate configuration based on the checkpoint name, making it easier to use for quick model setups or testing.
Input types¶
Required¶
ckpt_name
- Specifies the name of the checkpoint to load. This parameter is crucial for identifying which checkpoint file to retrieve and use for model initialization.
- Comfy dtype:
COMBO[STRING]
- Python dtype:
str
Output types¶
model
- Comfy dtype:
MODEL
- Returns the main model loaded from the specified checkpoint.
- Python dtype:
torch.nn.Module
- Comfy dtype:
clip
- Comfy dtype:
CLIP
- Returns the CLIP model associated with the loaded checkpoint, if available.
- Python dtype:
torch.nn.Module
- Comfy dtype:
vae
- Comfy dtype:
VAE
- Returns the VAE model associated with the loaded checkpoint, if available.
- Python dtype:
torch.nn.Module
- Comfy dtype:
Usage tips¶
- Infra type:
GPU
- Common nodes:
Source code¶
class CheckpointLoaderSimple:
@classmethod
def INPUT_TYPES(s):
return {"required": { "ckpt_name": (folder_paths.get_filename_list("checkpoints"), ),
}}
RETURN_TYPES = ("MODEL", "CLIP", "VAE")
FUNCTION = "load_checkpoint"
CATEGORY = "loaders"
def load_checkpoint(self, ckpt_name):
ckpt_path = folder_paths.get_full_path("checkpoints", ckpt_name)
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]