Fooocus: Ultimate Guide to Creating Images and Characters
Introduction
The world of AI-driven image generation is bustling with powerful tools like DALL-E, Midjourney, and Stable Diffusion. DALL-E, developed by OpenAI, excels at creating detailed images from text inputs but requires a subscription and operates through ChatGPT. Midjourney, on the other hand, runs via Discord, which has its own limitations despite fostering a collaborative, artistic community.
Stable Diffusion stands out for its flexibility and open-source nature, allowing users full customization over the generative AI inference architecture. Supporting frameworks like Fooocus, Automatic1111 and ComfyUI provide robust interfaces for extensive control over the image generation process.
Fooocus simplifies this process further, offering an easy-to-use Gradio web UI that leverages Stable Diffusion XL models. This makes it accessible for beginners and convenient for advanced users. In this guide, I’ll take you from zero to hero with Fooocus, covering everything from download and setup to generating images and advanced tweaks, with specific use cases to maximize your experience. Whether you’re new to AI image generation or an experienced user, this guide will help you create stunning images and characters effortlessly.
Running Fooocus
To get started with Fooocus, head over to the Fooocus GitHub repository. The codebase and detailed installation steps are provided in the documentation.
1. Running Fooocus on Google Colab (Easiest Way)
The simplest way to run Fooocus is on Google Colab. Just follow this link and try it out using your Google account. Google Colab will provision free servers for you. Once you run the notebook, you should see the message:
App started successfully. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865 or https://xxxxx.gradio.live
You can click on the provided https://xxxxx.gradio.live URL to access the Gradio UI and start generating images.
2. Installing Fooocus Locally
To install Fooocus locally, follow the custom instructions provided in the documentation based on your operating system. Note that there is a minimum system specification required to run it effectively.
3. Using Docker
For advanced users, Fooocus can be run using Docker. The repository provides a Docker Compose file, which allows you to spin up a container to run Fooocus and its UI. This method is ideal for those who are comfortable with containerization and want a streamlined setup process.
By following these steps, you can start using Fooocus to create stunning images and characters effortlessly.
UI Walkthrough
Let’s walk through the Fooocus UI, where you’ll find several key terms and settings to familiarize yourself with:
- Model Preset: This setting determines which base model to use for image generation. Different models can produce varying styles and qualities of images, so selecting the appropriate model preset is crucial for achieving your desired results.
- Performance: This setting determines the number of steps required to generate the image. Each step corresponds to refining the image from static noise to a final, coherent output. More steps typically result in higher quality but take longer to process. Option “Quality” takes 60 steps while “Speed” takes only 30.
- Aspect Ratio: This specifies the aspect ratio of the generated image. For example, an aspect ratio of 1024x1024 is ideal for Instagram posts. Adjusting this setting ensures your image fits the desired format or platform.
- Image Number: This determines how many images will be generated in a single run. You can set it to generate multiple images at once, which is useful for comparing different variations and selecting the best one.
- Negative Prompt: This is a crucial setting for refining your image by specifying what you don’t want in the final output. For instance, if you’re aiming for a photorealistic image, you might include terms like “saturated,” “drawing,” and “illustration” in the negative prompt. For generating human images, you can use terms like “extra limbs,” “bad anatomy,” “deformed pupils,” “text,” “worst quality,” “JPEG artifacts,” “ugly,” “duplicate,” “morbid,” and “mutilated” to avoid undesirable features.
These settings allow you to fine-tune your image generation process, ensuring that Fooocus produces the best possible results tailored to your specific needs. In the next section, we’ll dive into the UI journey with images to guide you through each step.
Creating Images — The Workflow
UI Walkthrough
Here’s a step-by-step workflow for generating images with Fooocus:
- Prompts: Start by entering your prompt in the text box. Fooocus allows you to adjust the weight of certain prompts using brackets. For example,
(red dragon:1.4)
increases the emphasis on "red dragon" by 1.4 times. Single brackets increase the weight by 1.1, and double brackets by 1.21. This can be applied to both positive and negative prompts. For example, "I am (happy:1.5)". Fooocus uses Automatic1111’s reweighting algorithm, making it superior to ComfyUI for directly copying prompts from sources like Civitai. To use embeddings, format them as(embedding:file_name:1.1)
. - Performance: Select the performance level, which determines the number of steps the generation process will take. More steps generally result in higher quality images but take longer to generate.
- Aspect Ratio: Choose the aspect ratio for your image. For instance, a 1024x1024 aspect ratio is ideal for Instagram. This setting is handled in the UI rather than within the prompts.
- Style: Choose the style of your image. You can refer to the style comparison URL for all available styles. Multiple styles can be combined by selecting more than one checkbox.
- Model and Advanced Tabs: For beginners, it’s not necessary to delve into the Model and Advanced tabs. The default settings should suffice for most use cases.
- Generate: Once all settings are configured, click the “Generate” button and wait for your image to be created. The progress bar will show the steps being processed, and once completed, the generated image will appear.
By following these steps, you can start generating high-quality images and characters with Fooocus quickly and easily.