     
            return res.arrayBuffer();
        };
  
        const getAndDecompressF16Safetensors = async (device, progress) => {
            let totalLoaded = 0;
            let totalSize = 0;
            let partSize = {};

            const getPart = async(key) => {
                let part = await readTensorFromDb(db, key);

                if (part) {
                    console.log(`Cache hit: ${key}`);
                    return Promise.resolve(part.content);
                } else {
           