diff --git a/.github/assets/example_1.webp b/.github/assets/example_1.webp new file mode 100644 index 0000000..d686f62 Binary files /dev/null and b/.github/assets/example_1.webp differ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cff29b0..5676544 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,12 +39,14 @@ jobs: - name: Create artifact archive run: | - zip -r embeddr-comfyui.zip __init__.py nodes/ js/ pyproject.toml README.md LICENSE.txt LICENSE.md components.json + mkdir comfyui-embeddr + cp -r __init__.py nodes js pyproject.toml README.md LICENSE.md components comfyui-embeddr/ + zip -r comfyui-embeddr.zip comfyui-embeddr - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - files: embeddr-comfyui.zip + files: comfyui-embeddr.zip generate_release_notes: true make_latest: true diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index c930f8e..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Embeddr - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 802c8d1..0b26afb 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,33 @@

Embeddr ComfyUI Extension

- \ No newline at end of file + + +> [!WARNING] +> Requires [embeddr-cli](https://github.com/embeddr-net/embeddr-cli) to be running. + +![Example](.github/assets/example_1.webp) + +## Installation + +1. Download [latest release](https://github.com/embeddr-net/embeddr-comfyui/releases) +2. Extract into `comfyui/custom_nodes` +3. [Install Embeddr-CLI](https://github.com/embeddr-net/embeddr-cli?tab=readme-ov-file#installation) +4. Run Embeddr-CLI with `embeddr serve` +5. Run ComfyUI + +## Development + +To get a development version working. + +```sh +git clone https://github.com/embeddr-net/embeddr-comfyui +cd embeddr-comfyui +pnpm install +pnpm build + +# Link into ComfyUI custom_nodes +# Example: +ln -s /home/user/git/embeddr-comfyui \ + /home/user/comfyui-dev/custom_nodes/embeddr-comfyui +``` diff --git a/nodes/EmbeddrLoadImage.py b/nodes/EmbeddrLoadImage.py index cfe5440..f9e9a36 100644 --- a/nodes/EmbeddrLoadImage.py +++ b/nodes/EmbeddrLoadImage.py @@ -3,7 +3,7 @@ import numpy as np from PIL import Image, ImageOps from io import BytesIO -from comfy_api.latest import io +from comfy_api.latest import io, ui class EmbeddrLoadImageNode(io.ComfyNode): @@ -56,7 +56,7 @@ def execute(cls, image_url): mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu") cls._cache[image_url] = (image, mask) - return io.NodeOutput(image, mask) + return io.NodeOutput(image, mask, ui=ui.PreviewImage(image)) except Exception as e: print(f"[Embeddr] Error loading image: {e}") diff --git a/pyproject.toml b/pyproject.toml index 2727dd5..963e693 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,8 @@ [project] name = "embeddr-extension" description = "Embeddr ComfyUI Extension" -version = "1.0.4" -license = { file = "LICENSE.txt" } +version = "1.0.5" +license = { file = "LICENSE.md" } dependencies = [] requires-python = ">=3.8"