INNER CODE UNIT · Python
_format_options
runpod-workers/worker-comfyui · handler.py:480
def _format_options(options):
"""Format an option list for an error message, truncating long lists."""
shown = sorted(options)[:MAX_LISTED_MODELS]
formatted = ", ".join(f"'{o}'" for o in shown)
remaining = len(options) - len(shown)
if remaining > 0:
formatted += f" (and {remaining} more)"
return formatted
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(