Skip to content

Commit 1f4866f

Browse files
committed
Cleanup
1 parent 4d76e66 commit 1f4866f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/configs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/**
23
* @file Helper module for using model configs. For more information, see the corresponding
34
* [Python documentation](https://huggingface.co/docs/transformers/main/en/model_doc/auto#transformers.AutoConfig).

src/models.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async function getSession(pretrained_model_name_or_path, fileName, options) {
199199
}
200200

201201
if (dtype === DATA_TYPES.auto) {
202-
// Try to choose the auto dtype based on the device-specific config first, then fall back to transformers.js_config
202+
// Try to choose the auto dtype based on the custom config
203203
let config_dtype = custom_config.dtype;
204204
if (typeof config_dtype !== 'string') {
205205
config_dtype = config_dtype?.[fileName];
@@ -250,7 +250,6 @@ async function getSession(pretrained_model_name_or_path, fileName, options) {
250250
session_options.executionProviders ??= executionProviders;
251251

252252
const free_dimension_overrides = custom_config.free_dimension_overrides;
253-
254253
if (free_dimension_overrides) {
255254
session_options.freeDimensionOverrides ??= free_dimension_overrides;
256255
} else if (selectedDevice.startsWith('webnn') && !session_options.freeDimensionOverrides) {
@@ -264,7 +263,6 @@ async function getSession(pretrained_model_name_or_path, fileName, options) {
264263

265264
// Handle onnx external data files
266265
const use_external_data_format = options.use_external_data_format ?? custom_config.use_external_data_format;
267-
268266
/** @type {Promise<string|{path: string, data: Uint8Array}>[]} */
269267
let externalDataPromises = [];
270268
if (use_external_data_format) {

0 commit comments

Comments
 (0)