Commit eb85896b authored by comfyanonymous's avatar comfyanonymous
Browse files

Add code for categories.

parent acdc6f42
......@@ -291,6 +291,9 @@ class PromptServer(BaseHTTPRequestHandler):
info['output'] = obj_class.RETURN_TYPES
info['name'] = x #TODO
info['description'] = ''
info['category'] = 'sd'
if hasattr(obj_class, 'CATEGORY'):
info['category'] = obj_class.CATEGORY
out[x] = info
self.wfile.write(json.dumps(out).encode('utf-8'))
elif self.path[1:] in os.listdir(self.server.server_dir):
......
......@@ -237,7 +237,7 @@ function onObjectInfo(json) {
MyNode.__json_data = json[key]
LiteGraph.registerNodeType(key, MyNode);
MyNode.category = "sd"; //TODO: proper categories
MyNode.category = json[key]['category'];
};
afterLoadGraph();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment