@coreviz/sdk 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/coreviz.js +6 -2
  2. package/package.json +1 -1
package/dist/coreviz.js CHANGED
@@ -182,8 +182,12 @@ class CoreViz {
182
182
  const tokenizer = await AutoTokenizer.from_pretrained(MODEL_ID);
183
183
  const processor = await AutoProcessor.from_pretrained(MODEL_ID);
184
184
  // Load models with device preference
185
- const text_model = await CLIPTextModelWithProjection.from_pretrained(MODEL_ID);
186
- const vision_model = await CLIPVisionModelWithProjection.from_pretrained(MODEL_ID);
185
+ const text_model = await CLIPTextModelWithProjection.from_pretrained(MODEL_ID, {
186
+ dtype: 'q4',
187
+ });
188
+ const vision_model = await CLIPVisionModelWithProjection.from_pretrained(MODEL_ID, {
189
+ dtype: 'q4',
190
+ });
187
191
  console.log(`Model loaded in ${Date.now() - start}ms`);
188
192
  // Check if input is likely an image
189
193
  const isImage = options?.type === 'image' ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreviz/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "CoreViz SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",