From 7de6bfdb3872882d786d426513dc5ace46705587 Mon Sep 17 00:00:00 2001 From: Jordan Thompson Date: Mon, 27 Apr 2026 09:42:06 -0700 Subject: [PATCH] Compensate for RES4LYF overwriting schedulers. --- __init__.py | 1 - sampling.py | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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()))