Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

stop_at_clip_layer can be set in CLIPSetLastLayer so it can be removed from the CLIPLoader node.

comfyanonymousb9e3f52240d9
diff --git a/nodes.py b/nodes.py
index 23b8cf553..26dad5729 100644
--- a/nodes.py
+++ b/nodes.py
@@ -359,17 +359,15 @@ class CLIPLoader:
@classmethod
def INPUT_TYPES(s):
return {"required": { "clip_name": (filter_files_extensions(recursive_search(s.clip_dir), supported_pt_extensions), ),
- "stop_at_clip_layer": ("INT", {"default": -1, "min": -24, "max": -1, "step": 1}),
}}
RETURN_TYPES = ("CLIP",)
FUNCTION = "load_clip"
CATEGORY = "loaders"
- def load_clip(self, clip_name, stop_at_clip_layer):
+ def load_clip(self, clip_name):
clip_path = os.path.join(self.clip_dir, clip_name)
clip = comfy.sd.load_clip(ckpt_path=clip_path, embedding_directory=CheckpointLoader.embedding_directory)
- clip.clip_layer(stop_at_clip_layer)
return (clip,)
class EmptyLatentImage: