Fooocus WebUI with examples (A to Z Tutorial)

Fooocus full tutorial

When it comes to generating AI images using stable diffusion a new alternative has gained the popularity in the market and that is  Fooocus AI. With a not-so-complicated user interface, Fooocus AI provides somewhat similar functionalities as Automatic1111 and ComfyUI. 

Let's see all the functionalities of Fooocus and its options in detailed use-case examples. We have explained how choosing the option in wrong manner can make your image worse and shared tips and tricks to get the perfect output. But, for that first, you need to download and install Fooocus into your machine or Cloud.


Requirements:

1. 8GB RAM

2. Minimum 4GB GPU (more than 6GB recommended)

3. Nvidia RTX 3000/RTX 4000 series

4. Windows/Linux OS, (MAC runs it at a slower speed)


Functions of Fooocus AI:

We have listed all the functions which you need to know. All the functionalities have been covered in simple and easy way that anybody can grasp it. So, forget about those all complicated and bunch of options which really confused you in image generation.

1. Generating Image using prompt:

Image generation with easy UI is so simple. Lets see how you can do this.

Fooocus AI dashboard

1. When you come into its dashboard, you will see a large canvas where you can drag and drop the image you want to work on, or a new image will be generated when you feed your positive and negative prompts. 

At the bottom, a wide box will be available used for feeding the positive prompts. Quick simple, easy-to-use interface with minimal options.

2. Now, if you want to work on your image for modification like Inpainting, Upscaling, or Outpainting then at the most left corner a check box will be available "Input image" helps to load your image.

To work with advanced options then, a check box option "Advanced" also has been provided. If you check that box, a new option will open with multiple advanced options on the right side of the dashboard. 

3. At the top, there are three options:- 

(a) The speed option sets the minimal effects with optimized settings for the fastest image generation.

(b) Quality option used when a user wants to generate a quality image with lesser generation time.

(c) The Extreme speed option is for those who are professionals using powerful machines to generate the highest pixels of images.


FooocusAI aspect ratios for images

On the next, there are many aspect ratios, with direct pixel image size buttons for ease of use case have been provided. The first red section that we are showing is for portrait type, the next yellow colored for square type images, and the rest green colored section is for landscape type image generation.


FooocusAI set negative prompts and set of images

-Image Number: If you move to the next section, an Image Number option is there helps to set the number of images you want to generate at once when you hit the "Generate" button. It's like Midjourney by default generates 4 images and Dalle 2 images at a time.

Remember, the higher the value the longer time it will take to generate a batch of images and vice-versa.

-Negative Prompts: Again, beneath this another option Negative prompts used to input the prompts that you do not want into your generating image art like low quality, ugly, deformed, etc.

-Random: This option is for setting the seed value process used to generate the image process. When checking this option it gives you different randomly generated images. But, when you want similar effects uncheck will give more accurate results with the same prompt. This option works like a charm when you want to generate consistent images. 

FooocusAI copy history logs

-History Logs: This option is very helpful when you are working in a team, or for a community and want to share your generated settings with them. This helps to directly copy all the settings like Guidance scale, type of model used, Positive prompts, negative prompts, etc. which you have been using while generating an art.

FooocusAI predefined styles

Style tab: Foocus AI provides multiple image art style which are already designed by them so that with one click you can generate the same art with simple selection.



Fooocus AI set sdxl and lora models

Model tab:  You can choose your base models like Stable Diffusion XL 1.5, or Stable Diffusion Refiner. By default, Fooocus AI downloads and installs the Juggernaut model which is the pre-trained Stable Diffusion XL base model.

The Stable Diffusion Refiner model helps to generate more detailed images by adding high texture, clear edges, sharpness, etc.  But, today, SDXL models it's not really needed because these models have pre-added these features. 

Not only this, but you can also use multiple Lora (fined-tuned models) with different weights-enabled slider options. here, the weights slider decides how much LORA effect you want in your generated image. 

Fooocus AI set Guidance scale and sharpness

Advanced Tab

(a) Guidance scale also known as the prompt weight instructs the AI models with the prompt you feed to how closely the detailed influence you want for generating an image. It's like controlling the AI models for more sophisticated accurate results using the positive and negative prompts. 

A higher scale is used when you want professional results with detailed inputted prompts. It is recommended to work with a higher scale if you are a professional AI image creator.

(b) Image Sharpness helps to generate, sharp, clear edges with highly detailed images. Setting it to lower produces lower, blurred, smooth edges and vice-versa.


2. Upscaling concept:

Upscaling is a way to convert low resolution og images into higher resolution wihtout effecting the quality of the image. Fooocus has also the option to upscale the image in higher resolution of 1.5x, 2x and 2x (Fast) options. 

Uploading image to fooocus

First go to the downward section of Fooocus AI and check the box "Input Image". Then just upload the image you want to upscale. Now, choose any variation and press "Generate". 
For upscaling we have uploaded the Jennifer Lopez portrait image in 828 by 552 pixels. 

uploaded images on Fooocus
This is the uploaded image in 828 by 552 pixels.


output images on Fooocus
This is the generated output with 2x upscaling in 1656 by 1104 pixels.

And the result were quite satisfactory. The image has been up scaled to 2x and we got the image size of 1656 by 1104 pixels without effecting the subject.

wrong output images on Fooocus
Using the 1.5x up scalar the subject has been effected.

Here, this time AI model has not figured out the image correctly and the face of the subject has changed.


Lets try something like a screenshot and test that it can upscale the image and preserve the quality of text or not.

Upscaling with wrong output

So, here we have uploaded the screenshot of Kohya GUI(helpful for LoRA training) into Fooocus AI for upscaling and thought that we get the perfect output. But, after getting the result we were dissatisfied because the output was not up to the mark and text was gibberish. So, keep it mind while doing these types upscaling. 


3. Inpainting concept:

Inpainting is one of the well know way to remove or add objects from the subject in just a minute. When it comes to Fooocus, it provide a simple easy to use options so that you don't get panic and confused to from where to start. 

fooocus inpainting and outpainting settings

On the image canvas you can do inpainting or outpaining with bunch of options. On the right corner, undo button(to going to previous state), clearing brush (clears brush stroke), remove button(removes image from canvas), brush size slider(increase/decrease the brush size) are there for doing inpainting and outpainting.



Now, lets try inpainting.

uploading image for Inpainting on Fooocus

 Here, we want to add black sunglasses on the subject's face image. Select on the brush button to do the selection on the subject. Using selection select the target face like we have selected the eyes part where the sunglasses we want it to be. Then put the object name into the prompt box (in our case its black sunglasses) and just press "Generate".

generated image for Inpainting on Fooocus

You can see the result is very impressive. The black shades also looking realistic with shining effect. So, while targeting the actual part you must considered how much part you need the effect of the subject.

4. Outpaining concept:

When you want to change the background with respective to the subject of your image, then Outpainting is the most cool concept to do so. Fooocus also provides the way to do outpainting with simple handy tool like other WebUI like Automatic1111. Lets try this functionality as well.

Fooocus outpainting working process

Here, for Outpainting we uploaded the same image that we have earlier used for Inpainting. Now, lets say we want to add neon lights in the left background of the subject. 

Select the brush tool and cover the part you want to get influenced and then select the option for direction from "Outpaint Direction". Now, put your effect as prompt into the positive prompt box like we have added "neon lights" and click "Generate". 


Fooocus outpainting result

And here is the output. You will see neon lights has been added to the left of the actress's body. In the above results, you will observe that the subject's left sided hair also got effected. This happened because by mistake, we selected the hair while selecting the target area.

So, take it into mind to choose the area with precision while doing Inpainting or Outpainting.  


Conclusion:

Fooocus AI is getting a wide popularity when it comes to simplified WebUI. It provides all the basic and advanced features and options which an image generator wants to generate. Using one click one can create a wide varieties of images in few seconds.