Skip to content
zero01101 edited this page Aug 31, 2023 · 84 revisions

openOutpaint Usage Manual

Current against: v.20230831.x

Nearly universal controls

Shortcut Key Description Tool Image
[D] Dream (txt2img) tool keyboard shortcut
[I] img2img tool keyboard shortcut
[M] mask brush tool keyboard shortcut
[C] color brush tool keyboard shortcut
[S] marquee select tool keyboard shortcut
[U] image stamp/upload tool keyboard shortcut
[N] interrogate tool keyboard shortcut
[DEL] Clears painted/brushed masks
[CTRL]+[Z] Undo last action (same as History Palette "undo" button)
[CTRL]+[Y] Redo last action (same as History Palette "redo" button)
{mouse scrollwheel} Changes the size of the cursor reticle/mask brush - text changes to "brush size" for brushed tools

Requirements

As we rely on AUTOMATIC1111 webUI for all Stable Diffusion operations, openOutpaint carries largely identical requirements to A1111 webUI. An RTX-series GPU is recommended. You will also need a Stable Diffusion model specifically aware of inpainting. RunwayML's 1.5 inpainting model and StabilityAI's 2.0 inpainting model are strongly recommended for base usage - the ControlNet in/outpainting extension functionality allows you to use ANY SD1.x model, inpainting or not.

webUI Launch Script / COMMANDLINE_ARGS

openOutpaint relies on the API exposed optionally by AUTOMATIC1111 webUI. To enable the API, you'll need to modify your webui-user.bat or webui-user.sh file in your A1111 webUI installation directory. Open the script appropriate to your operating system in any text editor, and locate the line containing COMMANDLINE_ARGS. If the script has commented the line out using a # character at the beginning of the line, remove that character to uncomment the line (e.g. webui-user.sh). Add the --api and --cors-allow-origins=http://127.0.0.1:3456 flags (replacing the address in cors-allow-origins to match any difference on your local environment, such as a changed port or entirely different IP address if using A1111/openOutpaint over a LAN.)

Example modifications:

webui-user.sh webui-user.bat

The flag --gradio-debug disables the API routes necessary for image generation and using it is incompatible with openOutpaint. Please remove it from your COMMANDLINE_ARGS before using openOutpaint, if applicable.

openOutpaint Launch Script

openOutpaint comes with a very simple launch script for Windows (openOutpaint.bat) and Linux/Mac (openOutpaint.sh). Once A1111's webUI has been launched and is available in your browser, you can run the appropriate openOutpaint launch script to spin up a minimal Python webserver, hosting openOutpaint on your localhost address on port 3456. You can alter the openOutpaint launch script to change the port if desired.

The Windows launch script explicitly binds openOutpaint to address 0.0.0.0 to avoid inadvertantly binding to an IPv6 address.

AUTOMATIC1111 webUI Extension

openOutpaint is now available as a native A1111 extension directly from within webUI. Simply open the "Extensions" tab, open the "Available" subtab, and click the "Load From" button with the default index URL value. openOutpaint should appear in the list of available extensions you can install directly into webUI. Doing so will allow you to remove the --cors-allow-origins flag from your webui-user launch script, but does still require the --api flag to be set. You can also enable the --lock-oo-submodule flag to prevent the extension from updating the main openOutpaint component as of d903006 in the event that you wish to checkout and use a particular revision.

Main Interface

The primary interface of openOutpaint is the canvas identified by the grey checkerboard pattern, and is generally interacted with using the reticle (also called bounding box or cursor) shown as the white square displaying the current tool state and pixel size.

The dark green background color indicates the end of the canvas and dreamed/stamped images cannot be placed here.

"Camera controls" are accessed by holding the [CTRL] key and the mouse scrollwheel (or equivalent touchpad gesture). Scrolling the wheel will zoom into and out of the canvas, and holding the wheel button in and dragging will pan the canvas. You can also use [CTRL]+left-click to drag the canvas if you don't have a physical scrollwheel.

The individual floating tool windows are discussed in greater detail below. All floating tool windows can be dragged and positioned wherever you'd like.

Slider controls can be single-clicked to turn them into a text input field if you'd rather enter a precise value manually.

Select controls feature text-searching if you'd rather just start typing the value you know you'd like.

Buttons in the context menus operate like toggle switches or checkboxes. Icons are generally white if disabled, or purple if enabled, except for the invert mask button.

Expandable Canvas

If you find yourself running out of room on your canvas, you can easily expand it effectively infinitely with the "arrow" buttons found on each border of the canvas and the dark green background. Clicking the arrow will request confirmation and input for how many pixels you'd like to expand the canvas. You can also hold [CTRL] and click to expand the default or last-used pixel amount without the confirmation. Canvas expansion is not an undoable action.

Reticle

Rest state (synced/congruent) Rest state (undersize/sharpen) Rest state (oversize/blur) Operation in progress Unfocused/Settings Menu in use

The reticle will turn a shade of soft blue when "unfocused" and you're interacting with a setting or option, for example changing your prompt. You can simply click on the canvas to "refocus" the reticle which will return it to a white color.

The reticle will leave behind a trail of marching ants whenever a time-consuming operation is being performed.

Right-clicking will clear the content of the layer directly beneath the reticle. This is an undoable option.

While a dream is in progress, the estimated completion is displayed at the top by way of completed percent, estimated seconds remaining, and a simple progress bar. The Interrupt button will halt the dream at its current state.

When the dream completes, a set of new controls is displayed:

Some of these controls have shortcuts - mouse shortcuts will only function while the cursor is inside the dreamed region, which will turn the dream border red.

The controls and available shortcuts are detailed as follows:

Button Description Keyboard Shortcut Mouse Shortcut
< Previous Image/Decrement Image Index [] (scroll down)
X/Y (index) Displays which image in batch you're currently viewing. Click this button to return to image 0 (unchanged or empty space).
> Next Image/Increment Image Index [] (scroll up)
+ Request an additional batch of images [+] (middle click)
- Remove the currently displayed image from the batch [-] (right click)
Y Approve the currently displayed image [] (left click)
N Reject the entire batch of images [ESC]
R Save the currently displayed image as a stampable resource
S Save a copy of the currently displayed image (within the marching ants boundary box) to your computer
U Use the currently displayed image's seed for future dreams (hover over the button to view the seed)
* Marks the currently displayed image as a favorite - hold [SHIFT] to only view favorited dreams while scrolling around results. [*]

Favorited images will be displayed with an asterisk in the X/Y (index) button.

openOutpaint Window

Main

Gear

  • Clicking the Gear Icon on the title bar will open a modal window where you can modify various settings. Options with textbox inputs require a refresh to apply.

  • Canvas Size: sets the size of the paintable canvas in pixels; defaults to 2048x2048
  • Max Steps: sets the maximum value of the SD settings "steps" slider; defaults to 70
  • CFG minmax: sets the minimum and maximum of classifier-free guidance scaling range. Defaults to min 1, max 30
    • You can set a negative value in the min field, but it breaks the slider. You can still manually type in a value, however. I don't know if that's a bug or just "well don't do that".
  • Lie to HRfix: since openOutpaint expects an image that fills the reticle, and HRfix now expects an initial resolution and an upscaling factor, this option divides the bounding box resolution by the value set in Stable Diffusion settings -> HRfix Scale, and sends that new divided value to the API as the "desired resolution", along with the scale factor. Defaults to enabled
    • For example, a 1024x1024 reticle with HRfix scale factor set to 2 will send the API a request for a 512x512 image, upscaled 2x. openOutpaint will then receive an image of 1024x1024 in response.
    • A 512x512 reticle with the HRfix scale factor mistakenly left on 4 will send the API a request for a 128x128 image, upscaled 4x. This will almost undoubtedly look horrible.
    • An upscaling factor of 1x will will result in no change to the resolution, but it does... something to the image, and it's generally unpleasant.
  • New Layer per Dream: automatically creates a new layer for each dream or img2img operation performed if enabled
  • Smooth Rendering: controls the CSS image-rendering property if your browser supports it. See MDN for further information.
  • + Button Updates Prompt: if disabled, the [+] button will use the same prompt values that the original dream request featured. Enabling this option re-inspects the prompt fields each time [+] is clicked
  • Jumpt to 1st New on +: if enabled, jumps to the first new image returned from webUI after [+] is clicked instead of remaining on the image currently being considered

  • The Workspaces section at the very top of the main menu options allows you to save/load/import/export sessions, including layers, history, canvas size, etc. Think of it like a savestate or snapshot of your current progress. After making any change to the Default empty canvas, clicking the "save workspace" button will present an input dialog for the new workspace's save name, which leaves the Default worksppace unaffected.

    • Clicking the "..." button presents additional options. Left-to-right:

      • Save Workspace
      • Rename Workspace
      • Show/Hide additional options
      • Export Workspace
      • Import Workspace
      • Delete Workspace (unavailable on Default)

  • The Host input is where you can change the value of your A1111 webUI's local address. The indicator on the side will flyout with a connection status if hovered over, and clicking on the status indicator will force a connection status check.

    connected disconnected API not enabled CORS issue
    • If using openOutpaint as a webUI extension, modifying the host field will be disabled by default, and the value will be automatically set with the address used to access webUI:
    • You can double-click the disabled field to force-enable editing, and will be prompted to confirm:

Prompts

  • Prompt fields will expand after being clicked to give you more room to type. The reticle will turn blue while the prompt inputs are active. You can return to normal reticle operation by simply clicking on the canvas or outside of a prompt input.

  • The Prompt (top, green, + icon) field is where you prompt SD for your desired output. Defaults to ocean floor scientific expedition, underwater wildlife

  • The Negative Prompt (middle, red, - icon) field is where you enter negative details undesirable in your output. Defaults to people, person, humans, human, divers, diver, glitch, error, text, watermark, bad quality, blurry

  • The Styles selector (bottom, purple, bookshelf icon) allows you to optionally choose styles defined in styles.csv from your A1111 webUI installation. The list of these is updated when openOutpaint is started or refreshed. You can choose multiple styles to be applied by clicking as many styles as desired, or select "None" to have no prompted styling applied. You can also type in the field to search for a certain style.

  • The large blue button on the right-hand side is the prompt history panel. It keeps a local history of the prompts you've used this session, listed in positive/negative/style cells that can be clicked to quickly apply to the applicable prompt input. Prompt history is not saved between sessions.

Stable Diffusion Settings

Most of the following fields are common to Stable Diffusion inherently and some understanding of how they operate is assumed.

  • The Model selector allows you to choose a SD model/checkpoint. The list of these is updated when openOutpaint is started or refreshed. The model will be highlighted in green if "inpainting" is detected in the file name, or red if not. This is genuinely how A1111 webUI determines inpainting models too. Not kidding, seriously.

    • The Refresh Models button to the right of the selector will request an updated list of models from A1111 webUI in the event that they've changed; e.g. you've just made a new checkpoint merge.
  • The Sampler selector allows you to choose your preferred SD sampler. The list of these is updated when openOutpaint is started or refreshed.

  • The Seed input allows you to set the seed value or leave it randomized. Defaults to -1

  • The Lora selector allows you to choose one (or more) loras to apply to your prompt. This is exceptionally remedial and simply adds the appropriate <lora:loraname:strength> syntax to the prompt for each lora selected, with a default strength of 1.

  • The Enable Refiner checkbox does as it says and adds the refiner options to the request, as well as enabling the related options:

    • Refiner Model: select a refiner model to switch to
    • Refiner Switch At: set the percentage at which point in the diffusion stage the refiner is passed the noisy latents

HRfix

HRfix has a few caveats when being used with openOutpaint or even with inpainting models in general, including but not limited to the following:

  • latent scalers don't work at all with inpainting models, and return unusably glitchy output with "portrait" non-square aspect ratios
  • non-square output aspect ratios don't work at all with inpainting models and simply crash with a torch runtime error regarding tensor dimension size mismatches.
  • openOutpaint can't exactly do bonkers things like firstpass 256x1024, resize to 1280x640 and probably never will
  • versions of webUI prior to ef27a18 use an entirely different implementation and openOutpaint will fallback to a reduced functionality set (simply provide half the reticle's width/height as firstpass dimensions) to allow for some compatibility with outdated installations of webUI.

With that in mind, if you're trying to do something particularly complex requiring HRfix, it's probably going to be best served within the webUI txt2img interface directly as there's no in/outpainting involved in the first place, and then using the "send to openOutpaint" button to continue with the output from there (if using the extension). If you're going to make use of the HRfix functions within openOutpaint, you may wish to swap to a non-inpainting model temporarily. Using the API's override-settings to specify a firstpass model is being considered for convenience, but has led to unexpected behavior due to it swapping back to the previous model before upscaling.

  • The Apply txt2img HRfix option will enable the Hires. Fix option exposed in A1111's txt2img interface. This will simply ask Stable Diffusion to upscale the image by the value set in HRfix Scale, unless the Lie to HRfix settings option is enabled - this option divides the bounding box resolution by the value set in Stable Diffusion settings -> HRfix Scale, and sends that new divided value to the API as the "desired resolution", along with the scale factor. Intended primarily for generating in resolutions greater than what the currently in-use model was trained on. See here for more info.

  • The Square Firstpass Aspect enforces the firstpass size is a square aspect ratio and uses the larger of the width or height as the value. Very useful with HRfix Autoscale Lock Px. This option is unavailable if Apply txt2img HRfix is not enabled.

  • The HRfix Scale slider sets the upscaling factor for the dream, or the division factor for the requested resolution from Stable Diffusion if Lie to HRfix is enabled, so the output resolution matches the size of the reticle. This option is unavailable if Apply txt2img HRfix is not enabled.

  • The HRfix Autoscale Lock Px. slider will try to set the most precise upscaling factor for your image, enforced between 1.0 and 4.0, while respecting the specified pixel size in the slider. Disable by setting to 0. Range between 0-1024, steps every 256, but will accept any manually entered integer. This option is unavailable if Apply txt2img HRfix is not enabled.

    • Example: with Lie to HRfix enabled, HRfix Autoscale Lock Px. set to 512, and reticle size of 1472x640

      • 1472 / 512 = 2.875
      • 640 / 512 = 1.25
      • 2.875 > 1.25
      • HRfix Scale automatically set to 2.9 (slider value rounds)
      • 1472 / 2.875 = 512
      • 640 / 2.875 = 222.609
      • openOutpaint sets requested firstpass resolution to 512x222 (math.floor)

      We genuinely, strongly recommend lying to HRfix. It won't mind.

  • The HRfix Steps slider allows you to set a different number of steps for the second pass. If set to zero, uses the number of steps specified in the regular Steps slider. This option is unavailable if Apply txt2img HRfix is not enabled.

  • The Choose HRfix Upscaler allows you to select your desired upscaler to use with HRfix. This option is unavailable if Apply txt2img HRfix is not enabled.

  • The HR Denoising slider allows you to set the denoising strength applied to the HRfix upscaler. This option is unavailable if Apply txt2img HRfix is not enabled.


  • The Restore Faces option applies face restoration based on the parameters set in A1111 webUI if enabled.

  • The Sync cursor size option enforces parity between the Resolution slider in the Stable Diffusion settings and the Cursor Size sliders on the Dream and Img2Img tools when enabled. If disabled, the mouse scrollwheel will only affect the cursor size; Stable Diffusion's render settings become decoupled, allowing you to request a higher-resolution render in a small region as a sort of "alternative full-res inpainting" for example. If you've got incongruent reticle and render resolutions, the resolution indicators inside the reticle will display a smaller value for the mismatched render resolution, and color the reticle resolution green (if smaller than render resolution, resulting in a sharper output) or red (if larger, resulting in blurrier output) as shown above. See here for further information and demonstration of decoupled resoultion and reticle size. Defaults to enabled

  • The Resolution slider controls the size of the Stable Diffusion resolution. Defaults to 512 and affects both width and height.

  • The Steps slider controls the sampling steps for the dream request. Defaults to 30

  • The CFG Scale slider adjusts the classifier-free guidance value for the dream request. Defaults to 7

  • The Batch Size slider adjusts how many images are dreamed in a single batch and is strongly dependent on your available VRAM. Defaults to 2

  • The Iterations slider adjusts how many batches are performed sequentially. Defaults to 2

  • The Mask blur input sets the mask_blur value for any img2img API requests. Defaults to 0

Extensions

  • The Dynamic Prompts checkbox simply enables/disables the Dynamic Prompts extension if enabled, allowing for its syntax in prompt fields.
  • The ControlNet In/Outpainting checkbox enables a few options for using ControlNet inpaint models:
    • Inpaint Preprocessor: Allows you to select which of the preprocessors to use - only displays those with inpaint in the title
    • Model: Allows you to select which installed model to use - only displays those with inpaint in the title
    • Inpaint Mode: Allows you to select which control mode to use - balanced, +prompt ("My prompt is more important"), and +cn ("ControlNet is more important")
    • Resize Mode: Allows you to select which resize mode to use - resize ("Just Resize"), +crop ("Crop and Resize"), and +fill ("Resize and Fill")
  • If you have >=2 ControlNet units enabled in your A1111 webUI settings, enabling the Reference as 1st CN Unit checkbox will move the inpainting module to unit 2 and enable "Reference Only" as model 1, and exposes the following options:
    • Reference Preprocessor: Allows you to select which of the preprocessors to use - only displays those with reference in the title
    • Reference Fidelity: Allows you to set your preferred style fidelity ratio - only applies in "balanced" reference mode
    • Reference Mode: Allows you to select which control mode to use - balanced, +prompt ("My prompt is more important"), and +cn ("ControlNet is more important")

ControlNet In/Outpainting is enormously powerful and allows you to not only use non-inpainting models with openOutpaint easily, but also supports promptless in/outpainting.
Example videos using non-inpainting checkpoints and promptless operation:

Please see (a, b, c) for further details regarding ControlNet operation.

The Reference as 1st CN Unit is kind of weirdly not useful, as generally an unrelated image would be supplied to the reference preprocessors to try and drive output to look more similar to what was provided, and in openOutpaint it simply sends the contents under the reticle as that reference image, which i guess might be handy if your img2img denoise is really high and you want to at least keep the same color scheme?

Save/Upscaling

  • The Save Canvas button will export the current state of your canvas, cropping to the boundaries of the dream.

  • The Choose Upscaler selector allows you to choose a preferred output upscaler.

  • The Upscale X slider allows you to set how much upscaling is performed. Defaults to 2

  • The Upscale (might take a sec) button is not lying. This begins the upscaling process and downloads the resultant output when it's complete, and will most certainly take a bit to process through.

  • The Clear Canvas button operates as it claims and will clear out your canvas to a blank state. It does not delete existing layers, however.

Debug Info

You can see the values of your mouse position and the different values used for grid snapping and canvas offsets here, as well as any actively held mouse button. This is primarily useful for development purposes and won't be much use to end users.

  • The Reset to Defaults button will remove all locally-stored values and reset openOutpaint to a "factory default" state, and will run like it's the first time you've ever opened the page upon refresh.

  • The Toggle Debug button may not be visible by default depending on the branch you're using or state of the project. This button shows some centering targets and exports image and mask pairs for debug purposes.

  • The version number and link simply take you to the openOutpaint Github repo.

  • The User Manual link takes you to this document.

Context Menu

The contents of this section change dependent on the tool being used. Each tool will have a context menu detail section relevant to its use.

Common toggle buttons found in context menus:

Snap to Grid Invert Mask Preserve Brushed Masks Keep Unmasked Remove ("carve") Background/Identical Pixels
enabled
disabled

You can also hover your mouse over the buttons for a tooltip.

History Palette

This is a simple but functional history log. You can freely undo previous options and redo them with the buttons at the bottom of the palette window, the keyboard shortcuts, or simply clicking on a specific history entry in the log. The Scroll icon in the title bar will download a log of your session activity.

Note in the example image, step 6 is currently highlighted. Steps 7 and 8 are now considered in a "future" state, and any modifications to history at this point will negate their existence. For example, if a dream was placed and accepted on the canvas at this state, the history palette would change to the following and the two future-state "color brush draw" events are lost forever:

Layers Palette

Dream canvas layers can be managed here. Layer use is optional but strongly recommended particularly for color sketch work.

The top-right icon on the title bar will reset the canvas zoom to 1x in the event you've zoomed in or out.

Each layer (except the default bottom layer) has a trash can icon to delete the layer, and an eye icon to enable/disable layer visibility.

You can double-click a layer title to rename it if desired.

The controls on the bottom of the palette are as follows:

Control Description
New Layer Adds a new layer to the top of the stack
Move Layer Up Moves the currently selected layer up one rung in the stack
Move Layer Down Moves the currently selected layer down one rung in the stack
Merge Layer Down Merges the currently selected layer with the layer directly below it in the stack
Delete Layer Deletes the currently selected layer

Script

The Script functionality is currently a bit experimental and minimally functional, and thus is somewhat "hidden" behind a hotkey ([~]). There are a few built-in scripts (Loopback, Prompt Matrix, and X/Y/Z Plot) and a slot for a user-defined custom script which will be saved to localstorage.

  • The Script Name field must contain the name as it is displayed within A1111 webUI.
  • The Script Args field content must be encapsulated in square brackets and formatted properly, and defaults to empty square brackets if no localstorage value is found.
    • Integers/Floats must be passed bare, but floats must contain a leading zero if the value is less than 1. (e.g. 3.756 or 0.2, but not .2)
    • Bools must be passed bare and in lowercase (i.e. true or false)
    • Strings/Enums must be encapsulated in double-quotes (e.g. "value")
    • Int/Float ranges must be encapsulated in double quotes (e.g. "0.1-2.5", "2-12 [6]")

Built-in scripts can have the arguments list hovered over to display hints about the parameter order and accepted values, as well as default values applied.

  • Built-in scripts cannot have their name changed, and they do not save user changes to default values to localstorage; however, your settings should persist for the duration of your current session.

Using a custom script generally requires you to inspect the script's .py file to understand the parameters it expects. Let's look at prompt_matrix.py as an example to see how it's set up.

  • First, take note of the title definition
  • Enter it as shown into the Script Name field
  • Next, take note of the run definiton paying attention to the values and the order in which they're expected after the self and p arguments, as well as the ui definition to determine the type of paramter values expected.
    • The first two values, put_at_start and different_seeds, are Checkboxes in webUI which translates into a bool for API purposes.
    • The next two values, prompt_type and variations_delimiter are string enums which only accept the values as shown in the gr.Radio(["value1", "valueX"]) arguments.
    • The last value, margin_size, is an int which accepts any value between the listed minimum and maximum values.
  • Armed with this knowledge, fill in the Script Args field with your desired values for the parameters.
  • Uh oh.
  • Seems we've made a mistake. Let's inspect the A1111 webUI console.
  • "Dash" isn't an accepted parameter for the "variations_delimiter". Correct that to either of the listed values in the arguments defined in the script's Python source.
  • That's better... i think?
  • You can of course then scroll through the resultant individual images as desired like usual.

Scripts are, as mentioned, still a work-in-progress and may not be perfectly stable or function as expected like they do in webUI natively. Please feel free to open a new issue for any problems discovered.

Toolbox

Dream

The bread-and-butter tool of openOutpaint, used for txt2img on blank space, outpainting, and masked inpainting.

  • Click on an empty area of the canvas to request a new dream (equivalent to txt2img)
  • Including a section of the previously generated image will begin the outpainting process, dreaming new details against the context of the existing image

This tool will generate white marching ants while an active dream processing operation is in progress.

You can queue as many dreams to be processed as you'd like. Queued dreams can be canceled before processing, and their unprocessed regions are displayed in blue marching ants.

You can also drag an arbitrary reticle to create a custom region dream. You may need to enable the HRfix option depending on the size of your region. Once the rectangle is drawn, left-click while the cursor is inside the region (the border will turn red) to confirm the region, or right-click anywhere to cancel the custom reticle.

Dream Context Menu

Please see the general context menu section for common context icon information.

  • Cursor Size: adjusts the openOutpaint reticle size (and Stable Diffusion resolution if Sync cursor size is enabled).
  • Snap to Grid: enables or disables grid snapping for reticle placement
  • Invert Mask: enables or disables A1111 mask inversion - red masks have their contents mutated, while blue masks have their contents preserved. See here for further details.
  • Preserve Brushed Masks: if enabled, prevents masks drawn on the image from being automatically removed after the dream is generated.
  • Keep Unmasked: mainly useful for unsynced resolution/cursor size scenarios with cursor sizes much larger than the render resolution, to increase inference knowledge of surrounding area - however, this brought the side effect of lowering the resolution of the entire targeted region, as Stable Diffusion was, in essence, working with an image downscaled to the resolution slider value, regardless of the cursor size. This option employs replacement of unmasked pixels with the original resolution content after dream completion. See here for more context and information.
  • Remove Identical/BG Pixels: if enabled, attempts to remove pixels in generated dreams that are identical (or as close as determined by parameters) from the existing content within the reticle. This is somewhat janky and experimental.
  • Keep Unmasked Blur: sets the pixel width of a Gaussian blur over the border of mask brushed inpaint regions and surrounding unmasked dream. Only available if "Keep Unmasked" is enabled.
  • BG Remove Blur: sets the pixel width of a Gaussian blur over the "background" image content. Only available if "Remove Identical/BG Pixels" is enabled.
  • BG Remove Threshold: sets the minimul RGB channel value delta to remove "identical" pixels from generated dreams. Only available if "Remove Identical/BG Pixels" is enabled.
  • Outpaint Type: allows you to set the img2img type applied to outpainting, separately from the type applied to inpainting. "Original" is strongly suggested to be avoided for outpainting. Example using default openOutpaint prompts, DDIM, 30 steps, seed 2346, runwayML inpainting 1.5, CFG 7, outpainting vertically for 192px:
    initial image fill original latent noise latent nothing
  • Overmask Px: Possibly better described as "edge feathering", programmatically adds x pixels of semi-random mask blotching over image boundary edges to attempt to increase coherence and camouflage seams - please see this discussion for further information.
  • Generate-ahead count: contiunually generates dreams (quantity limited by the slider value) after the initial generation batch so you can conveniently browse a constant firehose of output. See here and here for context and discussion.

Img2Img

This tool allows for img2img functionality against existing dreams.

By default, the invert mask option is enabled the first time you select this tool. With this option enabled, you can use the img2img tool without having applied any mask to the image being modified and simply click on top of existing dreams to mutate them. If this option is disabled, img2img will only apply against masked content.

Note that including "empty" (transparent) space within an img2img reticle target will result in flat black. Generally, the Img2Img tool is not recommended for outpainting use.

This tool will generate white marching ants while an operation is in progress.

Just like the Dream tool, you can queue as many instances as you'd like, and draw arbitrary reticle rectangle regions.

PROTIP: try leaving your prompt completely empty, enable "Invert Mask", and use img2img over an existing dream section to get "variations" of the existing content

Img2Img Context Menu

Please see the general context menu section for common context icon information.

  • Cursor Size: adjusts the openOutpaint reticle size
  • Snap to Grid: enables or disables grid snapping for reticle placement
  • Invert Mask: enables or disables A1111 mask inversion - red masks have their contents mutated, while blue masks have their contents preserved. See here for further details. Defaults to enabled upon first launch of the tool to allow use without manual masking.
    • If you are using img2img over a color brush sketch with "affect mask" enabled, disable this option.
  • Preserve Brushed Masks: if enabled, prevents masks drawn on the image from being automatically removed after the dream is generated.
  • Keep Unmasked: mainly useful for unsynced resolution/cursor size scenarios with cursor sizes much larger than the render resolution, to increase inference knowledge of surrounding area - however, this brought the side effect of lowering the resolution of the entire targeted region, as Stable Diffusion was, in essence, working with an image downscaled to the resolution slider value, regardless of the cursor size. This option employs replacement of unmasked pixels with the original resolution content after dream completion. See here for more context and information.
  • Remove Identical/BG Pixels: if enabled, attempts to remove pixels in generated dreams that are identical (or as close as determined by parameters) from the existing content within the reticle. This is somewhat janky and experimental.
  • Keep Unmasked Blur: sets the pixel width of a Gaussian blur over the border of mask brushed inpaint regions and surrounding unmasked dream. Only available if "Keep Unmasked" is enabled.
  • BG Remove Blur: sets the pixel width of a Gaussian blur over the "background" image content. Only available if "Remove Identical/BG Pixels" is enabled.
  • BG Remove Threshold: sets the minimul RGB channel value delta to remove "identical" pixels from generated dreams. Only available if "Remove Identical/BG Pixels" is enabled.
  • Inpaint Type: allows you to set the img2img type applied to inpainting. "Original" is suggested for inpainting. Example using default openOutpaint prompts, DDIM, 30 steps, seed 9865, runwayML inpainting 1.5, CFG 7, denoising .7, border mask gradient enabled, keep border size 64:
    initial image and mask fill original latent noise latent nothing
  • Denoising Strength: sets the A1111 img2img denoising strength value
  • iP2P Image CFG Scale: if you have the Instruct-Pix2Pix model loaded, this parameter sets the "Image CFG Scale" value in webUI's img2img tab. If the Instruct-Pix2Pix model is not being used, this slider should not have any affect whatsoever.
  • Inpaint Full Resolution: enables or disables A1111 full resolution "only masked area" inpainting - see here for further details. The reticle size and render resolution must match if this is enabled.
    enabled disabled
  • Border Mask Gradient: applies a soft gradient to the border mask if applied
    enabled disabled
  • Keep Border Size: if set greater than 0, this prevents the content of the image X pixels away from the image edge from being modified.
  • Generate-ahead count: contiunually generates dreams (quantity limited by the slider value) after the initial generation batch so you can conveniently browse a constant firehose of output. See here and here for context and discussion.

Mask Brush

This tool allows you to paint masks over regions of your image that you want to prepare for modification while leaving the rest of the image alone, or vice versa if you use mask inversion.

This tool does not use the common reticle cursor, but instead uses a "blob".

You can erase painted masks using the right-click mouse button.

Please note that mask brush actions are not "historical" items and will not appear in the history palette.

Mask Brush Context Menu

  • Brush Size: adjusts the size of the brush blob, can also be controlled using mousewheel scrolling
  • Brush Opacity: adjusts the opacity of the painted brushstrokes, which can affect resultant output
  • Brush Blur: adjusts the edge blurring of the painted brushstrokes, which can affect resultant output
  • Clear button: clears all painted mask brushstrokes (keyboard shortcut [DEL])
  • Preview button: causes painted masks to become opaque white for easier visibility

Color Brush

This tool allows you to sketch new images, practically exclusively for later use with the img2img tool.

This tool does not use the common reticle cursor, but instead uses a "blob".

It is strongly recommended to use this tool on new layers, as right-click erasing will affect any dreamed images - the sketch and dream exist within the same canvas context.

Please note that while color brush actions are "historical" and can be undone, if the "Affect Mask" option is enabled the resultant masks will not be undone. Manually erasing a color brush sketch will however also erase the generated mask.

Color Brush Context Menu

  • Affect Mask: this option enables or disables the automatic generation of brushed mask to match the sketch. Unless you're legitimately an mspaint deity, you'll almost certainly want to leave this option turned on.
    enabled disabled
  • Brush Size: adjusts the size of the brush blob, can also be controlled using mousewheel scrolling
  • Brush Opacity: adjusts the opacity of the painted brushstrokes, which can affect resultant output
  • Brush Blur: adjusts the edge blurring of the painted brushstrokes, which can affect resultant output
  • Untitled Big Color Button: allows you to select a new color to paint with
  • Eyedropper: allows you to select a color from the existing canvas

Marquee Select

This tool allows you to select an arbitrary portion of the output canvas. The selection can be moved, scaled, saved, or deleted as desired.

You can rotate (circular handle, center of top edge) or scale (square handles, image corners) selections by clicking and dragging the appropriate handles. Hold shift to snap on 45-degree angles while rotating.

  • Move the selection by simply dragging within the selected region
  • Scale the selection by dragging one of the corner boxes
  • Delete the selection with the [DEL] key
  • Respects and interacts with layer selections

This tool does not use the common reticle cursor, but instead uses a crosshair.

Marquee Select Context Menu

  • Snap to Grid: enables or disables grid snapping for crosshair placement and selection movement/scaling. Please see the general context menu section for common context icon information.
  • Keep Aspect Ratio: if enabled, constrains any scaling of the selection to match the original selection's aspect ratio. If disabled, you can squash and stretch that thing however you'd like to.
    enabled disabled
  • Mirror Selection: if enabled, horizontally mirrors the selected image
    enabled disabled
  • Use Clipboard: will be disabled entirely if unsupported by your browser's privacy/security settings. Allows you to copy selected region to your system clipboard using [CTRL]+[C], or paste image data onto the canvas using [CTRL]+[V].
    enabled disabled
  • Peek Opacity: allows you to see an onion-skinned transparency of a selection made on a lower layer.
  • Save Sel. button: downloads the defined region of the selected layer as a .png to your computer
  • Resource button: adds the defined region of the selected layer as a stampable resource
  • Save Vis. button: downloads the defined region of all visible layers as a .png to your computer
  • Vis. to Res. button: adds the defined region of all visible layers as a stampable resource

For instance, given the following image content and layer structure with "sea 1" selected:

Save Sel/Resource Save Vis./Vis. to Res.
  • Send To selector (extension only): allows you to send the selected image content directly back to an existing webUI tab (i.e. extras, img2img)

Stamp

This tool allows you to stamp resources which can be imported from arbitrary images already on your computer, selections made by the Marquee Select tool, or individual dreams presented in a prior batch. You can simply drag an image file over the resource browser or use the Upload Image button to add images from your computer.

A selected image can be unselected either by clicking it again in the resource browser, or simply right-clicking on the canvas.

You can rotate the resource before stamping by holding down left click and moving your mouse. Hold shift to snap on 45-degree angles.

You can also scale the resource before stamping by using the scrollwheel (or equivalent touchpad gesture), or by using the Scale slider. Hold shift to fine-tune scaling.

Resources are preserved between sessions in browser IndexedDB storage.

This tool does not use the common reticle cursor, but instead uses a crosshair and stamp preview.

Stamp Context Menu

  • Snap to Grid: enables or disables grid snapping for crosshair placement. Please see the general context menu section for common context icon information.
  • Flip Stamp: flips the stamp along the vertical axis (keyboard shortcut [-])
    enabled disabled
  • Mirror Stamp: mirrors the stamp along the horizontal axis (keyboard shortcut [=])
    enabled disabled
  • Scale slider: adjusts the size of the stamped resource, from 0.01x to 10x. Affected by scrollwheel/gesture.
  • Resource Browser: the current resources available for stamping. Click a resource to select it, click it again to unselect it. Double-click the title to rename.
    • Hovering the mouse cursor over a resource will display a preview of the image
    • The Download icon allows you to save a local copy of the resource
    • The Trash Can icon removes the resources from the browser
  • Upload Image: opens a file selection browser and allows you to upload images directly into the Resource Browser. Lots of fun with transparent PNGs.

Interrogate

This tool will send the image region under the reticle to the CLIP interrogation endpoint exposed in A1111 webUI, and offer you the option to replace your current prompt with its resultant output.

This tool will generate green marching ants while an operation is in progress.

Interrogate Context Menu

  • Cursor Size: adjusts the openOutpaint reticle size
  • Snap to Grid: enables or disables grid snapping for reticle placement. Please see the general context menu section for common context icon information.
Clone this wiki locally