light-and-ray / sd-webui-cn-sam-preprocessor

Segment Anything preprocessor for ControlNet inside Stable Diffusion WebUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segment Anything preprocessor for ControlNet

This extension adds segment anything preprocessor inside Mikubill/sd-webui-controlnet into stable-diffusion-webui.

Installation

  1. Install Mikubill/sd-webui-controlnet extension
  2. Install continue-revolution/sd-webui-segment-anything extension
  3. Download sam_hq_vit_l.pth model and put it into extensions/sd-webui-segment-anything/models/sam
  4. Install this extension
  5. Optional download this model (SD1.x), rename it into controlnet-segment-anything.pth, then put it into models/ControlNet, or controlnet-union-sdxl-1.0 (SDXL)

You can use this preprocessor with cn models mentioned before and also with regular segmentation controlnet and t2ia models sd-controlnet-seg, t2iadapter_seg_sd14v1, t2i-adapter-sdxl-segmentation. Also works with this GWM_magic_draw_landscape_controlnet model (not only for landspaces)

ControlNet unit screenshot

Options

You can adjust Auto SAM options used in this module in the Segment Anything settings:

You can add them into quick settings or into settings in ui if you want

Extras tab

You can also use this preprocessor inside Extras tab with my other extension sd-webui-cn-in-extras-tab

About

Segment Anything preprocessor for ControlNet inside Stable Diffusion WebUI


Languages

Language:Python 100.0%