New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colab demo doesn't work #39
Comments
Have you restarted runtime after installation? |
Yes I pressed the 'Restart runtime' button that appeared at the bottom of the cell. But I tried it again and this time I think I restarted after the running the second installation cell and it works for me now. |
@bowenc0221 also get this issue when running in colab on cpu RuntimeError Traceback (most recent call last) 16 frames RuntimeError: Not implemented on the CPU |
The current Mask2Former/mask2former/modeling/pixel_decoder/ops/modules/ms_deform_attn.py Lines 116 to 119 in 012049c
Maybe you can try |
@bowenc0221 thanks could the colab be updated to support cpu? I am currently testing it to add the models to https://huggingface.co/spaces as a web demo, similar to github: https://github.com/facebookresearch/omnivore Spaces is completely free, and I can help setup a Gradio Space. Here are some getting started instructions if you'd prefer to do it yourself: https://huggingface.co/blog/gradio-spaces |
@bowenc0221 thanks working on it now, also the models can be added to the facebook organization on Huggingface: https://huggingface.co/facebook Would you be interested in becoming part of the Facebook organization on the hub? This allows you to have write access to all model repos of Facebook, which means you can easily upload new checkpoints, write model cards, etc. Once a model is added it can be made into a Gradio space with a few lines of code for example in xm_transformer https://huggingface.co/spaces/facebook/xm_transformer_600m
can join here: https://huggingface.co/welcome |
@bowenc0221 inference on cpu is working in colab thanks, I setup the space here https://huggingface.co/spaces/akhaliq/Mask2Former but I get this error Traceback (most recent call last): |
Installing the package requires CUDA (GPUs are not needed). Is CUDA available? You can use the following command: FORCE_CUDA=1 CUDA_HOME=/path/to/cuda python setup.py build install |
@bowenc0221 thanks, yes I tried that step, see the code here: https://huggingface.co/spaces/akhaliq/Mask2Former/blob/main/app.py#L16 however, cuda is not available |
Hey @AK391, sorry for the late reply. I think there is an easy solution to avoid installing the custom op. Could you try to do the following:
For example: if os.environ.get('HUGGINGFACE_DEMO', 0):
MSDeformAttnFunction = None
else:
from ..functions import MSDeformAttnFunction |
@bowenc0221 thanks, I opened a PR here #52 for the Huggingface demo |
Excuse me, have you resolved the question above? |
Thanks for your help! But I tested it on a random input and found that there is a significant error between using
Can you give me some suggestions to make up for this error? |
does anybody have error free python code or worked on it for this mask2former demo? |
I would love to try out this model but I am struggling with installation. The Colab demo does not work either and gives the error:
The text was updated successfully, but these errors were encountered: