Compare commits

...
Author SHA1 Message Date
LingXuanYin 79055476bd Revert "update exception if img file not found"
This reverts commit 7153ef7b01.
2024-11-04 15:52:27 +08:00
LingXuanYin 7153ef7b01 update exception if img file not found 2024-11-04 15:45:46 +08:00
LingXuanYin 18fabdb7b2 update code 2024-11-04 15:41:53 +08:00
Samwise Wang fc003f4945 Merge pull request #40 from haohaocreates/publish
Add Github Action for Publishing to Comfy Registry
2024-07-01 20:41:20 +08:00
Samwise Wang 1363aff363 Merge pull request #41 from haohaocreates/pyproject
Add pyproject.toml for Custom Node Registry
2024-07-01 20:41:03 +08:00
haohaocreates ccf090be74 Update pyproject.toml desc 2024-05-21 16:51:16 -04:00
haohaocreates 1514341e97 chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-05-21 20:50:37 +00:00
haohaocreates a42f979ead chore(publish): Add Github Action for Publishing to Comfy Registry 2024-05-21 20:50:36 +00:00
Samwise Wang a27e603bf2 Merge pull request #39 from talesofai/feat/add_request_retry
add retry to http_client
2024-05-21 16:57:31 +08:00
3 changed files with 41 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+5 -3
View File
@@ -1,5 +1,6 @@
import hashlib
import os
import io
from PIL import Image, ImageSequence, ImageOps
import numpy as np
import torch
@@ -41,6 +42,7 @@ class LoadImageByUrl:
download_path = os.path.join(input_dir, self.filename())
with open(download_path, 'wb') as file:
file.write(res.content)
return res.content
else:
raise ValueError(f"Failed to load image from {self.url}: {res.status_code} {res.text}")
@@ -49,9 +51,9 @@ class LoadImageByUrl:
input_dir = folder_paths.get_input_directory()
image_path = os.path.join(input_dir, self.filename())
if cache == False or not os.path.isfile(image_path):
self.download_by_url()
img = Image.open(image_path)
img = Image.open(io.BytesIO(self.download_by_url()))
else:
img = Image.open(image_path)
output_images = []
for i in ImageSequence.Iterator(img):
i = ImageOps.exif_transpose(i)
+15
View File
@@ -0,0 +1,15 @@
[project]
name = "comfyui-browser"
description = "This is an image/video/workflow browser and manager for ComfyUI. You could add image/video/workflow to collections and load it to ComfyUI. You will be able to use your collections everywhere."
version = "1.0.0"
license = "LICENSE"
dependencies = ["tqdm", "pandas", "numpy", "requests", "urllib3"]
[project.urls]
Repository = "https://github.com/talesofai/comfyui-browser"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = ""
DisplayName = "comfyui-browser"
Icon = ""