How to use SD 1.5 model in Fooocus

Imagine you’ve been actively using Fooocus and stumble upon news of an exceptional model. Eager to explore its capabilities, you visit a model-sharing website and download it. After downloading, you carefully place the file into the designated checkpoint directory. With a sense of anticipation, you then proceed to select this new model from the ‘Base Model’ dropdown list in Fooocus:

Note: beautifulRealistic_brav5 is used as an example.

Then you hit ‘Generate,’ but, to your surprise, no image is generated. To find out what’s going on, you check the console, where an error message prominently displays on the screen:

NotImplementedError: You have selected base model other than SDXL. This is not supported yet.

You figure out that the model you tried to use is an SD 1.5 model, which, turns out, isn’t compatible with Fooocus to be used as a base model. So, what now? Is there a workaround? Absolutely, and that’s exactly what this tutorial is all about. Let’s dive in and get it sorted out.

Steps

Here is the trick. As you may have known, Fooocus allows you to optionally use the second model to finish the image generation process. This is called a Refiner. Fooocus only allows SDXL models to start the generation process but you can use SD 1.5 model as a refiner. Let’s go over the steps to learn how to use an SD 1.5 model as a refiner. We will be using beautifulRealistic_brav5 as an example in this tutorial but feel free to use any SD 1.5 model that you like. Here are the steps:

  • Check the Advanced checkbox below the text prompt
  • Select the Model tab on the right
  • For Base Model (SDXL only), select juggernautXL_version6Rundiffusion.safetensors
  • For Refiner (SDXL or SD 1.5), select beautifulRealistic_brav5.safetensors
  • For Refiner Switch At, select 0.4. As shown in the UI, Fooocus developers’ recommendation is “Use 0.4 for SD1.5 realistic models; or 0.667 for SD1.5 anime models; or 0.8 for XL-refiners; or any value for switching two SDXL models.” We will be showing examples images generated with other switch-at values later in this tutorial.

Now press generate and pay close attention to the generation screen as you can see that the image switch in the middle. Here is the result:

Here is the full version of the image. Even if you have never used beautifulRealistic_brav5.safetensors, you can definitely tell that the image looks different from the one that is generated by juggernaut without a refiner.

Generation parameters
{
"Prompt": "25-year-old woman in a red sweater standing by a tree, beautiful fall color in the background, sunset",
"Negative Prompt": "",
"Fooocus V2 Expansion": "25-year-old woman in a red sweater standing by a tree, beautiful fall color in the background, sunset, gorgeous deep light, striking, highly detailed, pretty, open formal, expressive, charming, very delicate, friendly, glowing, sublime, cool, extremely coherent, sharp focus, colorful, incredible detail, bright colors, amazing, elegant, intricate, fantastic",
"Styles": "['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp']",
"Performance": "Speed",
"Resolution": "(1152, 896)",
"Sharpness": 2,
"Guidance Scale": 4,
"ADM Guidance": "(1.5, 0.8, 0.3)",
"Base Model": "juggernautXL_version6Rundiffusion.safetensors",
"Refiner Model": "beautifulRealistic_brav5.safetensors",
"Refiner Switch": 0.4,
"Sampler": "dpmpp_2m_sde_gpu",
"Scheduler": "karras",
"Seed": 1618171476771602471,
"LoRA 1": "sd_xl_offset_example-lora_1.0.safetensors : 0.1",
"Version": "v2.1.864"
}

Shown below is the result of generation with different switch-at values. None is the result without using the refiner.

As you can see, images with different switch-at values than 0.4 do not show inferior image quality in terms of noise or distortion. Therefore It is worth experimenting with different switch-at values if you do not get the result that you want at the recommended switch-at value. Here is another example of using AnythingV5Ink which is a popular SD 1.5 model as a refiner. Switch-at value was set to 0.667 as recommended:

Generation parameters
{
"Prompt": "Upper body, A beautiful female college student in a blouse, a jacket, trousers, smiling, reading a book in the library, tall bookshelves, bright sunlight coming through a large window, beautiful morning, looking at the viewer",
"Negative Prompt": "",
"Fooocus V2 Expansion": "",
"Styles": "['SAI Anime']",
"Performance": "Speed",
"Resolution": "(1152, 896)",
"Sharpness": 2,
"Guidance Scale": 4,
"ADM Guidance": "(1.5, 0.8, 0.3)",
"Base Model": "bluePencilXL_v050.safetensors",
"Refiner Model": "AnythingV5Ink_ink.safetensors",
"Refiner Switch": 0.667,
"Sampler": "dpmpp_2m_sde_gpu",
"Scheduler": "karras",
"Seed": 2453743668968337752,
"LoRA 1": "sd_xl_offset_example-lora_1.0.safetensors : 0.1",
"Version": "v2.1.864"
}

With this feature, you’re no longer limited to just SDXL models. Instead, you can explore the extensive collection of SD 1.5 models, which could be really handy for bringing your artistic visions to life.

4 thoughts on “How to use SD 1.5 model in Fooocus”

  1. I m using SD fooocus in colab, and i have the following error, when I try to use a refiner
    [Fooocus] Loading models …
    model_type EPS
    UNet ADM Dimension 0
    could u recommend me something ?

    1. Hi,
      I have a few questions:
      1. What refiner model are you using?
      I think you might want to check to make sure that the refiner model exists under /content/Fooocus/models/checkpoints/
      2. Do you see a line: “Refiner model loaded:” after the log message you posted?
      3. What do you see on the Fooocus browser tab?

      Their readme says: “Note that this Colab will disable refiner by default because Colab free’s resources are relatively limited (and some “big” features like image prompt may cause free-tier Colab to disconnect). We make sure that basic text-to-image is always working on free-tier Colab.”
      but I just ran Fooocus on Colab and was able to generate images using DreamShaper_8_pruned.safetensors.

Leave a Comment

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