Skip to content

Commit

Permalink
Update src/models.js - Object.create(null)
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Lochner <[email protected]>
  • Loading branch information
kungfooman and xenova authored Nov 19, 2023
1 parent 8bd4ccc commit 1fe6288
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async function constructSession(pretrained_model_name_or_path, fileName, options
*/
async function validateInputs(session, inputs) {
// NOTE: Create either a shallow or deep copy based on `onnx.wasm.proxy`
const checkedInputs = {};
const checkedInputs = Object.create(null);
const missingInputs = [];
for (const inputName of session.inputNames) {
const tensor = inputs[inputName];
Expand Down

0 comments on commit 1fe6288

Please sign in to comment.