chenfei-wu / TaskMatrix

Other
34.52k stars 3.32k forks source link

[Enhancement] Colab support added #30

Open rupeshs opened 1 year ago

rupeshs commented 1 year ago

I tried to add colab support. Tested text to image,ImageCaptioning,BLIP VQA,image to canny tools. https://github.com/rupeshs/visual-chatgpt/tree/add-colab-support

powderblock commented 1 year ago

This is cool & a great idea man! How do I run it on Google Colab?

rupeshs commented 1 year ago

@powderblock Thanks, simply checkout my reporepo https://github.com/rupeshs/visual-chatgpt/tree/add-colab-support , you can directly open it in colab

rsreetech commented 1 year ago

Great work

ajohansson-git commented 1 year ago

@rupeshs : Indeed, great work, given how quickly you put this up.

That said, I couldn't get it to work.

First I faced this error: ModuleNotFoundError: No module named 'ldm'

And after solving that by moving the nested ldm directory to the root directory, I get this: ModuleNotFoundError: No module named 'ControlNet'

Any thoughts?

rupeshs commented 1 year ago

Great work

@rsreetech Thank you

rupeshs commented 1 year ago

@ajohansson-git Thank you, I have updated colab notebook, it will fix ldm error, could you please check again?

riccitensor commented 1 year ago

The gradio app is loading and then responding that the API key is wrong (tested on many valid api keys). The key is certainly fine, since I am using it in multiple colabs. Any ideas?

sangeethkumar1997 commented 1 year ago

The gradio app is loading and then responding that the API key is wrong (tested on many valid api keys). The key is certainly fine, since I am using it in multiple colabs. Any ideas?

Even I am facing the same issue.

rupeshs commented 1 year ago

Are you using openAI free account API key? We need to use paid account API key.

sangeethkumar1997 commented 1 year ago

Are you using openAI free account API key? We need to use paid account API key.

I am using the paid one

rupeshs commented 1 year ago

@sangeethkumar1997 Creat a new API key then try. If you are using colab, please try my implementation it will work https://github.com/rupeshs/visual-chatgpt/tree/add-colab-support.

rupeshs commented 1 year ago

The gradio app is loading and then responding that the API key is wrong (tested on many valid api keys). The key is certainly fine, since I am using it in multiple colabs. Any ideas?

@riccitensor We need to use OpenAI paid API key, also create a new API key, and try.

riccitensor commented 1 year ago

Yes, I'm using the paid one. I've fixed the issue. For me, it was this:

Wrong: %env OPENAI_API_KEY="aaa" Right: %env OPENAI_API_KEY=aaa

riccitensor commented 1 year ago

@rupeshs Thanks for the colab.

fanyhchn commented 1 year ago

my colab not show the pic, what's wrong?

rupeshs commented 1 year ago

@fanyhchn I have quick fix for that see the pull request. https://github.com/microsoft/visual-chatgpt/pull/172

rupeshs commented 1 year ago

@fanyhchn You can use my latest colab it will work, (supports xformers and fp16 optimizations faster image generation) https://github.com/rupeshs/visual-chatgpt/tree/colab-xformers-support