Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
C
ComfyUI
管理
动态
成员
代码
仓库
分支
提交
标签
仓库图
比较修订版本
锁定的文件
部署
模型注册表
分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
hanamizuki
ComfyUI
提交
b0505eb7
提交
b0505eb7
编辑于
1 year ago
作者:
comfyanonymous
浏览文件
操作
下载
补丁
差异文件
Return right type when none specified in upload route.
Switch time.time to time.perf_counter for custom node import times.
上级
db4d3a84
No related branches found
No related tags found
无相关合并请求
变更
2
隐藏空白变更内容
行内
左右并排
显示
2 个更改的文件
nodes.py
+2
-2
2 个添加, 2 个删除
nodes.py
server.py
+5
-4
5 个添加, 4 个删除
server.py
有
7 个添加
和
6 个删除
nodes.py
+
2
−
2
浏览文件 @
b0505eb7
...
...
@@ -1338,9 +1338,9 @@ def load_custom_nodes():
for
possible_module
in
possible_modules
:
module_path
=
os
.
path
.
join
(
custom_node_path
,
possible_module
)
if
os
.
path
.
isfile
(
module_path
)
and
os
.
path
.
splitext
(
module_path
)[
1
]
!=
"
.py
"
:
continue
time_before
=
time
.
time
()
time_before
=
time
.
perf_counter
()
success
=
load_custom_node
(
module_path
)
node_import_times
.
append
((
time
.
time
()
-
time_before
,
module_path
,
success
))
node_import_times
.
append
((
time
.
perf_counter
()
-
time_before
,
module_path
,
success
))
if
len
(
node_import_times
)
>
0
:
print
(
"
\n
Import times for custom nodes:
"
)
...
...
此差异已折叠。
点击以展开。
server.py
+
5
−
4
浏览文件 @
b0505eb7
...
...
@@ -115,22 +115,23 @@ class PromptServer():
def
get_dir_by_type
(
dir_type
):
if
dir_type
is
None
:
type_dir
=
folder_paths
.
get_input_directory
()
elif
dir_type
==
"
input
"
:
dir_type
=
"
input
"
if
dir_type
==
"
input
"
:
type_dir
=
folder_paths
.
get_input_directory
()
elif
dir_type
==
"
temp
"
:
type_dir
=
folder_paths
.
get_temp_directory
()
elif
dir_type
==
"
output
"
:
type_dir
=
folder_paths
.
get_output_directory
()
return
type_dir
return
type_dir
,
dir_type
def
image_upload
(
post
,
image_save_function
=
None
):
image
=
post
.
get
(
"
image
"
)
overwrite
=
post
.
get
(
"
overwrite
"
)
image_upload_type
=
post
.
get
(
"
type
"
)
upload_dir
=
get_dir_by_type
(
image_upload_type
)
upload_dir
,
image_upload_type
=
get_dir_by_type
(
image_upload_type
)
if
image
and
image
.
file
:
filename
=
image
.
filename
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录