diff --git a/.gitignore b/.gitignore index 87dd27010..43c038e41 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ __pycache__/ !/input/example.png /models/ /temp/ -/subflows/ /custom_nodes/ !custom_nodes/example_node.py.example extra_model_paths.yaml diff --git a/folder_paths.py b/folder_paths.py index 482cc2222..98704945e 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -67,6 +67,7 @@ def get_input_directory(): global input_directory return input_directory + #NOTE: used in http server so don't put folders that should not be accessed remotely def get_directory_by_type(type_name): if type_name == "output": diff --git a/server.py b/server.py index 0e16eee27..c8df7f04a 100644 --- a/server.py +++ b/server.py @@ -1,5 +1,4 @@ import os -import os.path as osp import sys import asyncio import traceback @@ -155,8 +154,6 @@ class PromptServer(): type_dir = folder_paths.get_temp_directory() elif dir_type == "output": type_dir = folder_paths.get_output_directory() - elif dir_type == "subflows": - type_dir = folder_paths.get_subflows_directory() return type_dir, dir_type @@ -522,21 +519,6 @@ class PromptServer(): self.prompt_queue.delete_history_item(id_to_delete) return web.Response(status=200) - - @routes.get("/subflows/{subflow_name}") - async def get_subflow(request): - subflow_name = request.match_info.get("subflow_name", None) - if subflow_name != None: - subflow_path = folder_paths.get_full_path("subflows", subflow_name) - ext = osp.splitext(subflow_path)[1] - with open(subflow_path) as f: - if ext == ".json": - subflow_data = json.load(f) - return web.json_response({"subflow": subflow_data}, status=200) - elif ext == ".png": - return web.json_response({"error": "todo", "node_errors": []}, status=400) - return web.json_response({"error": "no subflow_name provided", "node_errors": []}, status=400) - def add_routes(self): self.app.add_routes(self.routes) diff --git a/web/extensions/core/widgetInputs.js b/web/extensions/core/widgetInputs.js index 53e3a7a28..5c8fbc9b2 100644 --- a/web/extensions/core/widgetInputs.js +++ b/web/extensions/core/widgetInputs.js @@ -4,7 +4,7 @@ import { app } from "../../scripts/app.js"; const CONVERTED_TYPE = "converted-widget"; const VALID_TYPES = ["STRING", "combo", "number", "BOOLEAN"]; const CONFIG = Symbol(); -export const GET_CONFIG = Symbol(); +const GET_CONFIG = Symbol(); function getConfig(widgetName) { const { nodeData } = this.constructor; diff --git a/web/lib/litegraph.core.js b/web/lib/litegraph.core.js index 447b13c8d..5a6c0e164 100644 --- a/web/lib/litegraph.core.js +++ b/web/lib/litegraph.core.js @@ -13315,7 +13315,7 @@ LGraphNode.prototype.executeAction = function(action) content: "Align Selected To", has_submenu: true, callback: LGraphCanvas.onNodeAlign, - }); + }) } options.push(null, { diff --git a/web/scripts/api.js b/web/scripts/api.js index 5e2ce76b1..2c5a3a7eb 100644 --- a/web/scripts/api.js +++ b/web/scripts/api.js @@ -264,19 +264,6 @@ class ComfyApi extends EventTarget { } } - /** - * Gets the subflow json data - * @returns Prompt history including node outputs - */ - async getSubflow(subflowName) { - try { - const res = await this.fetchApi(`/subflows/${subflowName}`); - return await res.json(); - } catch (error) { - console.error(error); - return { }; - } - } /** * Gets system & device stats diff --git a/web/scripts/app.js b/web/scripts/app.js index d454e88f3..ba4d540ce 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -1622,9 +1622,6 @@ export class ComfyApp { } } - - - /** * Converts the current graph workflow for sending to the API * @returns The workflow and node links