hako-mikan/sd-webui-regional-prompter

set prompt to divided region

What it solves

Regional Prompter is a custom script for AUTOMATIC1111's Stable Diffusion WebUI that allows users to specify different prompts for different regions of an image. This solves the problem of prompt bleeding, where attributes from one part of the prompt (e.g., "green hair") might accidentally apply to other parts of the image (e.g., "blue skirt"), ensuring that specific visual elements are confined to designated areas.

How it works

The extension provides several methods for defining regions:

  • Ratio-based division: Users can divide the image vertically or horizontally into regions using ratios (e.g., 1,1,1 for three equal parts) and separate prompts for these regions using the BREAK keyword.
  • 2D Region Assignment: Using ADDCOL and ADDROW keywords, users can create a grid-like layout of prompts.
  • Mask-based regions: Users can draw hand-drawn masks or upload mask images to define precise areas for specific prompts.
  • Prompt-based regions: An experimental feature that creates masks based on target words in the prompt to apply effects to specific objects.

It supports two primary calculation modes: Attention mode (the default, faster) and Latent mode (slower, but better for separating LoRAs).

Who it’s for

Digital artists and AI image generation enthusiasts using the AUTOMATIC1111 WebUI who need precise control over the composition and placement of elements within a generated image.

Highlights

  • Multi-region prompting: Assign unique prompts to specific image areas via ratios, 2D grids, or masks.
  • Flexible prompt structure: Use BREAK, ADDCOMM, and ADDBASE to manage common and base prompts across regions.
  • Masking tools: Integrated canvas for drawing masks or uploading mask images for regional control.
  • Broad model support: Compatible with SD, SDXL, and newer models like Z-Image, Anima, and Krea2.
  • LoRA separation: Latent mode allows for the better isolation of different LoRAs in different regions.

Related

  • Project
  • Project
  • Project
  • Project