Spaces:
Running on Zero
Running on Zero
| """Entry point for the Hugging Face Space. | |
| `spaces` is imported before torch so that ZeroGPU can patch CUDA initialization, | |
| which is why the Space runs this wrapper instead of `moge.scripts.app` directly. | |
| """ | |
| try: | |
| import spaces # noqa: F401 | |
| except ImportError: | |
| pass | |
| from moge.scripts import app | |
| if __name__ == '__main__': | |
| # Click parses sys.argv, which is empty on Spaces, so the demo starts with | |
| # MoGe-3 ViT-L. Pass arguments explicitly to change that, e.g. | |
| # app.main(['--pretrained', 'Ruicheng/moge-3-vitg']) | |
| app.main() | |