@@ -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