Run Fooocus on Google Colab

0𝕏koji
1 min readOct 24, 2023

What is Fooocus?

Fooocus is an image generating software (based on Gradio).

Fooocus is a rethinking of Stable Diffusion and Midjourney’s designs:

Learned from Stable Diffusion, the software is offline, open source, and free.

Learned from Midjourney, the manual tweaking is not needed, and users only need to focus on the prompts and images.

  1. Open Google Colab
  2. Install package
  3. Clone the repo
  4. Download a model from Civitai
    In this article, we will try to use ThinkDiffusionXL
    https://civitai.com/models/169868
  5. Run the Gradio
# download a package
!pip install pygit2==1.12.2
%cd /content

# clone the repo
!git clone https://github.com/lllyasviel/Fooocus.git
%cd /content/Fooocus
# download the model and store it into Fooocus/models/checkpoints
!wget https://civitai.com/api/download/models/190908 -O /content/Fooocus/models/checkpoints/thinkdiffusionxl_v10.safetensors
# run gradio
!cp colab_fix.txt user_path_config.txt
!python entry_with_update.py --preset realistic --share

Here is my Jupyter Notebook

If everything works, you will see something like below.

--

--

0𝕏koji

software engineer works for a Biotechnology Research startup in Brooklyn. #CreativeCoding #Art #IoT #MachineLearning #python #typescript #javascript #reactjs