Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
f9549d1c
Commit
f9549d1c
authored
Oct 25, 2022
by
random_thoughtss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to use unmasked conditioning image.
parent
3e15f8e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
processing.py
modules/processing.py
+5
-1
shared.py
modules/shared.py
+1
-0
No files found.
modules/processing.py
View file @
f9549d1c
...
...
@@ -768,7 +768,11 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
# Create another latent image, this time with a masked version of the original input.
conditioning_mask
=
conditioning_mask
.
to
(
image
.
device
)
conditioning_image
=
image
*
(
1.0
-
conditioning_mask
)
conditioning_image
=
image
if
shared
.
opts
.
inpainting_mask_image
:
conditioning_image
=
conditioning_image
*
(
1.0
-
conditioning_mask
)
conditioning_image
=
self
.
sd_model
.
get_first_stage_encoding
(
self
.
sd_model
.
encode_first_stage
(
conditioning_image
))
# Create the concatenated conditioning tensor to be fed to `c_concat`
...
...
modules/shared.py
View file @
f9549d1c
...
...
@@ -320,6 +320,7 @@ options_templates.update(options_section(('sampler-params', "Sampler parameters"
's_tmin'
:
OptionInfo
(
0.0
,
"sigma tmin"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1.0
,
"step"
:
0.01
}),
's_noise'
:
OptionInfo
(
1.0
,
"sigma noise"
,
gr
.
Slider
,
{
"minimum"
:
0.0
,
"maximum"
:
1.0
,
"step"
:
0.01
}),
'eta_noise_seed_delta'
:
OptionInfo
(
0
,
"Eta noise seed delta"
,
gr
.
Number
,
{
"precision"
:
0
}),
"inpainting_mask_image"
:
OptionInfo
(
True
,
"Mask original image for conditioning used by inpainting model."
),
}))
...
...
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