Skip to main content

Run Fooocus in Jupyter Notebook

Overview

Fooocus is an open-source image generating model.

In this tutorial, you'll run Fooocus in a Jupyter Notebook and then launch the Gradio-based interface to generate images.

Time to complete: ~5 minutes

Prerequisites

The minimal requirement to run Fooocus is:

  • 4GB Nvidia GPU memory (4GB VRAM)
  • 8GB system memory (8GB RAM)

RunPod infrastructure

  1. Select Pods and choose + GPU Pod.
  2. Choose a GPU instance with at least 4GB VRAM and 8GB RAM by selecting Deploy.
  3. Search for a template that includes Jupyter Notebook and select Deploy.
    • Select RunPod Pytorch 2.
    • Ensure Start Jupyter Notebook is selected.
  4. Select Choose and then Deploy.

Run the notebook

  1. Select Connect to Jupyter Lab.
  2. In the Jupyter Lab file browser, select File > New > Notebook.
  3. In the first cell, paste the following and then run the Notebook.

!pip install pygit2==1.12.2
!pip install opencv-python==4.9.0.80
%cd /workspace
!git clone https://github.com/lllyasviel/Fooocus.git
%cd /workspace/Fooocus
!python entry_with_update.py --share

Launch UI

Look for the line:


App started successful. Use the app with ....

And select the link.

Explore the model

Explore and run the model.