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
5c1cb926
Commit
5c1cb926
authored
Jan 23, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix BLIP failing to import depending on configuration
parent
7ba7f4ed
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
interrogate.py
modules/interrogate.py
+2
-1
paths.py
modules/paths.py
+14
-0
No files found.
modules/interrogate.py
View file @
5c1cb926
...
@@ -83,6 +83,7 @@ class InterrogateModels:
...
@@ -83,6 +83,7 @@ class InterrogateModels:
return
self
.
loaded_categories
return
self
.
loaded_categories
def
load_blip_model
(
self
):
def
load_blip_model
(
self
):
with
paths
.
Prioritize
(
"BLIP"
):
import
models.blip
import
models.blip
files
=
modelloader
.
load_models
(
files
=
modelloader
.
load_models
(
...
...
modules/paths.py
View file @
5c1cb926
...
@@ -38,3 +38,17 @@ for d, must_exist, what, options in path_dirs:
...
@@ -38,3 +38,17 @@ for d, must_exist, what, options in path_dirs:
else
:
else
:
sys
.
path
.
append
(
d
)
sys
.
path
.
append
(
d
)
paths
[
what
]
=
d
paths
[
what
]
=
d
class
Prioritize
:
def
__init__
(
self
,
name
):
self
.
name
=
name
self
.
path
=
None
def
__enter__
(
self
):
self
.
path
=
sys
.
path
.
copy
()
sys
.
path
=
[
paths
[
self
.
name
]]
+
sys
.
path
def
__exit__
(
self
,
exc_type
,
exc_val
,
exc_tb
):
sys
.
path
=
self
.
path
self
.
path
=
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