Downloads · 30 days
0
mgoin/CLIP-ViT-B-32-laion2b_s34b_b79k-ds
CLIP-ViT-B-32-laion2b_s34b_b79k-ds is a machine learning model from mgoin. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model was exported from open-clip using the SparseML integration.
Downloads · 30 days
0
Access
Public
Updated Jan 4, 2024
Repo size
606 MB
Likes
0
Public
Click a slice to open those files.
.onnx606 MB · 100%
From the Hugging Face model README
This model was exported from open-clip using the SparseML integration.
git clone https://github.com/neuralmagic/sparseml
pip install -e sparseml[clip]
python sparseml/integrations/clip/clip_onnx_export.py --model ViT-B-32 --pretrained laion2b_s34b_b79k --export-path onnx
import onnx
from onnx import helper
from onnx import TensorProto
# Define the new input tensor
model_path = 'onnx/clip_text.onnx'
model = onnx.load(model_path)
new_input = helper.make_tensor_value_info(
'input_1',
TensorProto.INT64,
['batch']
)
model.graph.input.append(new_input)
onnx.save(model, 'modified_model.onnx')