Got this running on Colab

#410
by jduke99 - opened

Assuming you have a HuggingFace token (if not, get a token from your HF settings).

Follow these steps:

  1. Buy some credits on Google Colab. (https://colab.research.google.com/signup/pricing). I'd recommend 100 credits for 10 bucks.
  2. Load up this notebook on Colab - https://github.com/jduke99/DeepFloyd-Colab/blob/main/Deep_Floyd_from_HF_Spaces.ipynb
  3. Click Change Resource Type and upgrade to A100 for GPU.
  4. Login with your token
  5. On the final step, the output will give you a public URL, eg "Running on public URL: https://6e0ed50ea89cf3afdd.gradio.live"

Go there. Enjoy Deep Floyd again (for about 50 cents an hour).

Huge thank you to 1littlecoder's video at https://www.youtube.com/watch?v=pOf1f-Lcu5Y

"Login with your token"
This is some coding stuff isn't it. I'm a designer trying to run DeepFloyd... but this is haaard to do.

Vectr you're right lol, it's sort-of coding stuff. The notebook version is basically downloading the models from here automatically, so you provide your Huggingface personal token (which you get from your HF account settings).

I'm working on a Dockerized version though so it can be ran at about $0.25/hr instead of Collab (and without all the notebook dependency stuff)!

i tried to run this model on the free gpu on google colab and i got this error when i tried to run app.py

Traceback (most recent call last):
File "/content/IF/app.py", line 9, in
import shortuuid
ModuleNotFoundError: No module named 'shortuuid'

what could be the cause of this problem? could it be because I'm not running this on a paid gpu?

That’s weird. Did you run all the cells prior to this (eg install requirements.txt)? That library should not be affected by the GPU.

If you want to use the free tier and have lots of time to wait for your images to get produced, you can use this:

https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/deepfloyd_if_free_tier_google_colab.ipynb

The version I have posted will definitely not get to the finish line at the free tier.

Okay the latest diffusers library breaks this.

I will update the Colab. But for a quick fix. Go to requirements.txt and replace this:

git+https://github.com/huggingface/diffusers

with

diffusers==0.18.1

this worked, thanks a lot!

I bought google colab pro for this, and while it worked for steps from 27 to 50, I can't get it to work for 100-185 steps. the image generation gets to 100% and then it errors out for some reason, and the error message would just be "connection errored out" or something. Is this because of a time out timer? I can't really find anything in the code regarding timeouts

I've seen this issue sometimes as well. Generally the A100 seems to get it done in time.

What I can't find is documentation of how to change this timeout. According this document, there shouldn't be a timeout in queue mode. https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance

I'm making it all the way to the very second-last step (besides generating), and it's giving me this:

"Cannot access gated repo for url https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Access to model DeepFloyd/IF-I-XL-v1.0 is restricted and you are not in the authorized list. Visit https://huggingface.co/DeepFloyd/IF-I-XL-v1.0 to ask for access.."

I'm making it all the way to the very second-last step (besides generating), and it's giving me this:

"Cannot access gated repo for url https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Access to model DeepFloyd/IF-I-XL-v1.0 is restricted and you are not in the authorized list. Visit https://huggingface.co/DeepFloyd/IF-I-XL-v1.0 to ask for access.."

Cancel that, folks. If you run into this problem, visit the site it tells you to visit, and then you have to agree to some terms to gain access.

Sign up or log in to comment