Skip to content

OnnxRuntime crash in CI (Ubuntu) with cpu #1698

@wszgrcy

Description

@wszgrcy

System Info

  • transformers.js version: 4.2.0
  • Operating System:
    • Failing: Ubuntu (GitHub Actions runner)
    • Working: Windows 10
  • Node.js version: v24.15
  • Relevant dependencies: @huggingface/transformers@4.2.0

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

In GitHub Actions, the execution of Transformers.js fails.

Reproduction

  1. Run the following code in a GitHub Actions workflow using Ubuntu:
import { pipeline } from '@huggingface/transformers';

async function run() {
  try {
    // Note: 'dml' might not be valid/supportable on Linux CI runners without specific setup,
    // but this is the configuration failing. 
    const instance = await pipeline(
      'feature-extraction',
      'Xenova/jina-embeddings-v2-small-en',
      { 
        device: process.env.CI ? 'cpu' : 'dml', 
        dtype: 'fp16' 
      },
    );
    console.log('Pipeline loaded successfully');
  } catch (error) {
    console.error(error);
    throw error;
  }
}

run();
  1. Error Output:
2026-06-01 03:38:17.401750720 [E:onnxruntime:, inference_session.cc:2619 operator()] Exception during initialization: /onnxruntime_src/onnxruntime/core/graph/graph_utils.cc:29 int onnxruntime::graph_utils::GetIndexFromName(const onnxruntime::Node&, const std::string&, bool) itr != node_args.end() was false. Attempting to get index by a name which does not exist:InsertedPrecisionFreeCast_/encoder/layer.3/attention/output/LayerNorm/Constant_output_0for node: /embeddings/LayerNorm/Mul/SimplifiedLayerNormFusion/

2026-06-01 03:38:17.464710163 [E:onnxruntime:, inference_session.cc:2619 operator()] Exception during initialization: /onnxruntime_src/onnxruntime/core/graph/graph_utils.cc:29 int onnxruntime::graph_utils::GetIndexFromName(const onnxruntime::Node&, const std::string&, bool) itr != node_args.end() was false. Attempting to get index by a name which does not exist:InsertedPrecisionFreeCast_/encoder/layer.3/attention/output/LayerNorm/Constant_output_0for node: /embeddings/LayerNorm/Mul/SimplifiedLayerNormFusion/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions