mudler/LocalAI · error · ValueError
Failed to load pipeline '{effective_pipeline_type}': {e}\nAv
Error message
Failed to load pipeline '{effective_pipeline_type}': {e}\nAvailable pipelines: {', '.join(available[:30])}... What it means
Raised by the diffusers backend's _load_pipeline when load_diffusers_pipeline() throws while constructing the requested pipeline class. The message chains the original exception and appends up to 30 available pipeline class names so the user can see what this diffusers install actually supports.
Source
Thrown at backend/python/diffusers/backend.py:495
# Add device_map for multi-GPU support (when TensorParallelSize > 1)
if device_map:
load_kwargs["device_map"] = device_map
# Determine pipeline class name - default to AutoPipelineForText2Image
effective_pipeline_type = pipeline_type if pipeline_type else "AutoPipelineForText2Image"
# Use dynamic loader for all pipelines
try:
pipe = load_diffusers_pipeline(
class_name=effective_pipeline_type,
model_id=model_ref,
from_single_file=from_single_file,
**load_kwargs
)
except Exception as e:
# Provide helpful error with available pipelines
available = get_available_pipelines()
raise ValueError(
f"Failed to load pipeline '{effective_pipeline_type}': {e}\n"
f"Available pipelines: {', '.join(available[:30])}..."
) from e
# Apply LowVRAM optimization if supported and requested
if request.LowVRAM and hasattr(pipe, 'enable_model_cpu_offload'):
pipe.enable_model_cpu_offload()
return pipe
def Health(self, request, context):
return backend_pb2.Reply(message=bytes("OK", 'utf-8'))
def LoadModel(self, request, context):
try:
print(f"Loading model {request.Model}...", file=sys.stderr)
print(f"Request {request}", file=sys.stderr)
torchType = torch.float32View on GitHub (pinned to 44413a9d06)
Solutions
- Read the chained original exception ({e}) — it carries the root cause; the 'Available pipelines' list is only a hint.
- Match the pipeline class to the model family (SD1.5→StableDiffusionPipeline, SDXL→StableDiffusionXLPipeline, Flux→FluxPipeline, etc.).
- Upgrade the backend image / diffusers package if the class exists upstream but not in the available list.
- Re-download the model snapshot if the underlying error is a missing/corrupt weight file.
Example fix
# before request.PipelineType = "StableDiffusionPipeline" # model is SDXL # after request.PipelineType = "StableDiffusionXLPipeline"
Defensive patterns
Strategy: try-catch
Validate before calling
available = set(get_available_pipelines())
assert effective_pipeline_type in available, (
f"pipeline {effective_pipeline_type} not available; known: {sorted(available)[:30]}") Try / catch
try:
pipe = _load_pipeline(request, model_ref, ...)
except ValueError as e:
# message already contains the underlying cause and available pipelines
logger.error("pipeline load failed: %s", e)
return error_reply(str(e)) Prevention
- Match pipeline class to model family before sending the request.
- Log the chained cause, not just the wrapper message.
- Cache get_available_pipelines() at startup and validate PipelineType against it.
When it happens
Trigger: effective_pipeline_type resolves to a class whose from_pretrained/from_single_file load fails — missing model files, incompatible diffusers version lacking that class's required deps (e.g. transformers/k-diffusion), corrupted snapshot, or wrong pipeline type for the model files present.
Common situations: Specifying PipelineType that does not match the model (e.g. StableDiffusionXLPipeline against a Flux checkpoint), an older pinned diffusers version in the backend image missing a newer pipeline, or a partially downloaded model directory.
Related errors
- Invalid scheduler '{'k_' if is_karras else ''}{name}'
- Unknown pipeline class '{class_name}'. Available pipelines:
- Unknown task '{task}'. Available tasks: {', '.join(sorted(al
- Pipeline class {pipeline_class.__name__} does not support fr
- Could not find base class '{base_class_name}' in diffusers
AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15).
Data as JSON: /api/errors/8bd6913ca2d30b0c.
Report an issue: GitHub.