-
Notifications
You must be signed in to change notification settings - Fork 254
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
Add Web Demo & Docker environment #8
Conversation
Thanks for your contribution, LGTM! |
Hi, chenxwh, But what should I do if I want to add more tasks (e.g., deblurring with the REDS pre-trained model, and set it as defaul) in the web demo? |
Hi @mayorx, A tool called Cog is used for the replicate, you can find the detailed documentation[ here, but in a nutshell, the process goes like:
Then the changes will be synced on the web. That's it! Let me know if you need any further clarification :) Chenxi |
HI, Chenxi, Thanks! I tried the process, but it seems missing some steps: 2). How to build a local environment from the web demo? It seems not contained in the doc. 3). How to modify the local docker image, is there anything that needs to be cared about? 4). After the modification, should I just run cog push .. and it will do the other things (e.g. web page modification) automatically? |
Hi @mayorx, I am not sure I understand what you meant by 'building' local environment, but the environment specified in The docker image is big indeed, it wraps up everything needed for the model to run, to start with, the base images from nvidia are several gigabytes with cuda libraries etc, sometimes if the checkpoints are pre-downloaded (so you do not need to do gdown or something for the web demo to speed things up), the image can be even bigger. But you do not need to pull the image if you want to make changes to the demo. The steps described before is for when you wish to start a new model (sorry if it was confusing). With the existing one, you simply need to update To summarise, you do not need to work with docker directly, docker is the wrapper behind cog that makes it possible. Hope it helps! |
Hi, Chenxi,
Thanks for your reply. What I want to do is add a deblur demo (REDS pretrain model, as a default option), as it is in our colab demo. So it may be the case of "add the weights to the corresponding directory if they are pre-downloaded" ? My question is, what is the best practice to modify the existing web demo (https://replicate.com/megvii-research/nafnet) if nvidia-docker is not supported in my case? |
Ah I see, MacOS shouldn't be an issue, but do you have GPU in your local machine? since in |
In case GPU is necessary, I have updated demo with REDS model as default on https://replicate.com/megvii-research/nafnet (GoPro is also kept) :) |
Chenxi, |
Hi @mayorx 👋🏼 I'm Zeke from the @replicate team. This model is really impressive. The deblurred license plate is really surprising. Almost like science fiction. "ENHANCE!" I just wanted to let you know that the arXiv.org website now includes a link to your model on Replicate. See the "Demos" tab at the bottom of the page here: https://arxiv.org/abs/2204.04676 |
Wooo! |
This pull request makes it possible to run your model inside a Docker environment, which makes it easier for other people to run it. We're using an open source tool called Cog to make this process easier.
This also means we can make a web page where other people can try out your model! We have implemented Image Denoising, Deblurring and Stereo Image Super-resolution in one demo, view it here: https://replicate.com/megvii-research/nafnet. You can find the docker file under the tab ‘run model with docker’.
We have added some examples to the page, but do claim the page so you can own the page, customise the Example gallery as you like, push any future update to the web demo, and we'll feature it on our website and tweet about it too. You can find the 'Claim this model' button on the top of the page. Any member of the megvii-research organization on GitHub can claim the model ~
In case you're wondering who I am, I'm from Replicate, where we're trying to make machine learning reproducible. We got frustrated that we couldn't run all the really interesting ML work being done. So, we're going round implementing models we like. 😊