A model is still running

A model is still running or downloading. Leaving will stop the current operation. Stay on this page to let it finish.

Skip to content
LocalAI.toolsBeta

Join the waitlist

Get an email when the new apps and model runs launch.

No account needed.

VitMatte Small Composition-1K — Trimap Matting

Foreground cutouts from images. Processed on your device.

Browser inferencePowered by WebAI · Private · Unlimited runs
About this model

Refine an image cutout using a matching foreground/background/unknown trimap. Returns a soft alpha matte; this smaller Composition-1K variant still requires a trimap and does not remove backgrounds automatically.

Created by
HUST Vision Lab
License
Apache-2.0
Model released
Unknown
Source repository created
Sep 10, 2023
Model weights · FP32
103.9 MB

Best for

  • Refine user-provided trimaps for image editing and foreground compositing.
  • Prototype trimap-guided extraction of fine object boundaries.

Keep in mind

  • Requires a same-size trimap; it does not independently discover the foreground.
  • Incorrect foreground/background markings can force wrong alpha values and lose image content.
  • Hair, transparent objects, blur, poor contrast, and out-of-domain scenes can produce halos or missing detail.
  • Alpha values are editing estimates, not semantic or factual classifications; do not use for high-impact decisions.

Processed on your deviceInference runs in this browser. Input/output sharing requires consent for each run. Basic run logs include device information and approximate connection location. Model and runtime files download from external hosts. Saved downloads may be cleared by your browser.

Sources & technical details
Original model
hustvl/vitmatte-small-composition-1k
Release verification
Unknown
Release evidence
Exact original checkpoint public release date has not been verified. Repository creation, training, paper, artifact conversion and update dates are not release evidence.
Source updated
Mar 29, 2024
Browser model files
Xenova/vitmatte-small-composition-1k
Files updated
Apr 24, 2026
Artifact revision
6bc1297f6140f055a227b6d2cfe8c093281f35d2

Input

PNG / JPG / WEBP

Sample result

VitMatte Small Composition-1K — Trimap Matting
Foreground and background guideUse the same dimensions as the source: black for background, white for foreground, and gray (128) for uncertain edges.

Settings

Adds a self-contained SVG presentation image alongside the unchanged native model fields. When enabled, draws model predictions or presents generated media and text. Adds CPU postprocessing time and image bytes. It does not change model predictions.

Output

Your cutout will appear here

Choose an image or try the sample, then remove its background. Compare the original and download a transparent PNG.

Benchmark evidence

Saved worker evidence is separate from benchmarks run on your device. It does not guarantee speed or quality on every browser.

VitMatte Small Composition-1K — Trimap Matting

4 configurations tested
Passed4
Failed0
TestedSep 15, 2026
RuntimeTransformers.js 4.2.0

Quality criteria

Finite original-size alpha in [0,1], non-degenerate foreground, mean absolute error <= 0.2 versus the local MODNet regression reference; trimap preserves certain foreground/background and marks the boundary unknown.

PrecisionDeviceResult
FP32GPU · WebGPUAcceleratedPassedModerate
Q8GPU · WebGPUAcceleratedPassedVery slow
Q8CPU · WASMPassedVery slow
FP32CPU · WASMPassedVery slow
Test setup & sample details
Quality gate
Finite original-size alpha in [0,1], non-degenerate foreground, mean absolute error <= 0.2 versus the local MODNet regression reference; trimap preserves certain foreground/background and marks the boundary unknown.
Tested
2026-09-15T11:30:48.843Z
Environment
Isolated headless Chrome on macOS; Transformers.js 4.2.0
Runtime
Transformers.js 4.2.0
Artifact revision
6bc1297f6140f055a227b6d2cfe8c093281f35d2
Fixture
{
  "file": "modnet-portrait-pexels-5965592.jpg",
  "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592.jpg",
  "size": 78124,
  "sha1": "38212739a4a4f0be25d84863cf991d7fb6c6d818",
  "width": 1024,
  "height": 683,
  "source": "https://www.pexels.com/photo/woman-wearing-pink-turtleneck-sweater-5965592/",
  "license": "Pexels License",
  "licenseUrl": "https://www.pexels.com/license/",
  "preprocessing": "RGB image through pinned processor; the checked-in 0/128/255 trimap is derived from the MODNet reference with an 8-pixel sampled boundary.",
  "reference": {
    "file": "modnet-portrait-pexels-5965592-mask.png",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592-mask.png",
    "size": 67541,
    "sha1": "01ace4f95454ce44cc53c2c797a87a583c86cee8",
    "width": 1024,
    "height": 683
  },
  "trimap": {
    "file": "vitmatte-portrait-5965592-trimap.png",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/vitmatte-portrait-5965592-trimap.png",
    "size": 22459,
    "sha1": "64b06a53a2b0f33507093d2696911ec236a00396",
    "width": 1024,
    "height": 683
  }
}
Rerun when
artifact revision change; runtime version change; fixture or quality-gate change; browser/backend behavior change
Per-case quality & failure details
[
  {
    "precision": "fp32",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.0033597094516932442,
      "foregroundRatio": 0.25441955298316254,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 6372.700000017881,
      "inferenceMs": 9082,
      "totalMs": 15585.600000023842,
      "grade": "very-slow",
      "imagesPerSecond": 0.11010790574763268
    }
  },
  {
    "precision": "fp32",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.003359716394162342,
      "foregroundRatio": 0.25441955298316254,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 7088.199999988079,
      "inferenceMs": 661.8000000119209,
      "totalMs": 7969.0999999940395,
      "grade": "good",
      "imagesPerSecond": 1.5110305227893428
    }
  },
  {
    "precision": "q8",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.003484805486398143,
      "foregroundRatio": 0.25471409452781846,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 3443.300000011921,
      "inferenceMs": 9065.299999982119,
      "totalMs": 12636.899999976158,
      "grade": "very-slow",
      "imagesPerSecond": 0.11031074536992405
    }
  },
  {
    "precision": "q8",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.003507440455528697,
      "foregroundRatio": 0.2546383144216691,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 3362.5,
      "inferenceMs": 7796,
      "totalMs": 11286.90000000596,
      "grade": "very-slow",
      "imagesPerSecond": 0.12827090815802974
    }
  }
]

VitMatte Base Composition-1K — Trimap Matting

4 configurations tested
Passed4
Failed0
TestedSep 26, 2026
RuntimeTransformers.js 4.2.0

Quality criteria

Finite original-size alpha in [0,1], non-degenerate foreground, mean absolute error <= 0.2 versus the local MODNet regression reference; trimap preserves certain foreground/background and marks the boundary unknown.

PrecisionDeviceResult
FP32GPU · WebGPUAcceleratedPassedModerate
Q8GPU · WebGPUAcceleratedPassedVery slow
FP32CPU · WASMPassedVery slow
Q8CPU · WASMPassedVery slow
Test setup & sample details
Quality gate
Finite original-size alpha in [0,1], non-degenerate foreground, mean absolute error <= 0.2 versus the local MODNet regression reference; trimap preserves certain foreground/background and marks the boundary unknown.
Tested
2026-09-26T07:43:10.731Z
Environment
Pending isolated-browser matrix; Transformers.js 4.2.0
Runtime
Transformers.js 4.2.0
Artifact revision
1290b014b994e95ca1b9dd9c5f72c3b6d5b7236a
Fixture
{
  "file": "modnet-portrait-pexels-5965592.jpg",
  "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592.jpg",
  "size": 78124,
  "sha1": "38212739a4a4f0be25d84863cf991d7fb6c6d818",
  "width": 1024,
  "height": 683,
  "source": "https://www.pexels.com/photo/woman-wearing-pink-turtleneck-sweater-5965592/",
  "license": "Pexels License",
  "licenseUrl": "https://www.pexels.com/license/",
  "preprocessing": "RGB image through pinned processor; the checked-in 0/128/255 trimap is derived from the MODNet reference with an 8-pixel sampled boundary.",
  "reference": {
    "file": "modnet-portrait-pexels-5965592-mask.png",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592-mask.png",
    "size": 67541,
    "sha1": "01ace4f95454ce44cc53c2c797a87a583c86cee8",
    "width": 1024,
    "height": 683
  },
  "trimap": {
    "file": "vitmatte-portrait-5965592-trimap.png",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/vitmatte-portrait-5965592-trimap.png",
    "size": 22459,
    "sha1": "64b06a53a2b0f33507093d2696911ec236a00396",
    "width": 1024,
    "height": 683
  }
}
Rerun when
artifact revision change; runtime version change; fixture or quality-gate change; browser/backend behavior change
Per-case quality & failure details
[
  {
    "precision": "fp32",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.0028033782470408327,
      "foregroundRatio": 0.2549342857796486,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 43907.60000002384,
      "inferenceMs": 20086.5,
      "totalMs": 65276.10000002384,
      "grade": "very-slow",
      "imagesPerSecond": 0.049784681253578274
    }
  },
  {
    "precision": "fp32",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.002803391196857619,
      "foregroundRatio": 0.2549342857796486,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 45021.80000001192,
      "inferenceMs": 968.5,
      "totalMs": 47274.79999998212,
      "grade": "good",
      "imagesPerSecond": 1.0325245224574084
    }
  },
  {
    "precision": "q8",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.14917271067533516,
      "foregroundRatio": 0.10128511621522694,
      "grade": "matting-pass",
      "qualityNote": "Passes the broad regression threshold but is materially degraded versus FP32 on this fixture."
    },
    "runtime": {
      "loadMs": 15451,
      "inferenceMs": 20787,
      "totalMs": 37558.19999998808,
      "grade": "very-slow",
      "imagesPerSecond": 0.048106989945639105
    }
  },
  {
    "precision": "q8",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.148451668763005,
      "foregroundRatio": 0.10273494692532943,
      "grade": "matting-pass",
      "qualityNote": "Passes the broad regression threshold but is materially degraded versus FP32 on this fixture."
    },
    "runtime": {
      "loadMs": 17564.69999998808,
      "inferenceMs": 17431.09999999404,
      "totalMs": 36313.69999998808,
      "grade": "very-slow",
      "imagesPerSecond": 0.057368726012721055
    }
  }
]

VitMatte Base Distinctions-646 — Trimap Matting

4 configurations tested
Passed4
Failed0
TestedSep 26, 2026
RuntimeTransformers.js 4.2.0

Quality criteria

Finite original-size alpha in [0,1], non-degenerate foreground, mean absolute error <= 0.2 versus the local MODNet regression reference; trimap preserves certain foreground/background and marks the boundary unknown.

PrecisionDeviceResult
FP32GPU · WebGPUAcceleratedPassedModerate
Q8GPU · WebGPUAcceleratedPassedVery slow
FP32CPU · WASMPassedVery slow
Q8CPU · WASMPassedVery slow
Test setup & sample details
Quality gate
Finite original-size alpha in [0,1], non-degenerate foreground, mean absolute error <= 0.2 versus the local MODNet regression reference; trimap preserves certain foreground/background and marks the boundary unknown.
Tested
2026-09-26T07:39:38.213Z
Environment
Pending isolated-browser matrix; Transformers.js 4.2.0
Runtime
Transformers.js 4.2.0
Artifact revision
80e3f7360e710e7719979206ad00a49cf1fe5ce8
Fixture
{
  "file": "modnet-portrait-pexels-5965592.jpg",
  "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592.jpg",
  "size": 78124,
  "sha1": "38212739a4a4f0be25d84863cf991d7fb6c6d818",
  "width": 1024,
  "height": 683,
  "source": "https://www.pexels.com/photo/woman-wearing-pink-turtleneck-sweater-5965592/",
  "license": "Pexels License",
  "licenseUrl": "https://www.pexels.com/license/",
  "preprocessing": "RGB image through pinned processor; the checked-in 0/128/255 trimap is derived from the MODNet reference with an 8-pixel sampled boundary.",
  "reference": {
    "file": "modnet-portrait-pexels-5965592-mask.png",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592-mask.png",
    "size": 67541,
    "sha1": "01ace4f95454ce44cc53c2c797a87a583c86cee8",
    "width": 1024,
    "height": 683
  },
  "trimap": {
    "file": "vitmatte-portrait-5965592-trimap.png",
    "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/vitmatte-portrait-5965592-trimap.png",
    "size": 22459,
    "sha1": "64b06a53a2b0f33507093d2696911ec236a00396",
    "width": 1024,
    "height": 683
  }
}
Rerun when
artifact revision change; runtime version change; fixture or quality-gate change; browser/backend behavior change
Per-case quality & failure details
[
  {
    "precision": "fp32",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.0030478486450616032,
      "foregroundRatio": 0.25590941846632503,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 46701.69999998808,
      "inferenceMs": 19572.90000000596,
      "totalMs": 67595.29999998212,
      "grade": "very-slow",
      "imagesPerSecond": 0.05109104935904723
    }
  },
  {
    "precision": "fp32",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.003047854315384853,
      "foregroundRatio": 0.25590941846632503,
      "grade": "matting-pass"
    },
    "runtime": {
      "loadMs": 45012,
      "inferenceMs": 1852.0999999940395,
      "totalMs": 48187.09999999404,
      "grade": "slow",
      "imagesPerSecond": 0.5399276496966785
    }
  },
  {
    "precision": "q8",
    "device": "wasm",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.15344871547009956,
      "foregroundRatio": 0.09513834873718888,
      "grade": "matting-pass",
      "qualityNote": "Passes the broad regression threshold but is materially degraded versus FP32 on this fixture."
    },
    "runtime": {
      "loadMs": 15922.800000011921,
      "inferenceMs": 20092.79999998212,
      "totalMs": 37322.10000002384,
      "grade": "very-slow",
      "imagesPerSecond": 0.049769071508246235
    }
  },
  {
    "precision": "q8",
    "device": "webgpu",
    "status": "pass",
    "quality": {
      "valid": true,
      "meanAbsoluteError": 0.15506122205983358,
      "foregroundRatio": 0.09298933931185945,
      "grade": "matting-pass",
      "qualityNote": "Passes the broad regression threshold but is materially degraded versus FP32 on this fixture."
    },
    "runtime": {
      "loadMs": 16516.5,
      "inferenceMs": 17231.79999998212,
      "totalMs": 35028.60000002384,
      "grade": "very-slow",
      "imagesPerSecond": 0.05803224271411215
    }
  }
]

Something not quite right?

Tell us what happened with ViTMatte. Loading, results, or the page itself—we’re here for all of it.

Attachments Optional

Up to 3 files · 50 MB each

Browser, OS, CPU/GPU, memory, screen, storage, and network details are included automatically. Model inputs, results, and browsing history are not collected.