diff --git a/__init__.py b/__init__.py index 5537097..fac5191 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ RES4SHO -- High-Frequency Detail Sampling for ComfyUI diff --git a/sampling.py b/sampling.py index 57579bb..adf33df 100644 --- a/sampling.py +++ b/sampling.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ HF-Detail Sampling -- exponential integrator with spectral high-frequency emphasis (HFE), tuned for realistic detail preservation. @@ -1897,6 +1896,15 @@ def _register_schedulers() -> None: names.append(name) comfy_samplers.SCHEDULER_NAMES = names + KSampler = getattr(comfy_samplers, "KSampler", None) + if KSampler is not None and hasattr(KSampler, "SCHEDULERS"): + sched_list = getattr(KSampler, "SCHEDULERS") + if not isinstance(sched_list, list): + sched_list = list(sched_list) + if name not in sched_list: + sched_list.append(name) + KSampler.SCHEDULERS = sched_list + LOGGER.info("HFE schedulers registered: %s", list(_SCHEDULERS.keys()))