veveup/mask2former-demo
0
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:
- which torch / CUDA / python the Space actually got
- whether detectron2 installs and imports, and whether its compiled
_Cis present - whether
mask2formerimports andbuild_model()constructs the model - inside
@spaces.GPU: real GPU present, device name, VRAM - 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.
