Sign In
Free GPU Fooocus XL CoLab

Not So Automatic1111

Ahh. Those innocent heady days of free Automatic1111 on Google Colabs. In my case it meant a much faster and more stable network connection for model downloading and access to equipment that was better and faster than my own. Oh and I did mention it was free, right? 🥲🥳

...and then one day you go and click the magic CoLab 'play' button and nothing but a load of errors. Some Find Fu moves let you discover "that due to the high processing demands of blah blah blah" this service HAS BEEN REMOVED 😠 😡 🤬

Access to Automatic1111 may have been removed but as I pleasantly discovered Fooocus runs great on CoLabs, with no real difference between paid and free accounts.

So what can I do with this newly discovered super power of free GPU (apart from check out Stoked Reality XL of course </shameless plug>)???

Dataset Batches

Well, as I have just discovered it is "theoretically" possible <shameless disclaimer> 😉 However I do not suggest you try this 😉 </shameless disclaimer> to generate large datasets for free.

Say you had several free GMail accounts with accompanying GDrive accounts. Then just run this simple CoLab (see attached files) and you can generate 32 images with one click PER account. Also, as the CoLab specs are all the same each batch of 32 takes roughly the same amount of time.

I am using Brave browser with each different Gmail user GDrive open in an "New Incognito Window". Each Incognito window is running Fooocus and generating batches of 32.

Watch those datasets grow.

I have always wanted to try the generalisation method with training so can now use this system to get datasets put together more quickly.

I hope some of you find this of use.

Just discovered I can't upload .ipynb to 'Attachments'. So I will just link the Colab from my account - just copy it to your GDrive first. Hit the Play button and off you go.

***Update***

CoLab been updated to download any XL model. Just copy and paste the desired model download link.

FOOOCUS COLAB >>> User Model & Fooocus on CoLab <<< CLICK HERE

I actually prefer some of the models without the Refiner, so if you want to turn off the Refiner (and speed up the generation process), you can find the dropdown menu option for this after you click on the "Advanced" box.

If you like what I do, buy Stoke a brew

4

Comments

aihonobono2023's Avatar

Dear Stoke, Thank you always for your helpful articles and programs. I tried using it immediately. It was my first time using Fooocus, but I found it easy to generate excellent images. Here is a post with the resulting creations. https://civitai.com/posts/608326 By the way, I would now like to try using other models, such as Stoked Reality XL, with this. How should I specify them? Currently, I understand it is set up as a standard configuration to download SD XL from the internet and use it. Should I create a folder for some model under /content/gdrive/MyDrive/Fooocus/StokedRealityXL/ and specify the path? I apologize for my lack of knowledge; your guidance would be greatly appreciated.

Show more
Stoke's Avatar

@aihonobono2023 I will be on colabs later tonight. The file that needs changed is launch.py. At first when I passed a non default model I got errors saying that the default model couldn't be found. So easiest just downloading it under the default name to bypass this.
If you can wait till later tonight I will post a CoLab that takes the model download URL from the user. Again it will still show as default model, but it will indeed be the model you pass.

As always a pleasure interacting with you.

Show more
Stoke's Avatar

@aihonobono2023 Give this a go and let me know how you get on:
https://colab.research.google.com/drive/1eIkDwfjJ55b2G9H1WdVFnXRZQhsBkzzi?usp=drive_link

aihonobono2023's Avatar

@Stoke Thank you very much. I am trying it out now. Since I live in Japan, I believe there might be a time difference. I might not be able to try it out at the ideal time. Nonetheless, I will post the results regardless.

Stoke's Avatar

@aihonobono2023 Excellent. I am just about to leave for an extra shift at work so that gives me something to look forward to.

aihonobono2023's Avatar

I have verified the operation of the new notebook. It appears to be in a state where I can enter the model's URL in the middle of the runtime, and it seems to be downloading and executing it as sd_xl_base. I have attached a screenshot for your confirmation. Thank you very much. https://civitai.com/posts/619686

Stoke's Avatar

@aihonobono2023 I kept the default filename as when I changed it to the User Downloaded model name it broke something. This was the easiest fix I thought. Glad you confirmed User model downloads. I use Fooocus quite a bit now.

Stoke's Avatar

@aihonobono2023 when you enter usermodel url it downloads usermodel.safetensors but renames it to sdxl-model.safetensors. Was an easy workaround to save me editing other code elsewhere.

aihonobono2023's Avatar

@Stoke Thank you for your comments. I also did some research on Fooocus. And I've just recently learned about the existence of Fooocus-MRE, so I am trying it out on Colab now. https://github.com/MoonRide303/Fooocus-MRE I attempted to set up the execution environment on Colab's Google Drive and see if I can select any model, but it didn't go very well. I will look into this a bit more.

Stoke's Avatar

@aihonobono2023 I have seen the repo for MRE on github and am aware that it is a more in depth version, however I have yet to try it out. Let me know how you get on with it. If I make a CoLab for it I will make sure it saves images to GDrive and you are able to change default model. Will post here if I get it done. 🫡

aihonobono2023's Avatar

@Stoke I am referring to the FOOOCUS COLAB notebook that you have shared here. After mounting Google Drive, I run the colab.ipynb located in Fooocus-MRE. https://colab.research.google.com/github/MoonRide303/Fooocus-MRE/blob/moonride-main/colab.ipynb Then, using a symbolic link, I ensure our images get saved to my GDrive.

aihonobono2023's Avatar

Following your example, I was able to install Fooocus-MRE by executing the code below after mounting the Google Drive. The basic functions are operating without issues, however, I am experiencing some trouble when including more than one wildcard in the prompt, as it causes errors.

%cd /content/gdrive/MyDrive/

!git clone https://github.com/MoonRide303/Fooocus-MRE.git

%cd Fooocus-MRE

!cp settings-no-refiner.json settings.json

!pip install pygit2==1.12.2

!python entry_with_update.py --share

Show more
Stoke's Avatar

@aihonobono2023 Oooh, jusy got the CoLab running and I like this. We will end up with a custom free GPU version, this I promise you friend. At very latest I am off work on Wed, Thurs and Fri every week so these are my productive days I can spend on computer.
Good night, I shall bother you no more just now 😌

aihonobono2023's Avatar

@Stoke Thank you for getting in touch. It’s wonderful that you are able to have productive time for three days a week. My days off are Saturday and Sunday. I, too, will gradually proceed with studying image generation and AI. I am also very much looking forward to our conversations. Good night

Stoke's Avatar

@aihonobono2023 If you are still around I finally got around to writing that colab. It works really well and you can use your own Checkpoint and LoRA files - named properly. Images also get saved to GDrive. If you are still interested then check it out:

https://colab.research.google.com/drive/1676ux7NfoQFYNeX6lUHyDe7igUpizZuz?usp=drive_link

Show more
aihonobono2023's Avatar

@Stoke Thank you very much for getting in touch with me. Having reviewed your code, I must say it is quite an impressive piece of work. Your efforts are truly commendable. Currently, it is functioning seamlessly in my environment. I plan to proceed with downloading the model and Lora shortly. I will be sure to keep you updated.

Harley11's Avatar

hey so im new here and ive just started useing fooocus colab and both when i downloaded it and did the link it would show up an error message, and wouldnt let me generate anymore and would just stop completly. have you run into this problem at all and if so how i can fix it?

aihonobono2023's Avatar

Hello, could you please share what error message you are seeing? Additionally, could you tell me more specifically what actions you were taking and at what point the error appears?

Harley11's Avatar

so i wish i would have taken a picture of it but i wasnt able to. but ya i was able to create a few pictures and then when i would try again it say error and wouldnt let me do anything else from there. the second time i ran into a problem it said i didnt have this http://www.nvidia.com/Download/index.aspx. so i downloaded it and it still said the same thing. do you possibly know how to fix that? cause i think this is the best platform at of all the ones ive tried.

aihonobono2023's Avatar

I suspect that because it was not working on Google Colab, you might have seen a message suggesting updating the NVIDIA graphics card drivers in your local environment. Could you please check if you have set up Google Colab to use a GPU? Keep in mind that the free tier might run out of resources quickly. For instructions on how to use Stable Diffusion on Google Colab, I recommend searching online for a guide.