Open WanderFox opened 2 months ago
In some cases we can use a model that doesn't contain VAE and CLIP. I propose to change code to this:
class CheckpointLoaderNF4: @classmethod def INPUT_TYPES(cls): return { "required": { "ckpt_name": (folder_paths.get_filename_list("checkpoints"), ), "only_model": ("BOOLEAN", {"default": False}), } } RETURN_TYPES = ("MODEL", "CLIP", "VAE") FUNCTION = "load_checkpoint" CATEGORY = "loaders" def load_checkpoint(self, ckpt_name, only_model): ckpt_path = folder_paths.get_full_path("checkpoints", ckpt_name) if only_model: model = comfy.sd.load_diffusion_model(ckpt_path, model_options={"custom_operations": OPS}) return (model,) else: out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"), model_options={"custom_operations": OPS}) return out[:3]
In some cases we can use a model that doesn't contain VAE and CLIP. I propose to change code to this: