Skip to content

Commit

Permalink
Upgrade version 1.1.8 to comfyregistry
Browse files Browse the repository at this point in the history
  • Loading branch information
yolain committed Jun 4, 2024
1 parent 1e9ffc5 commit 3885137
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
30 changes: 0 additions & 30 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
__version__ = "1.1.8"

import os
import glob
import folder_paths
import importlib
from pathlib import Path
Expand Down Expand Up @@ -43,35 +42,6 @@
os.mkdir(styles_path)
os.mkdir(samples_path)

#合并autocomplete覆盖到pyssss包
pyssss_path = os.path.join(comfy_path, "custom_nodes", "ComfyUI-Custom-Scripts", "user")
combine_folder = os.path.join(cwd_path, "autocomplete")
if os.path.exists(combine_folder):
pass
else:
os.mkdir(combine_folder)
if os.path.exists(pyssss_path):
output_file = os.path.join(pyssss_path, "autocomplete.txt")
# 遍历 combine 目录下的所有 txt 文件,读取内容并合并
merged_content = ''
for file_path in glob.glob(os.path.join(combine_folder, '*.txt')):
with open(file_path, 'r', encoding='utf-8', errors='ignore') as file:
try:
file_content = file.read()
merged_content += file_content + '\n'
except UnicodeDecodeError:
pass
# 备份之前的autocomplete
# bak_file = os.path.join(pyssss_path, "autocomplete.txt.bak")
# if os.path.exists(bak_file):
# pass
# elif os.path.exists(output_file):
# shutil.copy(output_file, bak_file)
if merged_content != '':
# 将合并的内容写入目标文件 autocomplete.txt,并指定编码为 utf-8
with open(output_file, 'w', encoding='utf-8') as target_file:
target_file.write(merged_content)

# ComfyUI-Easy-PS相关 (需要把模型预览图暴露给PS读取,此处借鉴了 AIGODLIKE-ComfyUI-Studio 的部分代码)
from .py.libs.add_resources import add_static_resource
from .py.libs.model import easyModelManager
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
name = "comfyui-easy-use"
description = "To enhance the usability of ComfyUI, optimizations and integrations have been implemented for several commonly used nodes."
version = "1.1.7"
version = "1.1.8"
license = "LICENSE"
dependencies = ["diffusers>=0.25.0", "clip_interrogator>=0.6.0", "onnxruntime", "aiohttp"]
dependencies = ["diffusers>=0.25.0", "clip_interrogator>=0.6.0", "sentencepiece==0.2.0", "lark-parser", "onnxruntime"]

[project.urls]
Repository = "https://github.com/yolain/ComfyUI-Easy-Use"
Expand Down

0 comments on commit 3885137

Please sign in to comment.