Skip to content

3.4.0 version of transformer does not respect env.localPath #1253

@djaffer

Description

@djaffer

System Info

The version 3.4.0 breaks the use local model. The version 3.3.3 works perfectly.

I have a path like

import {env, pipeline } from '@huggingface/transformer";

env.localModelPath = '../model-dir';

Environment/Platform

  • Website/web-app
  • Browser extension
  • Server-side (e.g., Node.js, Deno, Bun)
  • Desktop app (e.g., Electron)
  • Other (e.g., VSCode extension)

Description

The version 3.4.0 breaks the use local model. The version 3.3.3 works perfectly.

I have a path like

import {env, pipeline } from '@huggingface/transformer";

env.localModelPath = '../model-dir';

Reproduction

The version 3.4.0 breaks the use local model. The version 3.3.3 works perfectly.

I have a path like

import {env, pipeline } from '@huggingface/transformer";

env.localModelPath = '../model-dir';

env.allowRemoteModels = false;
const model = await pipeline(
'feature-extraction',
'bge-base-en',
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions