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
72a8973b
Commit
72a8973b
authored
Apr 06, 2023
by
sALTaccount
Browse files
allow configurable path for diffusers models
parent
42fd67b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
folder_paths.py
folder_paths.py
+1
-0
nodes.py
nodes.py
+1
-1
No files found.
folder_paths.py
View file @
72a8973b
...
...
@@ -23,6 +23,7 @@ folder_names_and_paths["clip"] = ([os.path.join(models_dir, "clip")], supported_
folder_names_and_paths
[
"clip_vision"
]
=
([
os
.
path
.
join
(
models_dir
,
"clip_vision"
)],
supported_pt_extensions
)
folder_names_and_paths
[
"style_models"
]
=
([
os
.
path
.
join
(
models_dir
,
"style_models"
)],
supported_pt_extensions
)
folder_names_and_paths
[
"embeddings"
]
=
([
os
.
path
.
join
(
models_dir
,
"embeddings"
)],
supported_pt_extensions
)
folder_names_and_paths
[
"diffusers"
]
=
([
os
.
path
.
join
(
models_dir
,
"diffusers"
)],
[
"folder"
])
folder_names_and_paths
[
"controlnet"
]
=
([
os
.
path
.
join
(
models_dir
,
"controlnet"
),
os
.
path
.
join
(
models_dir
,
"t2i_adapter"
)],
supported_pt_extensions
)
folder_names_and_paths
[
"upscale_models"
]
=
([
os
.
path
.
join
(
models_dir
,
"upscale_models"
)],
supported_pt_extensions
)
...
...
nodes.py
View file @
72a8973b
...
...
@@ -224,7 +224,7 @@ class DiffusersLoader:
@
classmethod
def
INPUT_TYPES
(
cls
):
paths
=
[]
search_path
=
os
.
path
.
join
(
folder_paths
.
models_dir
,
'
diffusers
'
)
search_path
=
folder_paths
.
get_folder_paths
(
"
diffusers
"
)[
0
]
if
os
.
path
.
exists
(
search_path
):
paths
=
next
(
os
.
walk
(
search_path
))[
1
]
return
{
"required"
:
{
"model_path"
:
(
paths
,),
}}
...
...
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