mgoin/CLIP-ViT-B-32-laion2b_s34b_b79k-ds

Model

0

stars

3

commits

2

linked in READMEs

Jan 4, 2024

updated

onnx

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')

Contributors

mgoin

3 commits

mgoin/CLIP-ViT-B-32-laion2b_s34b_b79k-ds

Model

0

stars

3

commits

2

linked in READMEs

Jan 4, 2024

updated

onnx

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')

Contributors

mgoin

3 commits