2.5 KiB
2.5 KiB
tags
| tags | |||||
|---|---|---|---|---|---|
|
Load Checkpoint
Documentation
- Class name:
CheckpointLoaderSimple - Category:
loaders - Output node:
False
The CheckpointLoaderSimple node is designed for loading model checkpoints without the need for specifying a configuration. It simplifies the process of checkpoint loading by requiring only the checkpoint name, making it more accessible for users who may not be familiar with the configuration details.
Input types
Required
ckpt_name- Specifies the name of the checkpoint to be loaded. This parameter is crucial as it determines which checkpoint file the node will attempt to load, directly affecting the node's execution and the model that is loaded.
- Comfy dtype:
COMBO[STRING] - Python dtype:
str
Output types
model- Comfy dtype:
MODEL - Returns the loaded model, allowing it to be used for further processing or inference.
- 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:
- CLIPTextEncode
- VAEDecode
- LoraLoader
- CLIPSetLastLayer
- Reroute
- [CR Apply LoRA Stack](../../ComfyUI_Comfyroll_CustomNodes/Nodes/CR Apply LoRA Stack.md)
- VAEEncode
- KSampler
- UltimateSDUpscale
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, output_vae=True, output_clip=True):
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]