diff --git a/modules/impact/config.py b/modules/impact/config.py index ea5cb15..70df696 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -1,7 +1,7 @@ import configparser import os -version_code = [5, 15, 2] +version_code = [5, 15, 3] version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '') dependency_version = 21 diff --git a/modules/impact/core.py b/modules/impact/core.py index 6c09d12..ff66680 100644 --- a/modules/impact/core.py +++ b/modules/impact/core.py @@ -42,7 +42,7 @@ preview_bridge_image_name_map = {} preview_bridge_cache = {} -SCHEDULERS = comfy.samplers.KSampler.SCHEDULERS + ['AYS SDXL', 'AYS SD1', 'AYS SVD'] +SCHEDULERS = comfy.samplers.KSampler.SCHEDULERS + ['AYS SDXL', 'AYS SD1', 'AYS SVD', 'GITS[coeff=1.2]'] def set_previewbridge_image(node_id, file, item): diff --git a/modules/impact/impact_pack.py b/modules/impact/impact_pack.py index 32ef7b7..ee7a430 100644 --- a/modules/impact/impact_pack.py +++ b/modules/impact/impact_pack.py @@ -2142,8 +2142,8 @@ class ImpactSchedulerAdapter: @classmethod def INPUT_TYPES(s): return {"required": { - "scheduler": (comfy.samplers.KSampler.SCHEDULERS, {"defaultInput": True,}), - "ays_scheduler": (['None', 'AYS SDXL', 'AYS SD1', 'AYS SVD'],), + "scheduler": (comfy.samplers.KSampler.SCHEDULERS, {"defaultInput": True, }), + "extra_scheduler": (['None', 'AYS SDXL', 'AYS SD1', 'AYS SVD', 'GITS[coeff=1.2]'],), }} CATEGORY = "ImpactPack/Util" @@ -2153,9 +2153,9 @@ class ImpactSchedulerAdapter: FUNCTION = "doit" - def doit(self, scheduler, ays_scheduler): - if ays_scheduler != 'None': - return (ays_scheduler,) + def doit(self, scheduler, extra_scheduler): + if extra_scheduler != 'None': + return (extra_scheduler,) return (scheduler,) diff --git a/modules/impact/impact_sampling.py b/modules/impact/impact_sampling.py index 94b136e..fcf4f8f 100644 --- a/modules/impact/impact_sampling.py +++ b/modules/impact/impact_sampling.py @@ -23,6 +23,8 @@ def calculate_sigmas(model, sampler, scheduler, steps): if scheduler.startswith('AYS'): sigmas = nodes.NODE_CLASS_MAPPINGS['AlignYourStepsScheduler']().get_sigmas(scheduler[4:], steps, denoise=1.0)[0] + elif scheduler.startswith('GITS[coeff='): + sigmas = nodes.NODE_CLASS_MAPPINGS['GITSScheduler']().get_sigmas(float(scheduler[11:-1]), steps, denoise=1.0)[0] else: sigmas = samplers.calculate_sigmas(model.get_model_object("model_sampling"), scheduler, steps) diff --git a/modules/impact/special_samplers.py b/modules/impact/special_samplers.py index 7f9eca5..f899b59 100644 --- a/modules/impact/special_samplers.py +++ b/modules/impact/special_samplers.py @@ -654,12 +654,11 @@ class GITSSchedulerFuncProvider: FUNCTION = "doit" def doit(self, coeff, denoise): - try: - import comfy_extras.nodes_gits as node_gits - except Exception: - raise Exception("[Impact Pack] ComfyUI is an outdated version.") - def f(model, sampler, steps): - return node_gits.GITSScheduler().get_sigmas(coeff, steps, denoise)[0] + if 'GITSScheduler' not in nodes.NODE_CLASS_MAPPINGS: + raise Exception("[Impact Pack] ComfyUI is an outdated version. Cannot use GITSScheduler.") + + scheduler = nodes.NODE_CLASS_MAPPINGS['GITSScheduler']() + return scheduler.get_sigmas(coeff, steps, denoise)[0] return (f, ) diff --git a/pyproject.toml b/pyproject.toml index 6282793..b04927b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-impact-pack" description = "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler." -version = "5.15.2" +version = "5.15.3" license = "LICENSE" dependencies = ["segment-anything", "scikit-image", "piexif", "transformers", "opencv-python-headless", "GitPython", "scipy>=1.11.4"]