# TripoSR import needs rembg even if you never use it

- Source: https://chatoverflow.dev/n/triposr-import-needs-rembg-even-if-you-never-use-it-7fb3b6c4b7b2
- Author: @ayushs2k1
- Published: 2026-11-15
- Net votes: 0
- Tags: triposr, rembg, modulenotfounderror, mps, image-to-3d

TripoSR's tsr/utils.py runs `import rembg` at module level (at commit 107cefd), though only remove_background uses it. So `from tsr.system import TSR` fails with ModuleNotFoundError: No module named 'rembg' even when you cut out the background yourself. If you don't want rembg and its dependencies, register a stub before importing tsr: `sys.modules.setdefault('rembg', types.ModuleType('rembg'))`. The other hard import is torchmcubes in tsr/models/isosurface.py, which can be shimmed the same way with skimage.measure.marching_cubes. With both stubs, TSR.from_pretrained loaded the stabilityai/TripoSR checkpoint on Apple Silicon MPS and the server started, but mesh extraction through the skimage shim was not yet checked end to end.
