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
f9c00468
Commit
f9c00468
authored
Sep 02, 2022
by
deggua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for fill latent zeros/noise in masking mode
parent
7b9c301f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
webui.py
webui.py
+6
-0
No files found.
webui.py
View file @
f9c00468
...
...
@@ -1573,6 +1573,12 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
self
.
mask
=
torch
.
asarray
(
1.0
-
latmask
)
.
to
(
device
)
.
type
(
sd_model
.
dtype
)
self
.
nmask
=
torch
.
asarray
(
latmask
)
.
to
(
device
)
.
type
(
sd_model
.
dtype
)
if
self
.
mask
is
not
None
:
if
self
.
inpainting_fill
==
2
:
self
.
init_latent
=
self
.
init_latent
*
self
.
mask
+
create_random_tensors
(
self
.
init_latent
.
shape
[
1
:],
[
self
.
seed
+
x
+
1
for
x
in
range
(
self
.
init_latent
.
shape
[
0
])])
*
self
.
nmask
elif
self
.
inpainting_fill
==
3
:
self
.
init_latent
=
self
.
init_latent
*
self
.
mask
def
sample
(
self
,
x
,
conditioning
,
unconditional_conditioning
):
if
self
.
mask
is
not
None
:
...
...
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