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
f80c3696
Commit
f80c3696
authored
Sep 30, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the sys not found error when importing sd_samplers that appeared after PR
parent
f295d909
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
paths.py
modules/paths.py
+11
-8
sd_samplers.py
modules/sd_samplers.py
+0
-2
No files found.
modules/paths.py
View file @
f80c3696
...
...
@@ -15,21 +15,24 @@ for possible_sd_path in possible_sd_paths:
assert
sd_path
is
not
None
,
"Couldn't find Stable Diffusion in any of: "
+
str
(
possible_sd_paths
)
path_dirs
=
[
(
sd_path
,
'ldm'
,
'Stable Diffusion'
),
(
os
.
path
.
join
(
sd_path
,
'../taming-transformers'
),
'taming'
,
'Taming Transformers'
),
(
os
.
path
.
join
(
sd_path
,
'../CodeFormer'
),
'inference_codeformer.py'
,
'CodeFormer'
),
(
os
.
path
.
join
(
sd_path
,
'../BLIP'
),
'models/blip.py'
,
'BLIP'
),
(
os
.
path
.
join
(
sd_path
,
'../latent-diffusion'
),
'LDSR.py'
,
'LDSR'
),
(
os
.
path
.
join
(
sd_path
,
'../k-diffusion'
),
'k_diffusion/sampling.py'
,
'k_diffusion'
),
(
sd_path
,
'ldm'
,
'Stable Diffusion'
,
[]
),
(
os
.
path
.
join
(
sd_path
,
'../taming-transformers'
),
'taming'
,
'Taming Transformers'
,
[]
),
(
os
.
path
.
join
(
sd_path
,
'../CodeFormer'
),
'inference_codeformer.py'
,
'CodeFormer'
,
[]
),
(
os
.
path
.
join
(
sd_path
,
'../BLIP'
),
'models/blip.py'
,
'BLIP'
,
[]
),
(
os
.
path
.
join
(
sd_path
,
'../latent-diffusion'
),
'LDSR.py'
,
'LDSR'
,
[]
),
(
os
.
path
.
join
(
sd_path
,
'../k-diffusion'
),
'k_diffusion/sampling.py'
,
'k_diffusion'
,
[
"atstart"
]
),
]
paths
=
{}
for
d
,
must_exist
,
what
in
path_dirs
:
for
d
,
must_exist
,
what
,
options
in
path_dirs
:
must_exist_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
script_path
,
d
,
must_exist
))
if
not
os
.
path
.
exists
(
must_exist_path
):
print
(
f
"Warning: {what} not found at path {must_exist_path}"
,
file
=
sys
.
stderr
)
else
:
d
=
os
.
path
.
abspath
(
d
)
sys
.
path
.
append
(
d
)
if
"atstart"
in
options
:
sys
.
path
.
insert
(
0
,
d
)
else
:
sys
.
path
.
append
(
d
)
paths
[
what
]
=
d
modules/sd_samplers.py
View file @
f80c3696
...
...
@@ -4,8 +4,6 @@ import torch
import
tqdm
from
PIL
import
Image
import
inspect
from
modules.paths
import
paths
sys
.
path
.
insert
(
0
,
paths
[
"k_diffusion"
])
import
k_diffusion.sampling
import
ldm.models.diffusion.ddim
import
ldm.models.diffusion.plms
...
...
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