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
0980fdfe
Commit
0980fdfe
authored
Apr 16, 2024
by
storyicon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: images do not match
Signed-off-by:
storyicon
<
storyicon@foxmail.com
>
parent
4068429a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
modules/processing.py
modules/processing.py
+3
-1
No files found.
modules/processing.py
View file @
0980fdfe
...
@@ -1537,6 +1537,9 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
...
@@ -1537,6 +1537,9 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
if
self
.
mask_blur_x
>
0
or
self
.
mask_blur_y
>
0
:
if
self
.
mask_blur_x
>
0
or
self
.
mask_blur_y
>
0
:
self
.
extra_generation_params
[
"Mask blur"
]
=
self
.
mask_blur
self
.
extra_generation_params
[
"Mask blur"
]
=
self
.
mask_blur
if
image_mask
.
size
!=
(
self
.
width
,
self
.
height
):
image_mask
=
images
.
resize_image
(
self
.
resize_mode
,
image_mask
,
self
.
width
,
self
.
height
)
if
self
.
inpaint_full_res
:
if
self
.
inpaint_full_res
:
self
.
mask_for_overlay
=
image_mask
self
.
mask_for_overlay
=
image_mask
mask
=
image_mask
.
convert
(
'L'
)
mask
=
image_mask
.
convert
(
'L'
)
...
@@ -1551,7 +1554,6 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
...
@@ -1551,7 +1554,6 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
self
.
extra_generation_params
[
"Inpaint area"
]
=
"Only masked"
self
.
extra_generation_params
[
"Inpaint area"
]
=
"Only masked"
self
.
extra_generation_params
[
"Masked area padding"
]
=
self
.
inpaint_full_res_padding
self
.
extra_generation_params
[
"Masked area padding"
]
=
self
.
inpaint_full_res_padding
else
:
else
:
image_mask
=
images
.
resize_image
(
self
.
resize_mode
,
image_mask
,
self
.
width
,
self
.
height
)
np_mask
=
np
.
array
(
image_mask
)
np_mask
=
np
.
array
(
image_mask
)
np_mask
=
np
.
clip
((
np_mask
.
astype
(
np
.
float32
))
*
2
,
0
,
255
)
.
astype
(
np
.
uint8
)
np_mask
=
np
.
clip
((
np_mask
.
astype
(
np
.
float32
))
*
2
,
0
,
255
)
.
astype
(
np
.
uint8
)
self
.
mask_for_overlay
=
Image
.
fromarray
(
np_mask
)
self
.
mask_for_overlay
=
Image
.
fromarray
(
np_mask
)
...
...
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