Spaces:
Running on Zero
Running on Zero
File size: 554 Bytes
76c9728 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """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()
|