From e61be509c46d872a1b4ae8523fe6c0408f7d4d18 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sun, 26 Mar 2023 21:22:41 +0900 Subject: [PATCH] clean up patch and following upstream --- comfy_extras/nodes_upscale_model.py | 4 ++-- nodes.py | 2 +- web/scripts/api.js | 9 --------- web/scripts/app.js | 2 +- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/comfy_extras/nodes_upscale_model.py b/comfy_extras/nodes_upscale_model.py index f1aaf5009..8d6980c0e 100644 --- a/comfy_extras/nodes_upscale_model.py +++ b/comfy_extras/nodes_upscale_model.py @@ -9,8 +9,8 @@ import folder_paths class UpscaleModelLoader: @classmethod def INPUT_TYPES(s): - return {"required": { "model_name": (folder_paths.get_filename_list("upscale_models"), )}, - } + return {"required": { "model_name": (folder_paths.get_filename_list("upscale_models"), ), + }} RETURN_TYPES = ("UPSCALE_MODEL",) FUNCTION = "load_model" diff --git a/nodes.py b/nodes.py index d878dfaee..104fa9387 100644 --- a/nodes.py +++ b/nodes.py @@ -770,7 +770,7 @@ class SaveImage: full_output_folder = os.path.join(self.output_dir, subfolder) - if os.path.commonpath((self.output_dir, os.path.realpath(full_output_folder))) != self.output_dir: + if os.path.commonpath((self.output_dir, os.path.abspath(full_output_folder))) != self.output_dir: print("Saving image outside the output folder is not allowed.") return {} diff --git a/web/scripts/api.js b/web/scripts/api.js index cd28d1d29..b90b1c656 100644 --- a/web/scripts/api.js +++ b/web/scripts/api.js @@ -124,15 +124,6 @@ class ComfyApi extends EventTarget { return await resp.json(); } - /** - * Loads file list - * @returns An array of file list - */ - async getFiles(kind) { - const resp = await fetch("/getfiles/"+kind, { cache: "no-store" }); - return await resp.json(); - } - /** * * @param {number} number The index at which to queue the prompt, passing -1 will insert the prompt at the front of the queue diff --git a/web/scripts/app.js b/web/scripts/app.js index b4b71165a..d42079096 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -590,7 +590,7 @@ class ComfyApp { const nodeData = defs[nodeId]; const node = Object.assign( function ComfyNode() { - const inputs = Object.assign(nodeData["input"]["required"], nodeData["input"]["widget"]); + const inputs = nodeData["input"]["required"]; const config = { minWidth: 1, minHeight: 1 }; for (const inputName in inputs) { const inputData = inputs[inputName];