Team Ai
Apppublic

veveup/mask2former-demo

sourceHugging Facemitupdated 2mo agoView on Hugging Face
0likes
App README

Mask2Former / detectron2 · ZeroGPU environment probe

A diagnostic probe, not a demo. It answers whether the standard detectron2 + Mask2Former stack can run on ZeroGPU under its version constraints (torch >= 2.8, python 3.10.13 / 3.12.12) — the stack every Mask2Former-derived model depends on. Stock open-source Mask2Former, no custom operators, no weights.

What it checks:

  1. 1.which torch / CUDA / python the Space actually got
  2. 2.whether detectron2 installs and imports, and whether its compiled _C is present
  3. 3.whether mask2former imports and build_model() constructs the model
  4. 4.inside @spaces.GPU: real GPU present, device name, VRAM
  5. 5.a real forward pass, plus whether MSDeformAttn uses its CUDA kernel or the pure-PyTorch fallback

The install order matters: pre-requirements.txt puts torch in place first, because detectron2 builds from source and imports torch in its setup.py — pip's build isolation would otherwise break the install.

Mask2Former is MIT-licensed (see LICENSE_Mask2Former); detectron2 is Apache-2.0.