diff --git a/src/models.js b/src/models.js index d5218bcf1..4d22e947a 100644 --- a/src/models.js +++ b/src/models.js @@ -1070,7 +1070,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, {