Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bentoml/ComfyUI-IDL
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Nov 7, 2024
2 parents 5feae11 + c288b63 commit 0e036aa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 40 deletions.
38 changes: 19 additions & 19 deletions nodes/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def INPUT_TYPES(cls):
return {
"required": {
"filename": ("STRING", {"default": "", "forceInput": True}),
"filename_prefix": ("STRING", {"default": "BentoML_"}),
"filename_prefix": ("STRING", {"default": "ComfyUI_IDL_"}),
},
}

RETURN_TYPES = ()
CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/output"
BENTOML_NODE = True
FUNCTION = "save"
DESCRIPTION = "Save the input data for bentoml output"
DESCRIPTION = "Save the input data for IDL output"

def save(self, filename, filename_prefix):
if not filename_prefix:
Expand Down Expand Up @@ -67,7 +67,7 @@ def INPUT_TYPES(s):
return {
"required": {
"images": ("IMAGE", {"tooltip": "The images to save."}),
"filename_prefix": ("STRING", {"default": "BentoML"}),
"filename_prefix": ("STRING", {"default": "ComfyUI_IDL_"}),
},
"hidden": {
"prompt": "PROMPT",
Expand All @@ -80,11 +80,11 @@ def INPUT_TYPES(s):
BENTOML_NODE = True
OUTPUT_NODE = True

CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/output"
DESCRIPTION = "Saves the input images to your ComfyUI output directory."

def save_images(
self, images, filename_prefix="BentoML", prompt=None, extra_pnginfo=None
self, images, filename_prefix="ComfyUI_IDL_", prompt=None, extra_pnginfo=None
):
filename_prefix += self.prefix_append
full_output_folder, filename, counter, subfolder, filename_prefix = (
Expand Down Expand Up @@ -120,7 +120,7 @@ def save_images(
return {"ui": {"images": results}}


class LoadImage:
class ImageInput:
@classmethod
def INPUT_TYPES(s):
input_dir = folder_paths.get_input_directory()
Expand All @@ -133,7 +133,7 @@ def INPUT_TYPES(s):
"required": {"image": (sorted(files), {"image_upload": True})},
}

CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/input"
BENTOML_NODE = True
RETURN_TYPES = ("IMAGE", "MASK")
RETUEN_NAMES = ("image", "mask")
Expand Down Expand Up @@ -212,7 +212,7 @@ def INPUT_TYPES(s):
RETURN_TYPES = (anytype,)
BENTOML_NODE = True
FUNCTION = "string_input"
CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/input"

def string_input(self, value):
return (value,)
Expand All @@ -236,7 +236,7 @@ def INPUT_TYPES(s):
RETURN_TYPES = (anytype,)
FUNCTION = "identity"
BENTOML_NODE = True
CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/input"

def identity(self, value):
return (value,)
Expand All @@ -260,7 +260,7 @@ def INPUT_TYPES(s):
RETURN_TYPES = (anytype,)
FUNCTION = "identity"
BENTOML_NODE = True
CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/input"

def identity(self, value):
return (value,)
Expand All @@ -283,7 +283,7 @@ def INPUT_TYPES(s):
RETUEN_NAMES = ("bool",)
RETURN_TYPES = (anytype,)
FUNCTION = "identity"
CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/input"
BENTOML_NODE = True

def identity(self, value):
Expand All @@ -308,7 +308,7 @@ def INPUT_TYPES(s):
RETUEN_NAMES = ("path",)
FUNCTION = "identity"
BENTOML_NODE = True
CATEGORY = "bentoml/io"
CATEGORY = "ComfyUI-IDL/input"

def identity(self, path):
return (path,)
Expand All @@ -322,7 +322,7 @@ def VALIDATE_INPUTS(s, path):
NODE_CLASS_MAPPINGS = {
"BentoOutputPath": OutputPath,
"BentoOutputImage": OutputImage,
"BentoInputImage": LoadImage,
"BentoInputImage": ImageInput,
"BentoInputString": StringInput,
"BentoInputInteger": IntegerInput,
"BentoInputFloat": FloatInput,
Expand All @@ -331,12 +331,12 @@ def VALIDATE_INPUTS(s, path):
}

NODE_DISPLAY_NAME_MAPPINGS = {
"BentoOutputPath": "Path Output",
"BentoOutputImage": "Image Output",
"BentoInputImage": "Load Image",
"BentoInputString": "String Input",
"BentoInputImage": "Image Input",
"BentoInputPath": "Path Input",
"BentoInputInteger": "Integer Input",
"BentoInputFloat": "Float Input",
"BentoInputBoolean": "Boolean Input",
"BentoInputPath": "Path Input",
"BentoInputString": "String Input",
"BentoOutputImage": "Image Output",
"BentoOutputPath": "Path Output",
}
21 changes: 0 additions & 21 deletions setup.cfg

This file was deleted.

0 comments on commit 0e036aa

Please sign in to comment.