Advanced Features

Unlock the full potential of Fooocus with these advanced features and techniques. This guide covers expert-level functionality for power users who want maximum control over their image generation workflow.

Wildcards

Wildcards are a powerful feature that allows you to add randomness and variation to your prompts. They're perfect for generating multiple variations or adding controlled randomness.

Basic Wildcard Syntax

Use double underscores to create wildcards: __wildcard_name__

Example: A __color__ flower in a __location__
Result: Randomly selects from color.txt and location.txt files

Creating Wildcard Files

Wildcards are defined in text files located in the wildcards directory. Each line in the file represents one option:

wildcards/color.txt:
red
blue
green
yellow
purple

Nested Wildcards

Wildcards can contain other wildcards, creating complex nested structures:

Example: A __color__ __flower_type__ in __location__
Result: Combines multiple wildcards for complex variations

Ordered vs Random Selection

By default, wildcards select randomly. You can configure ordered selection in your configuration files.

Advanced Wildcard Techniques

Learn more about wildcards in our documentation.

LoRAs (Low-Rank Adaptations)

LoRAs are small model files that modify the base model to achieve specific styles, characters, or effects. Fooocus supports both inline LoRAs in prompts and LoRA presets.

Inline LoRA Syntax

Use LoRAs directly in your prompts with this syntax:

<lora:lora_name:strength>
Example: A beautiful landscape <lora:anime_style:0.8>

Where strength is a value between 0.0 and 2.0 (default is 1.0).

Multiple LoRAs

You can use multiple LoRAs in a single prompt:

Example: A character <lora:character_lora:1.0> <lora:style_lora:0.7>

LoRA Presets

Create LoRA presets in your configuration to quickly apply common LoRA combinations. This is especially useful for consistent styling across multiple generations.

Finding LoRAs

Popular sources for LoRAs include:

Inpainting

Inpainting allows you to edit specific parts of an image while keeping the rest unchanged. This is perfect for fixing details, removing unwanted elements, or adding new features.

How Inpainting Works

  1. Load or generate a base image
  2. Select the area you want to modify (mask)
  3. Enter a prompt describing what should appear in that area
  4. Generate to create the inpainted result

Inpainting Techniques

Best Practices

  • Keep prompts focused on the masked area
  • Use appropriate inpainting models for better results
  • Adjust strength based on how much change you want
  • Iterate with multiple passes for complex edits

Upscaling

Fooocus includes powerful upscaling capabilities to enhance your generated images to higher resolutions.

Upscaling Methods

Fooocus supports multiple upscaling algorithms:

Upscaling Workflow

  1. Generate your base image at standard resolution
  2. Select the upscaling method
  3. Choose upscale factor (2x, 4x, etc.)
  4. Process the image

Tips for Best Results

Prompt Engineering

Mastering prompt engineering is key to getting the best results from Fooocus. Here are advanced techniques:

Prompt Structure

Effective prompts follow a structure:

[Subject] [Action/Pose] [Style] [Quality Modifiers] [Negative Elements]

Example:

A majestic eagle soaring over mountains, photorealistic, 
high detail, 8k, professional photography, sharp focus
--neg: blurry, low quality, artifacts

Weighting and Emphasis

Use parentheses to emphasize elements:

Negative Prompts

Negative prompts help avoid unwanted elements. Use --neg: prefix:

Beautiful landscape --neg: people, buildings, text, watermark

Style Keywords

Common style keywords that work well:

Array Processing

Arrays allow you to generate multiple variations efficiently by processing multiple values in a single prompt.

Array Syntax

[[value1, value2, value3]]

Example:

[[red, green, blue]] flower
Result: Generates 3 images, one for each color

Multiple Arrays

You can use multiple arrays in one prompt:

[[red, blue]] [[flower, tree]] in garden
Result: Generates 4 images (2 colors × 2 subjects)

Arrays with LoRAs

Arrays work with inline LoRAs:

[[<lora:style1:1.0>, <lora:style2:1.0>]] landscape

Refiner Models

Refiner models enhance the quality of generated images by adding fine details and improving overall coherence.

Using Refiners

Fooocus supports automatic refiner integration. The refiner processes the image after the base model generation, adding:

Refiner Configuration

Configure refiner settings in your config file or through command-line options. Adjust:

Performance Optimization

Optimize Fooocus for your hardware with these advanced techniques:

Memory Management

Speed Optimization

Quality vs Speed

Balance quality and speed based on your needs:

Command-Line Options

Advanced users can control Fooocus through command-line options:

Option Description
--port Set the web server port
--listen Listen on all network interfaces
--share Create a public Gradio share link
--always-low-vram Always use low VRAM mode
--always-offload-from-vram Offload models from VRAM when not in use
--preset Load a preset configuration

See documentation for complete CLI reference.

Advanced Workflows

Combine multiple features for powerful workflows:

Iterative Refinement

  1. Generate base image with general prompt
  2. Use inpainting to refine specific areas
  3. Apply upscaling for final resolution
  4. Use img2img for final adjustments

Style Consistency

Batch Generation

Related Resources

Documentation

Complete technical reference and API documentation.

Read Docs →

Customization

Learn how to customize Fooocus for your workflow.

Customize →

Community

Share techniques and learn from other advanced users.

Join Community →