INNER CODE UNIT · Python
_check_model_reference
runpod-workers/worker-comfyui · handler.py:490
def _check_model_reference(object_info, node_id, class_type, field, value, model_type):
"""
Validate one model-name input of a loader node.
Returns a problem description string, or None if the reference is fine
(or cannot be judged from /object_info).
"""
volume_dir = MODEL_TYPE_VOLUME_DIRS.get(
model_type, f"/runpod-volume/models/{model_type}/"
)
if value == MODEL_LIST_PLACEHOLDER:
available = _loader_field_options(object_info, class_type, field) or []
msg = (
f"Node {node_id} ({class_type}.{field}): got the placeholder "
f"'{MODEL_LIST_PLACEHOLDER}' instead of a real model filename — the client "
f"sent a UI default that was never replaced with an actual file. "
f"Set it to one of the available {model_type} files"