Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
7734d65f
Commit
7734d65f
authored
Apr 06, 2023
by
sALTaccount
Browse files
fix loading alt folders
parent
f51b7a92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
nodes.py
nodes.py
+9
-4
No files found.
nodes.py
View file @
7734d65f
...
@@ -224,10 +224,9 @@ class DiffusersLoader:
...
@@ -224,10 +224,9 @@ class DiffusersLoader:
@
classmethod
@
classmethod
def
INPUT_TYPES
(
cls
):
def
INPUT_TYPES
(
cls
):
paths
=
[]
paths
=
[]
search_paths
=
folder_paths
.
get_folder_paths
(
"diffusers"
)
for
search_path
in
folder_paths
.
get_folder_paths
(
"diffusers"
):
for
search_path
in
search_paths
:
if
os
.
path
.
exists
(
search_path
):
if
os
.
path
.
exists
(
search_path
):
paths
=
next
(
os
.
walk
(
search_path
))[
1
]
paths
+
=
next
(
os
.
walk
(
search_path
))[
1
]
return
{
"required"
:
{
"model_path"
:
(
paths
,),
}}
return
{
"required"
:
{
"model_path"
:
(
paths
,),
}}
RETURN_TYPES
=
(
"MODEL"
,
"CLIP"
,
"VAE"
)
RETURN_TYPES
=
(
"MODEL"
,
"CLIP"
,
"VAE"
)
FUNCTION
=
"load_checkpoint"
FUNCTION
=
"load_checkpoint"
...
@@ -235,7 +234,13 @@ class DiffusersLoader:
...
@@ -235,7 +234,13 @@ class DiffusersLoader:
CATEGORY
=
"loaders"
CATEGORY
=
"loaders"
def
load_checkpoint
(
self
,
model_path
,
output_vae
=
True
,
output_clip
=
True
):
def
load_checkpoint
(
self
,
model_path
,
output_vae
=
True
,
output_clip
=
True
):
model_path
=
os
.
path
.
join
(
folder_paths
.
models_dir
,
'diffusers'
,
model_path
)
for
search_path
in
folder_paths
.
get_folder_paths
(
"diffusers"
):
if
os
.
path
.
exists
(
search_path
):
paths
=
next
(
os
.
walk
(
search_path
))[
1
]
if
model_path
in
paths
:
model_path
=
os
.
path
.
join
(
search_path
,
model_path
)
break
search_paths
=
folder_paths
.
get_folder_paths
(
"diffusers"
)
return
load_diffusers
(
model_path
,
fp16
=
model_management
.
should_use_fp16
(),
output_vae
=
output_vae
,
output_clip
=
output_clip
,
embedding_directory
=
folder_paths
.
get_folder_paths
(
"embeddings"
))
return
load_diffusers
(
model_path
,
fp16
=
model_management
.
should_use_fp16
(),
output_vae
=
output_vae
,
output_clip
=
output_clip
,
embedding_directory
=
folder_paths
.
get_folder_paths
(
"embeddings"
))
...
...
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