diff --git a/src/comfydv/ollama.py b/src/comfydv/ollama.py index 98cd43a..b9b1e43 100644 --- a/src/comfydv/ollama.py +++ b/src/comfydv/ollama.py @@ -304,6 +304,18 @@ class LLMModelSelector: } } + @classmethod + def VALIDATE_INPUTS(cls, model): + """Bypass the frozen-at-startup combo list (see _load_default_models). + + The JS Refresh button keeps the widget's dropdown live, but + ``_DEFAULT_MODELS`` is only ever populated once, at server start-up. + Without this, models pulled into Ollama afterward validate in the + UI but fail prompt validation with "value ... is not available" + until ComfyUI is restarted. + """ + return True + RETURN_TYPES = ("STRING",) RETURN_NAMES = ("model_name",) FUNCTION = "select_model" @@ -328,6 +340,11 @@ class LLMLoadModel: } } + @classmethod + def VALIDATE_INPUTS(cls, model): + """See LLMModelSelector.VALIDATE_INPUTS for why this bypass exists.""" + return True + RETURN_TYPES = ("STRING",) RETURN_NAMES = ("model_name",) FUNCTION = "load_model"