Skip to content

Commit

Permalink
fix: enable scribble mode with mask input by default (AUTOMATIC1111#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill committed Feb 14, 2023
1 parent 1004973 commit ce81753
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Thanks & Inspired: kohya-ss/sd-webui-additional-networks

### Install

Some users may need to install the cv2 library before using it: `pip install opencv-python`

Install prettytable if you want to use img2seg preprocessor: `pip install prettytable`

1. Open "Extensions" tab.
Expand Down
1 change: 1 addition & 0 deletions scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def restore_networks():
if not ((image['mask'][:, :, 0]==0).all() or (image['mask'][:, :, 0]==255).all()):
print("using mask as input")
input_image = HWC3(image['mask'][:, :, 0])
scribble_mode = True

if scribble_mode:
detected_map = np.zeros_like(input_image, dtype=np.uint8)
Expand Down

0 comments on commit ce81753

Please sign in to comment.