Fooocus Tutorial: Simplified Stable Diffusion

It is aA free and open source AI image generator. It attempts to combine Stable Diffusion andAdvantages: open source, offline, free, easy to use. Fooocus optimizes the Stable Diffusion pipeline to provide excellent images. You can spend less time adjusting settings and more time creating the images you want.

In this article, we will introduce

  • Advantages and Disadvantages of Fooocus
  • How to Install Fooocus
  • Basic Usage
  • Setting the style
  • upgrade
  • Repair and Restoration
  • Using Image Hints

Advantages and Disadvantages of Fooocus

Fooocus Advantages:

  • Focus on Image Optimization: Fooocus focuses on providing the best image optimization, it uses various techniques to reduce image file size while maintaining high quality.
  • Multiple optimization options: Fooocus offers a wide range of optimization options, including lossy and lossless compression, resizing, cropping, and watermarking.
  • Batch Optimization: Fooocus allows users to batch optimize multiple images, saving time and increasing efficiency.
  • Easy to use: Fooocus has a user-friendly interface that even beginners can use it easily.
  • Optimized for Web and Mobile: Fooocus is optimized for web and mobile, ensuring images load quickly on all devices.
  • Support for multiple image formats: Fooocus supports various image formats, including JPEG, PNG, GIF, and WebP.
  • Cloud Hosting: Fooocus is a cloud-hosted service, so users don’t need to install or maintain any software.

Fooocus Cons:

  • Requires payment: Fooocus is a paid service, although it offers a free trial.
  • Limited image editing features: Fooocus focuses primarily on image optimization and does not offer advanced image editing features.
  • Dependency on Internet connection: Since Fooocus is a cloud-hosted service, it requires a stable Internet connection to use.
  • Slight loss of image quality: In some cases, lossy compression may result in a slight loss of image quality.
  • Technical issues may occur from time to time: Like any cloud service, Fooocus may occasionally experience technical issues.

How to Install Fooocus

Minimum system requirements

You need an Nvidia card with 8GB of VRAM. Other setups may also work.See minimum requirementsA complete list of

Windows

Please follow the steps below to install Fooocus on Windows.

  1. On this PageDownload the zip file.
  2. Place the zip file into the folder where you want to install Fooocus
  3. Right-click the zip file and selectExtract all...to extract the files.
Fooocus Tutorial: Simplified Stable Diffusion-1

double clickrun.batLaunch Fooocus.

It will download the model the first time you run it.

AMD GPUs, Mac, Linux, and Colab

You can also use AMD GPUs,Mac,LinuxandColabInstall Fooocus on .

Using Fooocus

Fooocus is super easy to use. In default mode, you enter the prompt and press"generate". (Ctrl+Enter on Windows. Cmd+Enter on Mac)

a dragon, snow, moon

Fooocus Tutorial: Simplified Stable Diffusion-2

It uses the default model, which isjuggernautXL, a fine-tunedStable Diffusion XLModel. It is a universal model that can produce various styles.

Quick Tips

You don’t need to write long and complicated hints like on popular image sharing sites. Fooocus will use a hint engine based on GPT-2Expand your tips.

For example, prompt:

Dragon, Snow, Moon

a dragon, snow, moon

Under the hood expands to the following prompt.

dragon, snow, moon, light, intricate, elegant, sharp focus, beautiful dynamic, highly detailed, very stylish, professional fine details, cinematic, dramatic environment, bright colors, perfect, warm colors, epic composition, striking, brave, attractive, elite, best, vivid, clear, coherent, advanced, creative, lovely, artistic, stylish, cool, gorgeous, awesome

a dragon, snow, moon, light, intricate, elegant, sharp focus, beautiful dynamic, highly detailed, very sleek, professional fine detail, cinematic, dramatic ambient bright colors, perfect, warm color, epic composition, striking, brave, attractive, elite, best, vivid, clear, coherent, advanced, creative, cute, artistic, trendy, cool, gorgeous, awesome

Advanced Settings

chooseadvancedCheckbox will display the advanced settings menu.

Fooocus Tutorial: Simplified Stable Diffusion-3

Performance Settings

True to its design philosophy, even advanced settings are easy to understand.

Performancepart.

  • speed: Well balanced, 30 sampling steps are performed.
  • quality: Perform twice as many sampling steps.
  • Extreme Speed:useLCM LoRAReduce sampling steps.

As expected from the setup,speedandqualityThe difference is not significant. For the SDXL model, there are diminishing returns for executing more than 30 steps.

Extreme SpeedThe setting produces lower quality images. This is expected for the LCM-LoRA model.

Below is a comparison of build times on a Windows system using an RTX4090 GPU card.

speed17.3 sec (1x)
quality25.2 seconds (1.5 times)
Extreme Speed10.4 seconds (0.6x)
Time to generate two 1024×1024 images.

I like the ease of use of the LCM-LoRA (Extreme Speed). Using LCM-LoRA in .NET requires changing the CFG scale and sampling step. And it is easy to forget. Fooocus solves all these problems with a single choice.

Aspect Ratio

Fooocus provides an extensive list of image sizes to choose from. Interestingly, there is no way to enter image sizes in the GUI.

Fooocus Tutorial: Simplified Stable Diffusion-7

There are many reasons why you might want to use a specific image size, such as compatibility with stable diffusion models and publishing requirements.

To add image resolutions to the list, typeFind the folder named Fooocus inconfig_modification_tutorial.txtfiles.

Fooocus Tutorial: Simplified Stable Diffusion-8

This is the configuration file config.txtTemplate.

config.txtRename toconfig.txt.original.

Copying Filesconfig_modification_tutorial.txtand rename it toconfig.txt.

Edit in a text editorconfig.txt (I use Notepad++).

Delete the explanatory note at the top.

Add the new resolution to the 'available_aspect_ratios' list. For example:

"available_aspect_ratios": [ "704*1408", "704*1344", "768*1344", "768*1280", "832*1216", "832*1152", "896*1152", "896*1088", "960*1088", "960*1024", "1024*1024", "1024*960", "1088*960", "1088*896", "1152*896", "1152*832", "1200*800", "1216*832", "1280*768", "1344*768", "1344*704", "1408*704", "1472*704", "1536*640", "1600*640", "1664*576", "1728*576" ],

Restart Fooocus and you should see the new resolution added.

Fooocus Tutorial: Simplified Stable Diffusion-9

style

In Fooocus, you don't needDesign Tipsto achieve a certain style. You can get there using the Style menu.

Lots of preset styles!You can find more information in the SDXL Style GuideYou can see many of them intuitively in the .

Fooocus Tutorial: Simplified Stable Diffusion-10

You can combine multiple styles. But many of them only work if the default style is not selected.

You can also addNegative Tipsto dial in the image. For example, add Black & White to the Negative Cue (in Settings > Negative Cue) to produce a color image.

Model

You can"Model"tabCheckpoint ModelandLoRA.

The model path can be found in the Fooocus folderconfig.txt.

Upgrading Images

To upgrade an image in Fooocus:

  1. chooseInput ImageCheck box.
  2. exist"Upscale" or "Variant", select the desiredHigh-end options.
  3. according togenerate.
Fooocus Tutorial: Simplified Stable Diffusion-16

Image changes

As with Midjourney's V1/V2/V3/V4 features, you can generate variations of your images.

  1. chooseInput ImageCheck box.
  2. exist"Upgrade" or "Change", select the desired"Variation" option.
  3. according togenerate.
Fooocus Tutorial: Simplified Stable Diffusion-17

The following are "subtle changes"and“The changes are strong”The options make a difference. There aren't that many of them.

NOTE: You can use additional seeds from AUTOMATIC1111Option to create image variants.

Image Tips

You can use images as additional hints.For example, AUTOMATIC1111But unlike AUTOMATIC1111, you don't need to install the extension. It's part of the basic functionality of Fooocus.

To use an image hint, selectInput ImageCheck box and selectImage Tipstab.

Upload an image to one of the image slots.

You may need to selectAdvanced checkbox to enable editing of more settings.

Image Tips

The default image hint options areImagePrompt.

Fooocus Tutorial: Simplified Stable Diffusion-21

If you have used AUTOMATIC1111ControlNet , these settings should look familiar.

  • Stop at: Stop the image prompt control at certain sampling steps. 0.5 means 30 sampling steps, stop after 15 steps.
  • Weight: The strength of the image hint control.

Increasing any of these can enhance the effect of the image cues.

Usage Tips:

a chair that resembles a cat

Changing weights in image hints

Pira Canni

PyraCannyIt is a pyramid-based Canny edge control method. The high resolution of SDXL images may cause the standard Canny algorithm to miss some details. This method detects edges in layers at multiple resolutions.

Like Canny ControlNetUse PyraCanny to replicate compositions or human poses.

Swift:

A woman

Upload an image and select PyraCanny.

Fooocus Tutorial: Simplified Stable Diffusion-25

CPDS

CPDSIt is a depth-based structure detection method. It replicates the 3D composition of the image, but not the lines.Depth ControlNetSimilarly, it changes the image more.

See the CPDS example below. It copies the composition but not the facial details, such as the hairstyle and the direction she is looking.

Face Swap

Face Swap is like theIP Adapter Face. It copies the face in the reference image.

Here is an example. The prompt is:

a woman praying

Multiple image prompts

and ControlNet in AUTOMATIC1111Likewise, you can use multiple image prompts in Fooocus.

Let's use a two image promptAn example to illustrate:

  • FaceSwap – Weight 0.5, Stop at 0.9: Duplicate the face.
  • PyraCanny – Weight 0.5, Stop at 0.5: Copy the pose.
Fooocus Tutorial: Simplified Stable Diffusion-31
Fooocus Tutorial: Simplified Stable Diffusion-32

When using multiple image cues, you will generally want to set the weights low. Otherwise, you may see artifacts such as strange colors.

PyraCannyDoes a good job of replicating the pose. The lower weight and stops make the controls looser. It helps create a different background.

FaceSwapDoes a good job of replicating the face. You can get a stronger effect by adding weight and stopping.

repair

repairwill regenerate part of the input image. This is very easy in Fooocus.

examineInput Imageand selectRepair or fix.

Upload the image you want to repair.

Use the Brush tool to mask the areas you want to regenerate.

Fooocus Tutorial: Simplified Stable Diffusion-33

This is a result.

improvedetailThe method keeps the input image more or less the same, but improves the fine details.

RevisecontentMethod allows you to modify the mask area by hinting. It is similar to inpainting with high denoising strength.

Additional tips for repair:

a woman with sunglasses

Additional Screen

Additional ScreenExpands an image in one or more directions.

examineInput Imageand selectRepair or fix.

Upload the image you want to repair.

exist"method"From the drop-down menu, select"Repair" or "Repair" (default).

Select the desiredOutpaint Direction.

Fooocus Tutorial: Simplified Stable Diffusion-38

Below is an example of drawing an image in landscape orientation.

Fooocus Tutorial: Simplified Stable Diffusion-34
Fooocus Tutorial: Simplified Stable Diffusion-39

describe

Input ImageIndescribeThe function guesses the image hint. It is similar to the Ask CLIP button in AUTOMATIC1111.

Upload the image to"describe"tab, then pressDescribe this image in a hint.

The guess will appear in the hint box.

Fooocus Tutorial: Simplified Stable Diffusion-40

Share models with AUTOMATIC1111

If you have installedAUTOMATIC1111or other stable diffusion GUIs, you may want to share models between them to save disk space.

This can be done by editing theconfig.txt file to complete.At the top of the file you can modify "path_checkpoints", "path_loras", etc. to point to the existing location of your model.

Alternatives to Fooocus

You may consider the following alternatives:

  • AUTOMATIC1111: The most versatile stable diffusion GUI. The de facto standard.
  • SD.Next: AUTOMATIC1111ofA more curated version. Many pre-installedEssential extension.
  • ComfyUI: A node-based GUI for stable diffusion. The learning curve is a bit steep, but understanding it will go a long way.

Fooocus and Midjourney

Midjourneyis a popular and proprietary AI image generator. You can use stable diffusion tocopyMany features midway.

Fooocus is designed toMidjourney ofIf you like the simplicity of MidJourney, you might also like Fooocus. Midjourney is a I would say Fooocus has a better user interface.

See the difference between Fooocus and MidjourneyFeature Comparison.

Thoughts on Fooocus

I am Stable Diffusion, Midjourney andI have always appreciated the infinite adjustability of the stable diffusion, the quality of the mid-range, and how accurately the DALLE follows its cues.

Fooocus fills the gap of simplicity and ease of use.

Sometimes I hesitate to use Midjourney because it’s a hassle to deal with the Discord interface. Adjusting prompts and settings is a bit difficult.

Fooocus attempts to provide a middle-of-the-road experience, with the added advantage of being locally-run, uncensored, and free. As a bonus, it has a well-designed GUI!

I'll use Fooocus to quickly get high-quality images, such as the cover image for this post.

5/5 - (1 vote)

Leave a Reply

Your email address will not be published. Required fields are marked *