mirror of
https://github.com/simon987/sist2.git
synced 2025-04-10 14:06:45 +00:00
Fix loadModel
This commit is contained in:
parent
fc06b3e378
commit
59bc418a95
@ -78,16 +78,6 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
document.onpointerdown = (e) => {
|
|
||||||
if (e.button === 2) {
|
|
||||||
|
|
||||||
const isLightboxOpen = this.$refs.lightbox === undefined || this.$refs.lightbox.$el.tagName === undefined;
|
|
||||||
if (isLightboxOpen) {
|
|
||||||
e.preventDefault();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
keyDownListener(e) {
|
keyDownListener(e) {
|
||||||
|
@ -22,7 +22,9 @@ export class CLIPTransformerModel {
|
|||||||
|
|
||||||
async loadModel(onProgress) {
|
async loadModel(onProgress) {
|
||||||
ort.env.wasm.wasmPaths = ORT_WASM_PATHS;
|
ort.env.wasm.wasmPaths = ORT_WASM_PATHS;
|
||||||
ort.env.wasm.numThreads = 2;
|
if (window.crossOriginIsolated) {
|
||||||
|
ort.env.wasm.numThreads = 2;
|
||||||
|
}
|
||||||
|
|
||||||
let buf = await ModelStore.get(this._modelUrl);
|
let buf = await ModelStore.get(this._modelUrl);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user