update function names

This commit is contained in:
Inoland
2025-09-22 19:17:30 +04:00
parent 1570a5708d
commit f73fe6ba7c
4 changed files with 9 additions and 12 deletions
@@ -6,9 +6,6 @@ from botocore.config import Config
from dotenv import load_dotenv
load_dotenv()
load_dotenv()
class S3:
def __init__(self, region, access_key, secret_key, bucket_name, endpoint_url):
self.region = region
@@ -11,14 +11,14 @@ class InoS3DownloadFile:
}
}
CATEGORY = "ComfyS3"
CATEGORY = "InoS3Helper"
INPUT_NODE = True
OUTPUT_NODE = True
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("local_path",)
FUNCTION = "download_file_s3"
FUNCTION = "function"
def download_file_s3(self, s3_path, local_path):
def function(self, s3_path, local_path):
local_path = S3_INSTANCE.download_file(s3_path=s3_path, local_path=local_path)
print(f"Downloaded file from S3 to {local_path}")
return local_path
@@ -19,11 +19,11 @@ class InoS3DownloadImage:
{"image": (sorted(files), {"image_upload": False})},
}
CATEGORY = "ComfyS3"
CATEGORY = "InoS3Helper"
RETURN_TYPES = ("IMAGE", "MASK")
FUNCTION = "load_image"
FUNCTION = "function"
def load_image(self, image):
def function(self, image):
s3_path = os.path.join(os.getenv("S3_INPUT_DIR"), image)
image_path = S3_INSTANCE.download_file(s3_path=s3_path, local_path=f"input/{image}")
@@ -16,12 +16,12 @@ class InoS3UploadVideo:
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("s3_video_paths",)
FUNCTION = "save_video_files"
FUNCTION = "function"
OUTPUT_NODE = True
OUTPUT_IS_LIST = (True,)
CATEGORY = "ComfyS3"
CATEGORY = "InoS3Helper"
def save_video_files(self, filenames, filename_prefix="VideoFiles"):
def function(self, filenames, filename_prefix="VideoFiles"):
filename_prefix += self.prefix_append
local_files = filenames[1]
full_output_folder, filename, counter, _, filename_prefix = S3_INSTANCE.get_save_path(filename_prefix)