mudler/LocalAI · error · ValueError
Unknown pipeline class '{class_name}'. Available pipelines:
Error message
Unknown pipeline class '{class_name}'. Available pipelines: {', '.join(sorted(registry.keys())[:20])}... What it means
Raised by resolve_pipeline_class when class_name was provided but neither an exact nor case-insensitive match exists in the pipeline registry. The message lists up to 20 sorted registry keys to guide correction.
Source
Thrown at backend/python/diffusers/diffusers_dynamic_loader.py:348
Returns:
The resolved pipeline class.
Raises:
ValueError: If no pipeline could be resolved.
"""
registry = get_pipeline_registry()
aliases = get_task_aliases()
# 1. Direct class name lookup
if class_name:
if class_name in registry:
return registry[class_name]
# Try case-insensitive match
for name, cls in registry.items():
if name.lower() == class_name.lower():
return cls
raise ValueError(
f"Unknown pipeline class '{class_name}'. "
f"Available pipelines: {', '.join(sorted(registry.keys())[:20])}..."
)
# 2. Task alias lookup
if task:
task_lower = task.lower().replace('_', '-')
if task_lower in aliases:
# Return the first matching pipeline for this task
matching_classes = aliases[task_lower]
if matching_classes:
return registry[matching_classes[0]]
# Try partial matching
for alias, classes in aliases.items():
if task_lower in alias or alias in task_lower:
if classes:
return registry[classes[0]]View on GitHub (pinned to 44413a9d06)
Solutions
- Use the exact diffusers class name (e.g. 'StableDiffusionXLPipeline'); the match is case-insensitive but punctuation-sensitive.
- If you meant a task, pass it via the task= argument instead of class_name (task aliases are handled separately).
- Compare against the 'Available pipelines' list in the error message and correct spelling.
- Upgrade diffusers if the class genuinely should exist.
Example fix
# before load_diffusers_pipeline(class_name="stable-diffusion-xl") # after load_diffusers_pipeline(class_name="StableDiffusionXLPipeline")
Defensive patterns
Strategy: validation
Validate before calling
registry = get_pipeline_registry()
name_map = {k.lower(): k for k in registry}
canonical = name_map.get(class_name.lower())
assert canonical, f"unknown pipeline {class_name!r}" Type guard
def is_known_pipeline(class_name: str) -> bool:
lowered = {k.lower() for k in get_pipeline_registry()}
return class_name.lower() in lowered Try / catch
try:
cls = resolve_pipeline_class(class_name=name, ...)
except ValueError as e:
# error message lists valid names; re-surface to the API consumer
return error_reply(str(e)) Prevention
- Feed class names from a dropdown built off get_available_pipelines(), not free text.
- Use exact diffusers class spellings (CamelCase ending in 'Pipeline').
- Validate once at config load rather than at generation time.
When it happens
Trigger: Calling load_diffusers_pipeline / resolve_pipeline_class with a class_name like 'StableDiffusionXL' (truncated), 'stable-diffusion-xl-pipeline' (slug form), or a class unknown to the installed diffusers.
Common situations: Users passing model repo slugs or task names in the class_name field, casing mismatches beyond the case-insensitive fallback (e.g. hyphens/underscores), or a pipeline class from a newer diffusers than installed.
Related errors
- Invalid scheduler '{'k_' if is_karras else ''}{name}'
- Unknown task '{task}'. Available tasks: {', '.join(sorted(al
- Failed to load pipeline '{effective_pipeline_type}': {e}\nAv
- Unknown pipeline: {class_name}
- voiceCreate.audio.durationError
AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15).
Data as JSON: /api/errors/1e6c49593aebbbe0.
Report an issue: GitHub.