diff --git a/.gitignore b/.gitignore index 68bc17f..8287add 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +config.yaml diff --git a/D2_SendEagle.py b/D2_SendEagle.py index 3aeb39b..a28fd04 100644 --- a/D2_SendEagle.py +++ b/D2_SendEagle.py @@ -72,6 +72,11 @@ class D2_SendEagle: "STRING", {"default": ""} ), + # プレビュー表示するか + "preview": ( + "BOOLEAN", + {"default": True, "label_on": "ON", "label_off": "OFF"}, + ), }, "optional":{ # その他メモ @@ -83,8 +88,8 @@ class D2_SendEagle: "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, } - RETURN_TYPES = ("STRING", "STRING", ) - RETURN_NAMES = ("positive", "negative", ) + RETURN_TYPES = ("STRING", "STRING", "IMAGE") + RETURN_NAMES = ("positive", "negative", "IMAGE", ) FUNCTION = "add_item" OUTPUT_NODE = True CATEGORY = "D2" @@ -103,6 +108,7 @@ class D2_SendEagle: compression = 80, positive = "", negative = "", + preview = True, memo_text = "", prompt: Optional[Dict] = None, extra_pnginfo: Optional[Dict] = None, @@ -127,9 +133,14 @@ class D2_SendEagle: for image in images: results.append(self.create_image_object(image, params)) + if(preview): + return { + "ui": {"images": results}, + "result": (positive, negative, images,) + } + return { - "ui": {"images": results}, - "result": (positive, negative, ) + "result": (positive, negative, images,) } diff --git a/README.md b/README.md index 1e2e4bd..e2e1a82 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,11 @@ You can add more by editing `config.yaml`. ## Change Log +- 2024/10/04 + - Added a toggle button to hide image previews + - This was added because when the preview was enlarged, the `memo_text` also became larger and obstructive + - Added IMAGE to output + - This is just a pass-through. It's not necessary, but we added it anyway - 2024/09/29 - Added support for NovelAI generation node GenerateNAID - Made it possible to specify settings in `config.yaml` diff --git a/README_ja.md b/README_ja.md index 23975c5..f25c7b8 100644 --- a/README_ja.md +++ b/README_ja.md @@ -105,6 +105,11 @@ Eagleに送信する他に、ローカル環境の下記フォルダにも画像 ## 変更履歴 +- 2024/10/04 + - イメージプレビューを非表示にするトグルボタンを追加 + - プレビューを大きくすると `memo_text` も一緒に大きくなって邪魔だったので + - output に IMAGE を追加 + - ただのパススルーです。必要ではないけど追加しました - 2024/09/29 - NovelAI生成ノード GenerateNAID に対応 - 設定項目を `config.yaml` で指定できるようにした diff --git a/README_zh.md b/README_zh.md index 9dbf37b..7c36a00 100644 --- a/README_zh.md +++ b/README_zh.md @@ -105,6 +105,11 @@ ## 更新日誌 +- 2024/10/04 + - 新增切換按鈕以隱藏圖片預覽 + - 新增此功能是因為當預覽放大時,`memo_text` 也會變大而造成干擾 + - 在輸出中新增 IMAGE + - 這只是一個直通功能。雖然不是必要的,但我們還是添加了它 - 2024/09/29 - 添加對 NovelAI 生成節點 GenerateNAID 的支持 - 使得可以在 `config.yaml` 中指定設置項目 diff --git a/pyproject.toml b/pyproject.toml index 3c19303..96ea2bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-d2-send-eagle" description = "Send generated images to Eagle" -version = "1.3.1" +version = "1.4.0" license = {file = "LICENSE"} [project.urls]