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
bd81a09e
Commit
bd81a09e
authored
Dec 10, 2022
by
MrCheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix support for 2.0 inpainting model while maintaining support for 1.5 inpainting model
parent
a1c8ad88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
sd_hijack_inpainting.py
modules/sd_hijack_inpainting.py
+1
-2
sd_models.py
modules/sd_models.py
+1
-0
No files found.
modules/sd_hijack_inpainting.py
View file @
bd81a09e
...
@@ -324,12 +324,11 @@ def should_hijack_inpainting(checkpoint_info):
...
@@ -324,12 +324,11 @@ def should_hijack_inpainting(checkpoint_info):
def
do_inpainting_hijack
():
def
do_inpainting_hijack
():
# most of this stuff seems to no longer be needed because it is already included into SD2.0
# most of this stuff seems to no longer be needed because it is already included into SD2.0
# LatentInpaintDiffusion remains because SD2.0's LatentInpaintDiffusion can't be loaded without specifying a checkpoint
# p_sample_plms is needed because PLMS can't work with dicts as conditionings
# p_sample_plms is needed because PLMS can't work with dicts as conditionings
# this file should be cleaned up later if weverything tuens out to work fine
# this file should be cleaned up later if weverything tuens out to work fine
# ldm.models.diffusion.ddpm.get_unconditional_conditioning = get_unconditional_conditioning
# ldm.models.diffusion.ddpm.get_unconditional_conditioning = get_unconditional_conditioning
ldm
.
models
.
diffusion
.
ddpm
.
LatentInpaintDiffusion
=
LatentInpaintDiffusion
#
ldm.models.diffusion.ddpm.LatentInpaintDiffusion = LatentInpaintDiffusion
# ldm.models.diffusion.ddim.DDIMSampler.p_sample_ddim = p_sample_ddim
# ldm.models.diffusion.ddim.DDIMSampler.p_sample_ddim = p_sample_ddim
# ldm.models.diffusion.ddim.DDIMSampler.sample = sample_ddim
# ldm.models.diffusion.ddim.DDIMSampler.sample = sample_ddim
...
...
modules/sd_models.py
View file @
bd81a09e
...
@@ -296,6 +296,7 @@ def load_model(checkpoint_info=None):
...
@@ -296,6 +296,7 @@ def load_model(checkpoint_info=None):
sd_config
.
model
.
params
.
use_ema
=
False
sd_config
.
model
.
params
.
use_ema
=
False
sd_config
.
model
.
params
.
conditioning_key
=
"hybrid"
sd_config
.
model
.
params
.
conditioning_key
=
"hybrid"
sd_config
.
model
.
params
.
unet_config
.
params
.
in_channels
=
9
sd_config
.
model
.
params
.
unet_config
.
params
.
in_channels
=
9
sd_config
.
model
.
params
.
finetune_keys
=
None
# Create a "fake" config with a different name so that we know to unload it when switching models.
# Create a "fake" config with a different name so that we know to unload it when switching models.
checkpoint_info
=
checkpoint_info
.
_replace
(
config
=
checkpoint_info
.
config
.
replace
(
".yaml"
,
"-inpainting.yaml"
))
checkpoint_info
=
checkpoint_info
.
_replace
(
config
=
checkpoint_info
.
config
.
replace
(
".yaml"
,
"-inpainting.yaml"
))
...
...
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