Skip to content

metric3d Model unsupported for Depth Animation #1247

@wesbos

Description

@wesbos

System Info

Using v3.4.0 with Node 23.7.0

The docs list the metric3d ONNX models as compatible, but when I try run it it says Error: Unsupported model type: metric3d

Does this type just need to be added to Transformers.js? Or are these incompatible?

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

above

Reproduction

import { pipeline } from '@huggingface/transformers';

const model = `onnx-community/metric3d-vit-small`;
const depth_estimator = await pipeline('depth-estimation', model);

// Predict depth of an image
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
const { depth } = await depth_estimator(url);

// Visualize the output
depth.save(`outputs/depth-${encodeURIComponent(model)}.png`);

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