Run Fooocus on the cloud

Taaha Saleem Bajwa
4 min readDec 21, 2023

--

Fooocus is an image generation software inspired by Stable Diffusion and Midjourney.

It incorporates the best aspects of both:

  • like Stable Diffusion, it is offline, open source, and free.
  • From Midjourney, it adopts the ease of use, eliminating the need for manual adjustments.

Users can forget all those difficult technical parameters, and just enjoy the interaction between human and computer to “explore new mediums of thought and expanding the imaginative powers of the human species”

If you don’t have a powerful GPU, you can use the cloud to run Fooocus. At $0.36 per hour, it’s quite affordable, and you can turn off your machine after use.

In this tutorial, I will show you how to run Fooocus on the cloud.

Setting up the machine

The first part is setting up your machine. If you have a good GPU (>6 GB VRAM) then you can use your own machine.

However, Most of us dont have enough compute in our laptops to run these massive models. But fear not, We will run our interface on the cloud (at quite affordable pricing of course).

  • Now lets choose a machine to deploy. I would recommend a machine with 20 GB VRAM GPU. At the time of writing, this should cost you anywhere between 0.36–0.44 $/hr. Also as this pricing is On-Demand, you dont need to keep your pod running continously. You only pay for when the pod is running. You can stop your pod whenever you want and start it up again with the previous configurations whenever you again feel like. Here we choose a machine with RTX A4500. Simply click on deploy.
  • This will take you to a new window. Here we will stick with the default options as shown in the picture. Click on continue.
  • This takes you to final confirmation page. Click on deploy.
  • Within a few minutes, your pod is up and running.
  • Now click on the Connect button. This will display the following. Click on Start Web Terminal.
  • Click Connect to Web Terminal
  • This will open a new window. This is the terminal of our deployed machine.

Setting up Fooocus on your machine

We will use Fooocus to make our AI Influencer. Now we will set up fooocus on our machine.

Type the following commands in terminal

git clone https://github.com/lllyasviel/Fooocus.git
cd Fooocus
pip install -r requirements_versions.txt
python3 entry_with_update.py --share

The last command will start the gradio interface. look for the Public URL in the terminal

Click on the url and it will open another window with Fooocus interface (deployed on cloud).

Now, you are free to experiment with generating various images. The only limit is your imagination.

One done, click on stop button (square shaped button) to pause your pod. For pause pod you will be charged a negligible amount (0.006 $ /hr). Anytime you want to use Fooocus again, simply start the pod and use the second and fourth commands (cd and entry_with_update) to open fooocus again.

So this was it. I hoped you found this article helpful. let me Know in the comments. Want to keep me inspired, Buy me a coffee

About the Author

Medium | Github | LinkedIn | Website

--

--