Skip to content

Outpainting

David Sage edited this page Jun 18, 2026 · 5 revisions
Inpaint or Outpaint

Outpainting to Extend an Image

FooocusPlus can be used to make an image bigger - to extend it using Outpainting - in up to four directions at once. Unlike upscaling, Outpainting actually adds new content in each of the selected directions, based on the composition of the original image. This is a form of image regeneration and you actually press the Generate button to begin the process. Typically the new additions to the image will seamlessly blend with the original so that there is no indication where the transition occurs.

To begin the Outpainting process, click the Input Image checkbox below the main prompt field then select the Inpaint or Outpaint tab. Click on the Inpaint/Outpaint canvas to load the image that will be Outpainted.

This example image was created with the Default preset with the prompt "Filipino woman" using the Fooocus V2 Spellcasting Druid substyle. In this case I chose to guide the Outpainting process by specifying a main prompt, "Filipino woman, temple background", but prompting is optional.

For the most consistent results, select the preset and styles (including the V2 Substyle if applicable) that were used to create the original image.

Outpainting Four Directions 30%

Outpainting is All Directions

The first image was created by selecting all four directions for Outpainting. I ran a batch of four images for this test and in three of them the extensions built on the idea that the subject was walking deeper into the temple - but I was pleasantly surprised with the outcome in the image above which turned the composition on its head by showing the subject leaving the building.

The default behavior of the Outpainter is to extend the image in each selected direction by 30%. This relates to the limitations of SDXL base models, they were designed to produces images at a maximum resolution of about 1024x1024 pixels. Because Outpainting is actually a form of generation, the total area that is added should be no more than 100% of this value. If Outpainting occurs in all four directions the total generative area is four times 30% for a total of 120%. While this does exceed the design specification, typically the results are fine.

Outpainting Extension Bottom 30%

Fixed 30% Default Extension in One Direction

In this case the image was created by with the "Bottom" direction selected to make the image slightly taller and provide a slightly more complete view of the subject. The extension is still constrained to 30%, as it would be for all four directions.

Outpainting  Extension Bottom 100%

Variable Extension in One Direction

In FooocusPlus it was realized that if only Outpainting in one direction there was no reason to be constrained by a fixed 30% extension. The design limits of SDXL imaging would not be exceeded by even full extension of 100%. Or if extending in two directions the extension could potentially total 100%.

To enable this feature click on the Apply Variable Outpaint Extension checkbox located below the directional controls. A slider will appear for each selected direction. In the case of one selected direction the range of the slider is 20% to 100%. The image above was created with a 100% extension in the Bottom direction.

IMPORTANT: Variable Extension Not Available for Oversized Images!

To avoid disappointing distortions and potential out-of-memory errors, images that are already larger than 1,638,400 pixels in area - the equivalent of a 1280x1280 pixel image - cannot be used with Variable Extension. The checkbox will not be available.

As a workaround, the image could be extended using the default 30% extension or the image could be reduced in size with the Image Editor and then extended.

Outpainting Extension Top Bottom 50%

Variable Extension in Two Directions

For the image above the Top and Bottom directions were selected and each slider was set to 50%, the maximum value in this case. Incidentally, the two selected directions do not have to be opposites. For example, Right and Bottom could be the two selected directions.

Note that the range for each of the two sliders is 20% to 50%. The minimum value is 20% rather than the traditional fixed value of 30%. This is because of limitations with the Outpainting engine. If Outpainting in more than two directions with extensions of less than 30% then distortions can occur, including repeating patterns, smudging and banding. However, for two directions the minimum values can be somewhat relaxed.

Outpainting Extension Top Bottom 30%

Fixed 30% Default Extension in Two Directions

And for reference, the image above shows 30% extensions in the Top and Bottom directions.

Outpainting Extension Square

Variable Extension to Square an Image

There may be times when you have a perfect looking image, but it needs to be presented in a particular aspect ratio. Most commonly, that aspect ratio is 1:1, or square. The Variable Extension feature can be used to square almost any image, as follows:

  1. Determine the dimensions of the original image. This information can be found in the HTML log file or from the Image Metadata tab.

  2. In this example the source image was 1344x752 pixels, expressed as width by height. We need to make the vertical dimension 1344 pixels to make it square.

  3. To make any image square, always divide the bigger number by the smaller. In this case 1344/752 = 1.787234.

  4. Subtract one from the result: 1.78723 -1 = 0.787234.

  5. Convert this number to a percentage by multiplying by 100%: 78.7234%.

  6. Round the fractional percentage up to one decimal place: 78.8%.

  7. Assuming that we are going to extend the image downwards, select the Bottom direction.

  8. Enable the Apply Variable Outpaint Extension checkbox.

  9. Set the % Bottom Extension slider to 78.8%.

  10. For the best results, ensure you are using the original image's preset and styles.

  11. Enter a prompt if desired. In this example we used "Filipino woman, temple background".

  12. Press Generate.

  13. Choose the best image from the results.

Clone this wiki locally