From 5ab04f52bd6382a95841d70820a00a705207ae53 Mon Sep 17 00:00:00 2001 From: yolain Date: Sun, 17 Mar 2024 15:38:47 +0800 Subject: [PATCH] fix:easy stylesSelector error when choose the custom styles --- README.en.md | 1 + README.md | 5 +++-- py/easyNodes.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.en.md b/README.en.md index a2ace33..e18bd83 100644 --- a/README.en.md +++ b/README.en.md @@ -47,6 +47,7 @@ you need to run `pip install -r requirements.txt` to install python dependencies **v1.1.1 (2024/3/16)** +- Fixed `easy stylesSelector` error when choose the custom file - `easy preSamplingLayerDiffusion` Added optional input parameter for mask - Renamed all nodes widget name named seed_num to seed - Remove forced **control_before_generate** settings。 If you want to use control_before_generate, change widget_value_control_mode to before in system settings diff --git a/README.md b/README.md index 739305b..4456c35 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ - UI界面美化,首次安装的用户,如需使用UI主题,请在 Settings -> Color Palette 中自行切换主题并**刷新页面**即可 - 增加了预采样参数配置的节点,可与采样节点分离,更方便预览。 - 支持通配符与Lora的提示词节点,如需使用Lora Block Weight用法,需先保证自定义节点包中安装了 [ComfyUI-Inspire-Pack](https://github.com/ltdrdata/ComfyUI-Inspire-Pack) -- 可多选的风格化提示词选择器,默认是Fooocus的样式json,可自定义 +- 可多选的风格化提示词选择器,默认是Fooocus的样式json,可自定义json放在styles底下,samples文件夹里可放预览图(名称和name一致,图片文件名如有空格需转为下划线'_') - 加载器可开启A1111提示词风格模式,可重现与webui生成近乎相同的图像,需先安装 [ComfyUI_smZNodes](https://github.com/shiimizu/ComfyUI_smZNodes) - 可使用`easy latentNoisy`或`easy preSamplingNoiseIn`节点实现对潜空间的噪声注入 - 简化 SD1.x、SD2.x、SDXL、SVD、Zero123等流程 [示例参考](https://github.com/yolain/ComfyUI-Easy-Use?tab=readme-ov-file#StableDiffusion) @@ -34,8 +34,9 @@ ## 更新日志 -**v1.1.1 (2024/3/16)** +**v1.1.1 (2024/3/17)** +- 修复 `easy stylesSelector` 当选择自定义样式文件时运行队列报错 - `easy preSamplingLayerDiffusion` 增加 mask 可选传入参数 - 将所有 **seed_num** 调整回 **seed** - 修补官方BUG: 当control_mode为before 在首次加载页面时未修改节点中widget名称为 control_before_generate diff --git a/py/easyNodes.py b/py/easyNodes.py index 1fd92bd..08ca2f5 100644 --- a/py/easyNodes.py +++ b/py/easyNodes.py @@ -181,7 +181,7 @@ class stylesPromptSelector: if styles == "fooocus_styles": file = os.path.join(RESOURCES_DIR, styles + '.json') else: - file = os.path.join(RESOURCES_DIR, styles + '.json') + file = os.path.join(FOOOCUS_STYLES_DIR, styles + '.json') f = open(file, 'r', encoding='utf-8') data = json.load(f) f.close()