From 8eb514d94c9fe86e46f283fe9fb1ca974aa836fa Mon Sep 17 00:00:00 2001 From: Silversith Date: Sun, 26 Mar 2023 08:58:18 +0200 Subject: [PATCH] Remove Custom Nodes --- comfy_extras/silver_custom.py | 42 ----------------------------------- nodes.py | 3 +-- server.py | 16 ------------- 3 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 comfy_extras/silver_custom.py diff --git a/comfy_extras/silver_custom.py b/comfy_extras/silver_custom.py deleted file mode 100644 index 1f86b49f4..000000000 --- a/comfy_extras/silver_custom.py +++ /dev/null @@ -1,42 +0,0 @@ -import datetime - -import torch - -import os -import sys -import json -import hashlib -import copy -import traceback - -from PIL import Image -from PIL.PngImagePlugin import PngInfo -import numpy as np -import comfy.samplers -import comfy.sd -import comfy.utils -import comfy_extras.clip_vision -import model_management -import importlib -import folder_paths - - -class Note: - def __init__(self): - pass - - @classmethod - def INPUT_TYPES(s): - return {"required": {"text": ("STRING", {"multiline": True})}} - - RETURN_TYPES = () - FUNCTION = "Note" - - OUTPUT_NODE = False - - CATEGORY = "silver_custom" - - -NODE_CLASS_MAPPINGS = { - "Note": Note, -} diff --git a/nodes.py b/nodes.py index 5a13c42db..a35ac9f68 100644 --- a/nodes.py +++ b/nodes.py @@ -981,5 +981,4 @@ def load_custom_nodes(): load_custom_nodes() -load_custom_node(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_extras"), "nodes_upscale_model.py")) -load_custom_node(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_extras"), "silver_custom.py")) +load_custom_node(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_extras"), "nodes_upscale_model.py")) \ No newline at end of file diff --git a/server.py b/server.py index 066f6ba9a..73429acca 100644 --- a/server.py +++ b/server.py @@ -138,22 +138,6 @@ class PromptServer(): return web.Response(status=404) - @routes.post("/delete") - async def delete(request): - current_dir = os.path.abspath(os.getcwd()) - output_dir = os.path.join(current_dir, "output") - if not os.path.exists(output_dir): - return web.json_response({"message": "Output directory does not exist."}, status=404) - try: - for file_name in os.listdir(output_dir): - file_path = os.path.join(output_dir, file_name) - if os.path.isfile(file_path): - os.remove(file_path) - return web.json_response({"message": "All content deleted from Output folder."}, status=200) - - except Exception as e: - return web.json_response({"message": f"An error occurred: {str(e)}"}, status=500) - @routes.get("/prompt") async def get_prompt(request): return web.json_response(self.get_queue_info())