Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lllyasviel/Fooocus/llms.txt

Use this file to discover all available pages before exploring further.

Fooocus’s Image Prompt feature lets you supply one or more reference images alongside your text prompt to guide the style, composition, or identity of the generated output. Rather than the standard SDXL IP-Adapter or Revision approach, Fooocus uses its own custom image prompt algorithm, which produces higher-quality results with better prompt understanding. Up to four image prompt slots are available simultaneously.

Accessing Image Prompts

Navigate to Input Image → Image Prompt tab. Each slot has:
  • An image upload area
  • A Type selector (the control mode)
  • A Stop At slider — how far through the diffusion process the control is applied
  • A Weight slider — how strongly the reference image influences the output

Control Types

Fooocus provides four control types, defined in the ip_list:

ImagePrompt

Type: ImagePromptThe default mode. Transfers the overall visual style, colors, and composition of the reference image to the generation. Best for stylistic reference or mood boards.Default stop: 0.5 · Default weight: 0.6

PyraCanny

Type: PyraCannyExtracts edge and structural information from the reference image using a pyramid Canny approach. Preserves the structural outline and shape of the reference while allowing style variation from the text prompt.Default stop: 0.5 · Default weight: 1.0

CPDS

Type: CPDSColor-Palette-Driven Style control. Captures the color distribution of the reference image and applies it to the output, useful for enforcing a specific palette without enforcing structure.Default stop: 0.5 · Default weight: 1.0

FaceSwap

Type: FaceSwapUses InsightFace to extract the facial identity from the reference image and apply it to generated faces. Useful for maintaining character consistency across multiple generations.Default stop: 0.9 · Default weight: 0.75

Default Parameters Reference

The table below lists the default Stop At and Weight values for each control type as configured in Fooocus’s flags.py:
Control TypeStop AtWeight
ImagePrompt0.50.6
FaceSwap0.90.75
PyraCanny0.51.0
CPDS0.51.0
Stop At controls at which step of the diffusion process the image prompt guidance ends. A higher value (closer to 1.0) applies guidance for longer, producing a stronger influence. Weight scales the overall strength of the control signal.

FaceSwap with InsightFace

The FaceSwap control type uses the InsightFace library to perform identity transfer. Upload a clear, front-facing portrait as the reference image. Fooocus extracts the facial embedding from the reference and injects it during generation so the output face matches the identity of the reference.
FaceSwap works best with high-resolution reference images that contain a single, clearly visible face. Obscured or side-profile faces may produce inconsistent results.

Combining Multiple Image Prompts

All four image prompt slots can be used simultaneously with different control types. For example, you can use PyraCanny in slot 1 to define the composition and ImagePrompt in slot 2 to set the style — both will be applied together during generation.
Image prompts can be mixed with other input modes. Enable mixing image prompt and vary/upscale or mixing image prompt and inpaint in the advanced settings to combine image prompts with upscaling, variation, or inpainting workflows.

Step-by-Step Example

1

Open the Image Prompt tab

Go to Input Image and click the Image Prompt tab.
2

Upload a reference image

Drag and drop or click to upload your reference image into one of the four slots.
3

Select a control type

Choose ImagePrompt, PyraCanny, CPDS, or FaceSwap from the Type dropdown for that slot.
4

Adjust Stop At and Weight

Fine-tune the influence using the sliders. Start with the defaults and adjust based on results.
5

Add your text prompt and generate

Enter your text prompt as usual and click Generate. The reference image will guide the output according to the selected control type.

Build docs developers (and LLMs) love