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
8c9e6d3c
Unverified
Commit
8c9e6d3c
authored
Dec 24, 2022
by
AUTOMATIC1111
Committed by
GitHub
Dec 24, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5131 from uservar/inpainting-detection
Better should_hijack_inpainting detection
parents
67ff058b
9146a588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
sd_hijack_inpainting.py
modules/sd_hijack_inpainting.py
+4
-1
No files found.
modules/sd_hijack_inpainting.py
View file @
8c9e6d3c
import
os
import
torch
from
einops
import
repeat
...
...
@@ -319,7 +320,9 @@ class LatentInpaintDiffusion(LatentDiffusion):
def
should_hijack_inpainting
(
checkpoint_info
):
return
str
(
checkpoint_info
.
filename
)
.
endswith
(
"inpainting.ckpt"
)
and
not
checkpoint_info
.
config
.
endswith
(
"inpainting.yaml"
)
ckpt_basename
=
os
.
path
.
basename
(
checkpoint_info
.
filename
)
.
lower
()
cfg_basename
=
os
.
path
.
basename
(
checkpoint_info
.
config
)
.
lower
()
return
"inpainting"
in
ckpt_basename
and
not
"inpainting"
in
cfg_basename
def
do_inpainting_hijack
():
...
...
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