Why does Fooocus seem to refuse to generate anime images? – A New User’s Guide

This post is for a new user who just started using Fooocus and cannot get Fooocus to generate anime images. We will be using Google Colab as an example, but the solution for the local environment is the same.

Steps to troubleshoot

If you are using a Google Colab notebook (https://colab.research.google.com/github/lllyasviel/Fooocus/blob/main/fooocus_colab.ipynb) that is listed on the Fooocus project’s main page (https://github.com/lllyasviel/Fooocus), chances are the you have a problem in generating anime images sometimes unless you modify the code and run the cell. For example, if you type: 25-year-old woman, wearing a heavy winter coat, jeans in the prompt field, set SAI Anime on the Style tab, you still get realistic images like below:

Note: To show the Style tab, select Advanced at the bottom.

To find out what’s going on, let’s click the Model tab.

Under Base Model (SDXL only), you’ll see juggernautXL_v8Rundiffusion.safetensors.

The problem is that this model does not generate an anime image sometimes. Therefore, you need to switch to a different model that can generate anime images. However, if you are running in Colab, unless you have manually installed another model, you only have one model available. So what can you do?

Here is how to solve this problem. Go back to the Colab tab on your browser, and scroll all the way up to the very first cell. You should see something like this:

Now stop the cell, and replace the last line with

!python entry_with_update.py --preset anime --share

and start the cell by pressing the play button.

If you pay attention to the output in Colab, you should see something like below:

Downloading: "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/animaPencilXL_v100.safetensors" to /content/Fooocus/models/checkpoints/animaPencilXL_v100.safetensors

Note that this model name may change, but it’s OK as long as you started Fooocus with the --preset anime option.

Once you see the URL to access Fooocus, go to the Fooocus page. Enter same prompt, set Style to SAI Anime, and press Generate. This time it should work. If you go to the Model page, you can see that an anime model is now used (animaPencilXL_v100.safetensors as of this writing).

Leave a Comment

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