commit f5a0f4f070c3bf855af4910e9f38700bda7d770c Author: FizzleDorf <1fizzledorf@gmail.com> Date: Tue May 30 01:36:56 2023 -0400 first commit diff --git a/LerpNode.py b/LerpNode.py new file mode 100644 index 0000000..1fe5377 --- /dev/null +++ b/LerpNode.py @@ -0,0 +1,21 @@ +import numpy as np +import pandas as pd +import re +import numexpr + +class LerpNode: + @classmethod + def INPUT_TYPES(s): + return {"required": {"num_Images": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 9999.0, "step": 1.0}), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + "current_frame": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 9999, "step": 1.0}), + }} + RETURN_TYPES = ("FLOAT",) + FUNCTION = "lerp" + + CATEGORY = "FizzNodes" + + def lerp(self, num_Images, strength, current_frame): + step = strength/num_Images + output = strength - (step * current_frame) + return (output, ) \ No newline at end of file diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..a5249fa --- /dev/null +++ b/__init__.py @@ -0,0 +1,74 @@ +# Made by Davemane42#0042 for ComfyUI +import os +import subprocess +import importlib.util +import sys +import filecmp +import shutil + +import __main__ + +python = sys.executable + + +extentions_folder = os.path.join(os.path.dirname(os.path.realpath(__main__.__file__)), + "web" + os.sep + "extensions" + os.sep + "FizzleDorf") +javascript_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "javascript") + +if not os.path.exists(extentions_folder): + print('Making the "web\extensions\FizzleDorf" folder') + os.mkdir(extentions_folder) + +result = filecmp.dircmp(javascript_folder, extentions_folder) + +if result.left_only or result.diff_files: + print('Update to javascripts files detected') + file_list = list(result.left_only) + file_list.extend(x for x in result.diff_files if x not in file_list) + + for file in file_list: + print(f'Copying {file} to extensions folder') + src_file = os.path.join(javascript_folder, file) + dst_file = os.path.join(extentions_folder, file) + if os.path.exists(dst_file): + os.remove(dst_file) + #print("disabled") + shutil.copy(src_file, dst_file) + + +def is_installed(package, package_overwrite=None): + try: + spec = importlib.util.find_spec(package) + except ModuleNotFoundError: + pass + + package = package_overwrite or package + + if spec is None: + print(f"Installing {package}...") + command = f'"{python}" -m pip install {package}' + + result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, env=os.environ) + + if result.returncode != 0: + print(f"Couldn't install\nCommand: {command}\nError code: {result.returncode}") + +# is_installed("huggingface_hub") +# is_installed("onnx") +# is_installed("onnxruntime", "onnxruntime-gpu") + +from .LerpNode import LerpNode #, CLIPTextSchedule #, ConditioningUpscale, ConditioningStretch, ConditioningDebug +#from .input import +#from .ABGRemover import ABGRemover + +NODE_CLASS_MAPPINGS = { + "Lerp": LerpNode, + #"CLIPTextSchedule": CLIPTextSchedule + #"Input": InputNode + #"MultiAreaConditioning": MultiAreaConditioning, + #"ConditioningUpscale": ConditioningUpscale, + #"ConditioningStretch": ConditioningStretch, + #"ABGRemover": ABGRemover, +} + +print('\033[34mFizzleDorf Custom Nodes: \033[92mLoaded\033[0m') \ No newline at end of file diff --git a/__pycache__/AnimationNodes.cpython-39.pyc b/__pycache__/AnimationNodes.cpython-39.pyc new file mode 100644 index 0000000..799a701 Binary files /dev/null and b/__pycache__/AnimationNodes.cpython-39.pyc differ diff --git a/__pycache__/LerpNode.cpython-39.pyc b/__pycache__/LerpNode.cpython-39.pyc new file mode 100644 index 0000000..21e0132 Binary files /dev/null and b/__pycache__/LerpNode.cpython-39.pyc differ diff --git a/__pycache__/__init__.cpython-39.pyc b/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..13a645e Binary files /dev/null and b/__pycache__/__init__.cpython-39.pyc differ diff --git a/javascript/animationNodes.js b/javascript/animationNodes.js new file mode 100644 index 0000000..e69de29