Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
1c0a0c4c
Commit
1c0a0c4c
authored
Apr 22, 2024
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
e2b177c5
7dfe959f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
CHANGELOG.md
CHANGELOG.md
+5
-0
modules/masking.py
modules/masking.py
+1
-1
No files found.
CHANGELOG.md
View file @
1c0a0c4c
## 1.9.3
### Bug Fixes:
*
fix get_crop_region_v2 (
[
#15594
](
https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15594
)
)
## 1.9.2
## 1.9.2
### Extensions and API:
### Extensions and API:
...
...
modules/masking.py
View file @
1c0a0c4c
...
@@ -16,7 +16,7 @@ def get_crop_region_v2(mask, pad=0):
...
@@ -16,7 +16,7 @@ def get_crop_region_v2(mask, pad=0):
mask
=
mask
if
isinstance
(
mask
,
Image
.
Image
)
else
Image
.
fromarray
(
mask
)
mask
=
mask
if
isinstance
(
mask
,
Image
.
Image
)
else
Image
.
fromarray
(
mask
)
if
box
:
=
mask
.
getbbox
():
if
box
:
=
mask
.
getbbox
():
x1
,
y1
,
x2
,
y2
=
box
x1
,
y1
,
x2
,
y2
=
box
return
max
(
x1
-
pad
,
0
),
max
(
y1
-
pad
,
0
),
min
(
x2
+
pad
,
mask
.
size
[
0
]),
min
(
y2
+
pad
,
mask
.
size
[
1
]
)
if
pad
else
box
return
(
max
(
x1
-
pad
,
0
),
max
(
y1
-
pad
,
0
),
min
(
x2
+
pad
,
mask
.
size
[
0
]),
min
(
y2
+
pad
,
mask
.
size
[
1
])
)
if
pad
else
box
def
get_crop_region
(
mask
,
pad
=
0
):
def
get_crop_region
(
mask
,
pad
=
0
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment