@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.
- package/dist/coreviz.js +6 -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
|
-
|
|
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' ||
|