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
eb85896b
"...git@developer.sourcefind.cn:dcuai/dlexamples.git" did not exist on "f74d77fbdb5fe61a5f9642353a492b88093e698c"
Commit
eb85896b
authored
Jan 26, 2023
by
comfyanonymous
Browse files
Add code for categories.
parent
acdc6f42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
main.py
main.py
+3
-0
webshit/index.html
webshit/index.html
+1
-1
No files found.
main.py
View file @
eb85896b
...
@@ -291,6 +291,9 @@ class PromptServer(BaseHTTPRequestHandler):
...
@@ -291,6 +291,9 @@ class PromptServer(BaseHTTPRequestHandler):
info
[
'output'
]
=
obj_class
.
RETURN_TYPES
info
[
'output'
]
=
obj_class
.
RETURN_TYPES
info
[
'name'
]
=
x
#TODO
info
[
'name'
]
=
x
#TODO
info
[
'description'
]
=
''
info
[
'description'
]
=
''
info
[
'category'
]
=
'sd'
if
hasattr
(
obj_class
,
'CATEGORY'
):
info
[
'category'
]
=
obj_class
.
CATEGORY
out
[
x
]
=
info
out
[
x
]
=
info
self
.
wfile
.
write
(
json
.
dumps
(
out
).
encode
(
'utf-8'
))
self
.
wfile
.
write
(
json
.
dumps
(
out
).
encode
(
'utf-8'
))
elif
self
.
path
[
1
:]
in
os
.
listdir
(
self
.
server
.
server_dir
):
elif
self
.
path
[
1
:]
in
os
.
listdir
(
self
.
server
.
server_dir
):
...
...
webshit/index.html
View file @
eb85896b
...
@@ -237,7 +237,7 @@ function onObjectInfo(json) {
...
@@ -237,7 +237,7 @@ function onObjectInfo(json) {
MyNode
.
__json_data
=
json
[
key
]
MyNode
.
__json_data
=
json
[
key
]
LiteGraph
.
registerNodeType
(
key
,
MyNode
);
LiteGraph
.
registerNodeType
(
key
,
MyNode
);
MyNode
.
category
=
"
sd
"
;
//TODO: proper
categor
ies
MyNode
.
category
=
json
[
key
][
'
categor
y
'
];
};
};
afterLoadGraph
();
afterLoadGraph
();
...
...
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