diff --git a/src/models.js b/src/models.js index 7133e64d5..20e831391 100644 --- a/src/models.js +++ b/src/models.js @@ -1013,7 +1013,10 @@ export class PreTrainedModel extends Callable { } else { // should be MODEL_TYPES.EncoderOnly if (modelType !== MODEL_TYPES.EncoderOnly) { - console.warn(`Model type for '${modelName ?? config?.model_type}' not found, assuming encoder-only architecture. Please report this at ${GITHUB_ISSUE_URL}.`) + const type = modelName ?? config?.model_type; + if (type !== 'custom') { + console.warn(`Model type for '${type}' not found, assuming encoder-only architecture. Please report this at ${GITHUB_ISSUE_URL}.`) + } } info = await Promise.all([ constructSessions(pretrained_model_name_or_path, {