INNER CODE UNIT · Python

get_available_models

runpod-workers/worker-comfyui · handler.py:455

def get_available_models():
    """
    Get list of available models from ComfyUI, grouped by model type.

    Queries /object_info and extracts the option list of every known model
    loader node (see MODEL_LOADER_NODES), so the result covers checkpoints,
    loras, vae, text encoders, diffusion models and upscale models.

    Returns:
        dict: Mapping of model type (e.g. 'checkpoints') to a sorted list of
              available filenames. Empty dict if ComfyUI can't be reached.
    """
    object_info = _fetch_object_info()
    if object_info is None:
        return {}

    available_models = {}
    for class_type, (model_type, fields) in MODEL_LOADER_NODES.items():

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…