Downloads · 30 days
0
PJMixers-Dev/microsoft_LLM2CLIP-Openai-L-14-336-Combined
microsoft_LLM2CLIP-Openai-L-14-336-Combined is a zero-shot image classification model from PJMixers-Dev. Use it for the zero-shot image classification task on the model card, and read the license before you ship it in a product.
Adds the missing layers from openai/clip-vit-large-patch14-336 to microsoft/LLM2CLIP-Openai-L-14-336 so that it can be loaded in ComfyUI.
Downloads · 30 days
0
Access
Public
Updated Nov 10, 2024
Parameters
428M
1.7 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors1.7 GB · 100%
How the weights are stored.
F32428M · 100%
From the Hugging Face model README
Adds the missing layers from openai/clip-vit-large-patch14-336 to microsoft/LLM2CLIP-Openai-L-14-336 so that it can be loaded in ComfyUI.
import torch
from safetensors.torch import load_file, save_file
def newclip(original_path, new_path, combined_path):
original = load_file(original_path)
new = load_file(new_path)
combined = {}
for key in original.keys():
if key in new.keys():
combined[key] = new[key]
else:
combined[key] = original[key]
save_file(combined, combined_path)
newclip(
"./original-clip-l.safetensors",
"./new-llm2clip-clip-l.safetensors",
"./combined.safetensors"
)