Fooocus — A Free Open-Source Image Generation Tool (2024)

Fooocus — A Free Open-Source Image Generation Tool (1)

This article is a step-by-step guide, explaining and demonstrating how to add and use checkpoint models in Fooocus. Fooocus is a free to use and open-source artificial intelligence image generation desktop tool. Primarily this article will focus on how to find Stable Diffusion checkpoint models, for use in recreating a desired look to images.

A few weeks back I wrote an article on how to install and use Fooocus’ basic features. In that article, I included the following:

1. How to install Fooocus

2. How to use simple natural language prompts for image generation.

3. Compared images created with Fooocus to images created using DALL-E3 and Midjourney (using the same prompts).

4. How to apply styles.

5. How to edit images with inpainting (changing something in a generated image) and outpainting (increasing/expanding the area around the image).

(If you are new to Fooocus, I highly recommend that you read that first article. You can find the article here.)

Where the first article mainly describes setup and use of common features; this article will be more about exploring external resources for broadening the scope of your creations. Additionally, I’ll be comparing Automatic 1111 settings and how to apply them in Fooocus.

One of the really nice things about Fooocus is its ease of use, especially when compared with Automatic 1111. As mentioned in my previous article, Automatic 1111 is a very popular web user interface (webui) for using the Stable Diffusion artificial intelligence diffusion models for image generation. It has all the bells and whistles needed to provide the user with a tremendous amount of control over generated images and subsequent tweaking of those images. But that also introduces a steep learning curve, which makes entry difficult and intimidating to the casual or occasional user.

Enter Fooocus. Fooocus is also a webui that uses the same Stable Diffusion set of models to generate images, but the interface is simplified, and therefore, makes it easier and less intimidating for the non-power user. But that simplicity does not mean Fooocus is any less capable in the quality of the images it generates. It maintains many of the features and controls found in Automatic 1111, but in a more user-friendly format. It accomplishes this by automatically applying some of the parameters most commonly used.

For the benefit of users unfamiliar with Stable Diffusion’s terminology:

1. When I refer to a “model”, I’m talking about the base diffusion LLM models created by the company Stable Diffusion. These base models are LLMs from which an image can be generated (there are different iterations of base models with SDXL being the most recent release).

2. A “checkpoint model” is essentially a base Stable Diffusion model that has been trained to make it easier to produce images with a specific ascetic. As such, checkpoint models can be considered models from the standpoint that they get loaded to act in place of the standard base model.

3. A LoRA (low ranking adaptation), can be thought of as a “tweak” that gets applied to a base model or checkpoint model. LoRAs help to influence the output of an image in a specific way… much like a “style” does (to see how styles are applied in Fooocus, see my first article). Generally, styles tend to be more generic/broad and LoRAs tend to be very specific. An example might be training a LoRA which helps to apply a very specific facial expression to images. Applying a very specific attribute, reliably, would be very difficult just using prompting techniques. LoRAs are beyond the scope of this article, but they are something you will run across, and it is helpful to know what they are. And certainly, you should feel free to play around with them. They can be added to Fooocus, much like checkpoint models can.

  1. Show you where to find checkpoint models; and how to install and use them.
  2. Show you where to find sample images created by checkpoint models and how to create similar images.
  3. Explain Automatic 1111 image settings and how to apply those in Fooocus.
  4. Show a side-by-side comparison of the Automatic 1111 sample image and images created with Fooocus, using the same Stable Diffusion checkpoint model (an SDXL variant) and comparable settings.

The comparison will provide a good contrast between the two webuis and their settings. It will also help you understand the settings of image samples you wish to recreate.

When you start Fooocus, an SDXL checkpoint model will automatically be loaded (note that Fooocus only works with Stable Diffusion’s SDXL base model and checkpoint models created on that model).

When downloading and installing Fooocus, you will have access to three variations of Fooocus; one tuned to a generic checkpoint model; one tuned to an anime checkpoint model, and one tuned to a more photographic realism checkpoint model.

When opening the generic model (by double-clicking on the “run.bat” file found in the folder where you installed Fooocus), the “Juggernaut XL (juggernautXL_version6Rundiffusion.safetensors)” checkpoint model will be loaded. It is a great all-around model and does very well with realism.

When opening the realistic model (by double-clicking on “run_realistic.bat”), the “Realistic Stock Photo (realisticStockPhoto_v10.safetensors)” checkpoint will be loaded. This checkpoint model does a particularly good job of creating photorealistic images of people.

These are very capable checkpoints models for most use cases. But as you develop your skills and expand your interests, you may wish to create images that are a little more nuanced to a specific aesthetic. Then you can seek out other checkpoint models for your specific intent.

The “go-to” resource for checkpoint models (and LoRAs) is “CIVITAI.com”. It is free to create your own account and the site is a great resource for generating ideas and expanding your image creating skills.

Fooocus — A Free Open-Source Image Generation Tool (3)

1. To browse for checkpoint models: select the “Models” category beside the “Home” icon at the top of the page (see #1 in the image above).

2. To search for a specific model: select “Models” from the dropdown to the left of the Search field and enter the checkpoint model’s name you are looking for (#1).

3. Using the filter: Because Fooocus only works with the latest SDXL checkpoint models, I would suggest using the filter found in the upper right corner of the site (#2, filters appear after selecting “Models” tab beside the “Home” tab) and then selecting “Model types: Checkpoint” and “Base model: all the SDXL models listed” (#3).

Fooocus — A Free Open-Source Image Generation Tool (4)

If you filter for checkpoint models as described above, the only selections showing on the page are checkpoint models which will work with Fooocus. See something you like in the results?… click on the image and you will be brought to a page with a download icon for that checkpoint model (#1 below).

Scroll down on the page and you will see sample images created by the checkpoint model you have selected (#2).

Fooocus — A Free Open-Source Image Generation Tool (5)

You will now be taken to a page with the Automatic 1111 settings used to create the image. These particulars, such as the checkpoint model (#1 below), the prompt (#2), the negative prompt (#3), additional settings like the Sampler, CFG scale, Steps and Seeds, can also be seen (#4). These details are for creating images in Automatic 1111, or CivitAI’s own image generator. We can use these details to help us create a similar image in Fooocus.

Fooocus — A Free Open-Source Image Generation Tool (6)

You can copy the prompt and negative prompt that was used to create the image (#5), or you can opt to copy ALL the details (including the prompt and negative prompt) that went into creating the image by clicking the copy icon toward the bottom of the details (#6). I would recommend that you select this option and then save all these details to a word document for future reference.

Now we need to download the selected checkpoint model “Realism Engine SDXL” which was used to create this image.

1. This is the link to the image we will be recreating a likeness of: https://civitai.com/images/4398851. Before we leave this page, click the copy icon beside “Start Creating”. This will copy all the settings used to create the image, including the prompt and negative prompt (#6 in the above image) and paste into a document for use as we proceed.

2. Now click on the “CHECKPOINT” button at the top of the section “Resources Used” (#7 above) and this will bring you to the main page for the checkpoint, where you can download the model (https://civitai.com/models/152525/realism-engine-sdxl) Click on the download icon, which will then open a drop-down of the model. Select this dropdown to start the download (#1 below).

Fooocus — A Free Open-Source Image Generation Tool (7)

When prompted to save the download file, select the “checkpoints” folder within your Fooocus folder where you installed Fooocus (see the image below). For me, this is “G:\Fooocus\Fooocus_win64_2–1–791\Fooocus\models\checkpoints”.

Fooocus — A Free Open-Source Image Generation Tool (8)

Open Fooocus on your computer by double-clicking on any of the Fooocus versions you installed (“run.bat” or “run_realistic.bat”). Since we will be using the new checkpoint model you just downloaded, it doesn’t matter which Fooocus version you open.

After double-clicking to open Fooocus, Fooocus will check for updates. If you installed Fooocus previously, the command prompt will open and check for updates. Once this is completed, you will be prompted to “Select any key to continue…”, this will close the command prompt and you’ll need to double-click to open Fooocus again. This time the command prompt loads Fooocus and a local webpage will open in your default browser with the Fooocus webui.

Fooocus — A Free Open-Source Image Generation Tool (9)

Now let’s get to work creating our image.

First, we want to reference the settings we copied from the CivitAI image we liked. Here you can follow along by using the settings you copied from the image page earlier.

1. Prompt: amateur cellphone photography close up of a european woman, ginger hair, winter forest, natural skin texture, 24mm, 4k textures, soft cinematic light, RAW photo, intricate, elegant, sharp focus, (cinematic look), soothing tones, low contrast, dim colors, exposure blend, hdr, faded. f8.0, samsung galaxy, noise, jpeg artefacts, poor lighting, low light, underexposed, high contrast.

2. Negative prompt: (watermark:1.2), (text:1.2), (logo:1.2), (3d render:1.2), drawing, painting, crayon, nsfw, nude, naked, long neck, worst quality, bad quality, poor quality, blurry, zombie, ugly, cropped, out of frame, cartoon, animation, 3d render, illustration, anime, unreal, blender, sketch, watercolor

3. Model: RealismEngineSDXL_V2.0_FP16_VAE

4. Sampler: DPM++ SDE Karras

5. CFG scale: 5

6. Steps: 40

7. Seed: 963687574

1. Prompt: Copy the prompt and paste it into the prompt section at the bottom of the page (#1).

2. Now place a check in the box beside “Advanced” below the prompt field. This will open advanced options on the right (#2).

3. Make sure the “Setting” tab at the top of the right side is selected.

4. Steps: by selecting “Quality” (#3), you will be defaulting to 60 Steps. “Steps” refers to the number of iterations the diffusion process goes through to generate an image. Each step takes the current noisy version of the image and refines it a bit further, gradually bringing it closer to the image described in your prompt. (Note: generally, steps between 20 and 70 are used. Too few steps and the result will be underdeveloped and too many steps can cause the image to be overdeveloped. Since the “Speed” selection in Fooocus uses 30 steps and the image we are trying to create used 40 steps, I’m using the Quality setting which will iterate 60 steps.)

5. Select the Aspect Ratio of “832x1216” (#4). We could use any ratio, but this is more in keeping with the portrait mode of our sample image.

6. We can select how many images to create per generation. The default is “2” and we can leave it there.

7. Negative prompt: Now paste your negative prompt in the “Negative Prompt” field (#5). (Note: negative prompts are instructions to Fooocus describing things you do NOT want to see. Parentheses are used to increase weight of intent; so (text:1.2) means you are giving this negative prompt and additional weight of .2.)

8. Seed: Uncheck the box beside “Random” (#6) and this will open the field where you can enter the seed number. Paste your seed number in this field (#7). (Note: a seed number is used to control the randomness of the image generation and helps in recreating similar images.)

Fooocus — A Free Open-Source Image Generation Tool (10)

9. Now select the Model tab at the top of the right side.

10. Model: selecting the model tab opens the area where you can select the checkpoint model which you just downloaded. You do this by clicking on the dropdown found under “Base Model (SDXL only)” (#1 below) and selecting “realismEngineSDXL_v20VAE.safetensors” from the list of checkpoint models (#2). You can leave all the other settings as they are.

Fooocus — A Free Open-Source Image Generation Tool (11)

11. Finally, select the “Advanced” tab at the top of the right side (#1 below).

12. CFG scale: In Fooocus, the CFG scale is referred to as the “Guidance Scale”. This parameter controls the level of creative freedom the model has. A higher value allows for more drastic changes and unexpected results, while a lower value keeps the image closer to your prompt. Enter “5” per the prior image settings (#2).

13. You can leave the “Image Sharpness” setting at “2”. If you find the resulting image is too smooth, you can increase the sharpness number until you get to a result you like.

Fooocus — A Free Open-Source Image Generation Tool (12)

14. You can ignore the “Style” tab or uncheck the three default Fooocus styles that are selected by default. I didn’t see a difference, but you can experiment if you like.

Now we have entered all the settings which have an associated setting in Fooocus. (Note that there is a Sampler Setting in Fooocus, but it is currently under development. If you wish to play around with a sampler in Fooocus, you can do so by clicking the box beside “Developer Debug Mode” in the “Advanced” tab.)

1. Select the “Setting” tab at the top of the right-side column (#1 below). Although you can generate with any tab selected, there are more settings in this tab to tweak if you want to alter your results.

2. Click on the “Generate” button to the right of the prompt field (#2).

Fooocus — A Free Open-Source Image Generation Tool (13)

Here are the results:

Fooocus — A Free Open-Source Image Generation Tool (14)

And here are the two Fooocus images beside the Automatic 1111 generated image.

Fooocus — A Free Open-Source Image Generation Tool (15)

As you can see, the images generated by Fooocus are quite comparable to Automatic 1111. The Fooocus images are a bit more saturated, so I created two more images and reduced the “Quality” setting to the “Speed” setting. This has the effect of reducing the iteration steps from 60 to 30. The result is shown below. I believe the reduction of steps has helped reduce the saturation slightly.

Fooocus — A Free Open-Source Image Generation Tool (16)

Finally, if you like the results and wish to retain a record of the image and the settings used to create it, select the “History Log” link at the bottom of the right column in the “Setting” tab (#1).

Fooocus — A Free Open-Source Image Generation Tool (17)

Below is an example of what the history log looks like. You’ll be able to scroll through the generated images and copy the details to a clipboard for future use.

Fooocus — A Free Open-Source Image Generation Tool (18)

I hope you have enjoyed this article and found it useful. If you made it down to the bottom here, please like and follow. It helps get me motivated to do more articles like these. Thanks!

#fooocus, #imagegeneration, #stabledefusion, #automatic1111, #diffusionmodels

Fooocus — A Free Open-Source Image Generation Tool (2024)

References

Top Articles
Latest Posts
Article information

Author: Otha Schamberger

Last Updated:

Views: 6746

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Otha Schamberger

Birthday: 1999-08-15

Address: Suite 490 606 Hammes Ferry, Carterhaven, IL 62290

Phone: +8557035444877

Job: Forward IT Agent

Hobby: Fishing, Flying, Jewelry making, Digital arts, Sand art, Parkour, tabletop games

Introduction: My name is Otha Schamberger, I am a vast, good, healthy, cheerful, energetic, gorgeous, magnificent person who loves writing and wants to share my knowledge and understanding with you.