From c43ab8fb2f64b0b4ef5962c3baca257dd747212c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Mon, 1 Jul 2024 09:03:14 +0800 Subject: [PATCH] 'commit' --- BaiHu/JSON/clearGPU.json | 96 ++++++++--------------------------- BaiHu/JSON/workflow_api.json | 1 - BaiHu/Tools/TestComfyUIApi.py | 8 +-- 3 files changed, 25 insertions(+), 80 deletions(-) delete mode 100644 BaiHu/JSON/workflow_api.json diff --git a/BaiHu/JSON/clearGPU.json b/BaiHu/JSON/clearGPU.json index 94bcc0f6..f7826182 100644 --- a/BaiHu/JSON/clearGPU.json +++ b/BaiHu/JSON/clearGPU.json @@ -1,82 +1,26 @@ { - "last_node_id": 2, - "last_link_id": 1, - "nodes": [ - { - "id": 2, - "type": "PreviewImage", - "pos": [ - 205.499643768773, - 298.78351573772534 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 1, - "label": "images" - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } + "1": { + "inputs": { + "width": 1, + "height": 1, + "batch_size": 1, + "color": 0 }, - { - "id": 1, - "type": "EmptyImage", - "pos": [ - -171, - 256 - ], - "size": { - "0": 315, - "1": 130 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 1 - ], - "shape": 3, - "label": "IMAGE", - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "EmptyImage" - }, - "widgets_values": [ - 1, - 1, - 1, + "class_type": "EmptyImage", + "_meta": { + "title": "空图像" + } + }, + "2": { + "inputs": { + "images": [ + "1", 0 ] + }, + "class_type": "PreviewImage", + "_meta": { + "title": "预览图像" } - ], - "links": [ - [ - 1, - 1, - 0, - 2, - 0, - "IMAGE" - ] - ], - "groups": [], - "config": {}, - "extra": {}, - "version": 0.4 + } } \ No newline at end of file diff --git a/BaiHu/JSON/workflow_api.json b/BaiHu/JSON/workflow_api.json deleted file mode 100644 index 9e26dfee..00000000 --- a/BaiHu/JSON/workflow_api.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/BaiHu/Tools/TestComfyUIApi.py b/BaiHu/Tools/TestComfyUIApi.py index 884afe14..1fcd667b 100644 --- a/BaiHu/Tools/TestComfyUIApi.py +++ b/BaiHu/Tools/TestComfyUIApi.py @@ -52,14 +52,16 @@ server_address = config.get('comfyui', 'server_address') getUse(server_address) # 打开文件并读取内容 -file_path = r'../JSON/27.json' +file_path = r'../JSON/clearGPU.json' with open(file_path, 'r', encoding='utf-8') as file: - content = file.read() + prompt_data = json.load(file) +queue_prompt(server_address, "cleanGpuRam", prompt_data) + +getUse(server_address) # 如何清空Comfyui的gpu缓存 # https://wailikeji.blog.csdn.net/article/details/140035515 -# queue_prompt(server_address, "cleanGpuRam", content) # https://comfy.icu/node/easy-clearCacheAll # https://github.com/comfyanonymous/ComfyUI/issues/3615 # https://github.com/yolain/ComfyUI-Easy-Use/issues/124